-
1. Re: Exposing a web service
ffang Mar 29, 2011 5:55 AM (in response to manta7)Hi,
You do need a cxfbc:provider in this case.
The workflow is
external client ====>cxfbc:consumer====> cxfbc:provider====>external service(axis server in your case)
cxfbc:consumer will start a listening port and play the server side role, cxf bc:provider play the client side role.
Here cxfbc:consumer====> cxfbc:provider just like a bridge, we actually have a testcase[1] which can demonstrate how this bridge works.
Btw, you need ensure your axis server not use rpc/encoded style as that style is quite old and not supported by cxf.
https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
Freeman
-
2. Re: Exposing a web service
manta7 Mar 29, 2011 8:12 AM (in response to ffang)Ok ok, thanks for the answer! I understand..
I wrote that:
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:HelloService2="http://hello.registry.test">
<cxfbc:consumer wsdl="classpath:HelloService2.wsdl"
targetService="HelloService2:HelloService2"
targetInterface="HelloService2:HelloService2PortType"/>
+ +
+ <cxfbc:provider wsdl="classpath:HelloService2.wsdl"+
locationURI="http://localhost:8092/HelloService2"
service="HelloService2:HelloService2"
endpoint="HelloService2PortProxy"
interfaceName="HelloService2:HelloService2PortType"/>
</beans>
With a consumer and a provider. But I still have a problem.
You said "cxfbc:consumer will start a listening port", indeed, when I'm going on http://localhost:8080 I fall on CFX (no more on Tomcat), as if it erase my previous listening port. So how can I change the listening port of my consumer ?
-
3. Re: Exposing a web service
ffang Mar 29, 2011 8:29 AM (in response to manta7)Hi,
In cxfbc:consumer, you can specify locationURI using any port you want, this is the webservice url you exposed for external client.
And in cxfbc:provider, you can specify another locationURI which should be the same as the one used for your axis server, so that cxfbc:provider can talk to your server.
Freeman
-
4. Re: Exposing a web service
manta7 Mar 29, 2011 9:03 AM (in response to ffang)Great, it works!
We can find more information here: http://servicemix.apache.org/servicemix-cxf-bc.html
Thanks again