-
1. Re: CXF-BC consumer provider problem
davestanley Oct 22, 2009 10:55 AM (in response to kumako22)Hi,
You seem to be missing namespace prefixes for your targetService and targetInterface. If you look at one of the shipped samples with the ESB .. e.g.
/examples/cxf-wsdl-first/wsdl-first-cxfbc-su/src/main/resource/xbean.xml
you will see something like this ..
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" xmlns:person="http://servicemix.apache.org/samples/wsdl-first"> <cxfbc:consumer wsdl="classpath:person.wsdl" targetService="person:PersonService" targetInterface="person:Person"></cxfbc:consumer> </beans>
Note the QName's for the service and interface need to match your wsdl.
person namespace - matches targetNamespace of the wsdl
targetService - matches the wsdl:service name
targetInterface - matches the portType name
<wsdl:definitions name="wsdl-first" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://servicemix.apache.org/samples/wsdl-first" xmlns:typens="http://servicemix.apache.org/samples/wsdl-first/types" targetNamespace="http://servicemix.apache.org/samples/wsdl-first"> ..... <wsdl:portType name="Person"> <wsdl:operation name="GetPerson"> <wsdl:input message="tns:GetPersonRequest"></wsdl:input> <wsdl:output message="tns:GetPersonResponse"></wsdl:output> <wsdl:fault name="UnknownPerson" message="tns:UnknownPersonFault"></wsdl:fault> </wsdl:operation> </wsdl:portType> .... <wsdl:service name="PersonService"> <wsdl:port binding="tns:PersonSOAPBinding" name="soap"> <soap:address location="http://localhost:8092/PersonService/"></soap:address> </wsdl:port> </wsdl:service> </wsdl:definitions>
Hope this helps
/Dave
-
2. Re: CXF-BC consumer provider problem
davestanley Oct 22, 2009 10:59 AM (in response to kumako22)on the last question..
>>> And main question: How can I test it to see how it works??
You just need to send a message compliant with the wsdl to your esb service endpoint, and you should see it passthru to the backend via your cxf-bc provider.
An easy way to do this is to modify /examples/cxf-wsdl-first/client.html to send a message matching your wsdl.
Regards
/Dave
-
3. Re: CXF-BC consumer provider problem
kumako22 Oct 23, 2009 6:42 PM (in response to davestanley)Thank you!
I'll be glad if you could explain me more.
I defined new xbean.xml file:
<soap:address location="http://myserver.com/services/MyService" />
</wsdl:port>
</wsdl:service>
Is it correct?
5. How can I connect to ESB endpoint and which one in provider is ESB endpoint?
6. Is my way of thinking correct to achieve my aim?
Thanks in advance,
MK
-