You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by 陈峰 <ch...@gmail.com> on 2011/01/09 10:33:07 UTC

When I invoke the WebService outside FUSE,smx says no service,no endpoint

Hi ,erveryone.
I want to invoke the other system's webservice(
http://localhost:8080/webservice_su/services/helloWorld) in servicemix using
camel.
and I did as follows:
1. I use cxf-bc to bind the webservice just like this :
first: I saved the webservice's wsdl and changed the wsdl:service
<wsdl:service name="MsgInfoImplService">
<wsdl:port binding="tns:MsgInfoImplServiceSoapBinding"
name="MsgInfoImplPort11">
<soap:address
location="http://localhost:8193/helloWorld" />
</wsdl:port>
</wsdl:service>
second:In the xbean.xml I defined the comsumer and the provider

<cxfbc:consumer wsdl="classpath:person.wsdl"
service="person:MsgInfoImplService"
endpoint="person:MsgInfoImplPort11"
targetService="person:MsgInfoImplService"
targetEndpoint="MsgInfoImplPort"
targetInterface="person:MsgInfo"/>

<cxfbc:provider
wsdl="http://localhost:8080/webservice_su/services/helloWorld?wsdl"
service="person:MsgInfoImplService" endpoint="MsgInfoImplPort"/>

And It works,I can use http://localhost:8193/helloWorld invoke
http://localhost:8080/webservice_su/services/helloWorld?wsdl .

2. In the camel-su ,I worte as follows:
<to uri="jbi:endpoint:
http://impl.ws.toxind.com/MsgInfoImplService/MsgInfoImplPort"/>

It delolyed well,but when it works,always say:
no service,no endpoint or no interfacename

please help me,tks,my fuse is 4.2 ,my os is win7
Thank you in advance
Don.

Re: When I invoke the WebService outside FUSE,smx says no service,no endpoint

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

In your camel-su, there also should be a from endpoint which can  
expose a JBI endpoint on JBI bus,
  so the working flow should be

cxfbc:consumer------> camel from endpoint ----> camel to endpoint---->  
cxf bc provider.
Ensure you have correct target name between each endpoint pair, you  
may need take a look at [1] to get more about the configurations.

[1]http://camel.apache.org/jbi.html

Freeman
On 2011-1-9, at 下午5:33, 陈峰 wrote:

> Hi ,erveryone.
> I want to invoke the other system's webservice(
> http://localhost:8080/webservice_su/services/helloWorld) in  
> servicemix using
> camel.
> and I did as follows:
> 1. I use cxf-bc to bind the webservice just like this :
> first: I saved the webservice's wsdl and changed the wsdl:service
> <wsdl:service name="MsgInfoImplService">
> <wsdl:port binding="tns:MsgInfoImplServiceSoapBinding"
> name="MsgInfoImplPort11">
> <soap:address
> location="http://localhost:8193/helloWorld" />
> </wsdl:port>
> </wsdl:service>
> second:In the xbean.xml I defined the comsumer and the provider
>
> <cxfbc:consumer wsdl="classpath:person.wsdl"
> service="person:MsgInfoImplService"
> endpoint="person:MsgInfoImplPort11"
> targetService="person:MsgInfoImplService"
> targetEndpoint="MsgInfoImplPort"
> targetInterface="person:MsgInfo"/>
>
> <cxfbc:provider
> wsdl="http://localhost:8080/webservice_su/services/helloWorld?wsdl"
> service="person:MsgInfoImplService" endpoint="MsgInfoImplPort"/>
>
> And It works,I can use http://localhost:8193/helloWorld invoke
> http://localhost:8080/webservice_su/services/helloWorld?wsdl .
>
> 2. In the camel-su ,I worte as follows:
> <to uri="jbi:endpoint:
> http://impl.ws.toxind.com/MsgInfoImplService/MsgInfoImplPort"/>
>
> It delolyed well,but when it works,always say:
> no service,no endpoint or no interfacename
>
> please help me,tks,my fuse is 4.2 ,my os is win7
> Thank you in advance
> Don.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org