You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by laolong <le...@sina.com> on 2009/06/20 06:37:26 UTC
how to invoke external webservices using bean su or cxfse:proxy?
Hi,
There is a process we need to implement on servicemix: get a CSV file,
then parse it and send to external soap services, the question is how to
invoke external webservices.
I have tried to use a bean su to create CXF client, but looks like it's
not supported by servicemix since I have to add some cxf-*.jar to su lib and
still get error java.lang.RuntimeException: Could not find conduit initiator
for transport http://schemas.xmlsoap.org/soap/http
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.setServiceClass(getServiceClass());
factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
InvoiceInterface client = (InvoiceInterface) factoryBean.create();
client.send(InvoiceObject);
..............
Then I found cxfse:proxy could be used to invoke external service, but
how to invoke a cxfse:endpoint pojo using a bean su?
Please advise. Thanks in advance!
Regards,
Long
--
View this message in context: http://www.nabble.com/how-to-invoke-external-webservices-using-bean-su-or-cxfse%3Aproxy--tp24122028p24122028.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: how to invoke external webservices using bean su or
cxfse:proxy?
Posted by laolong <le...@sina.com>.
I will try to use NormalizedMessage.setProperty to pass data.
Thanks again!
Regards,
Long
laolong wrote:
>
> Hi Freeman,
>
> Yes, cxfse:proxy is working now, I just have another question :)
>
> I want to pass InvoiceRequest object to cxfse from my bean su, how to
> populate the message content?
>
> cxfse pojo as below:
>
> private InvoicePortType invoice; //cxfse:proxy
> .....
> @WebMethod
> public InvoiceResponse callInvoice(InvoiceRequest req){
> return invoice.send(req);
> }
> ...........
>
> Thanks a lot!
>
> Regards,
> Long
>
> Freeman Fang wrote:
>>
>> laolong wrote:
>>> Hi Freeman,
>>>
>>> Thank you for your help.
>>>
>>> So we need to create raw SOAP message in order to pass data instead
>>> of
>>> directly deal with a JavaBean
>>>
>> No, you needn't create raw soap message yourself.
>> The raw soap message you saw in the test case is just a simple way to
>> invoke the cxf se, it's not the key point of that test case. The key
>> point of that test case is cxf se can hold proxy of cxf bc provider so
>> that you can invoke external webservice
>>> io.getInMessage().setContent(new StringSource(
>>> "<message
>>> xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
>>> + "<part> "
>>> + "<greetMe
>>> xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
>>> + "ffang"
>>> + "</requestType></greetMe>"
>>> + "</part> "
>>> + "</message>"));
>>>
>>> For a client which need complexType input(in my case it's a Invoice
>>> object), firstly we may need to get cxfse wsdl from JMX console, then
>>> generate the raw soap message, but I cann't get whole wsdl from jconsole
>>> and
>>> also it cannot be saved to a file, I'm wondering if there is another way
>>> to
>>> get the wsdl? create a http:endpoint?
>>>
>>> Regards,
>>> Long
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>
>>>> Hi Long,
>>>>
>>>> To use cxfse:proxy to invoke external webservice, you need a cxf bc
>>>> provider, take a look at [1], I believe this test case include
>>>> everything you want.
>>>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
>>>> Freeman
>>>> laolong wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> There is a process we need to implement on servicemix: get a CSV
>>>>> file,
>>>>> then parse it and send to external soap services, the question is how
>>>>> to
>>>>> invoke external webservices.
>>>>>
>>>>> I have tried to use a bean su to create CXF client, but looks
>>>>> like
>>>>> it's
>>>>> not supported by servicemix since I have to add some cxf-*.jar to su
>>>>> lib
>>>>> and
>>>>> still get error java.lang.RuntimeException: Could not find conduit
>>>>> initiator
>>>>> for transport http://schemas.xmlsoap.org/soap/http
>>>>>
>>>>> JaxWsProxyFactoryBean factoryBean = new
>>>>> JaxWsProxyFactoryBean();
>>>>> factoryBean.setServiceClass(getServiceClass());
>>>>>
>>>>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>>>>> InvoiceInterface client = (InvoiceInterface)
>>>>> factoryBean.create();
>>>>> client.send(InvoiceObject);
>>>>> ..............
>>>>>
>>>>>
>>>>> Then I found cxfse:proxy could be used to invoke external service,
>>>>> but
>>>>> how to invoke a cxfse:endpoint pojo using a bean su?
>>>>>
>>>>> Please advise. Thanks in advance!
>>>>>
>>>>> Regards,
>>>>> Long
>>>>>
>>>>>
>>>> --
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/how-to-invoke-external-webservices-using-bean-su-or-cxfse%3Aproxy--tp24122028p24158652.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: how to invoke external webservices using bean su or
cxfse:proxy?
Posted by laolong <le...@sina.com>.
Okey, since the request object is complex, I will send the CSV file
content as String to cxfse, then covert it to InvoiceRequest object.
Thanks!
Regards,
Long
Freeman Fang wrote:
>
> Hi Long,
> My comment inline
> laolong wrote:
>> Hi Freeman,
>>
>> Yes, cxfse:proxy is working now, I just have another question :)
>>
>> I want to pass InvoiceRequest object to cxfse from my bean su, how to
>> populate the message content?
>>
>> cxfse pojo as below:
>>
>> private InvoicePortType invoice; //cxfse:proxy
>> .....
>> @WebMethod
>> public InvoiceResponse callInvoice(InvoiceRequest req){
>> return invoice.send(req);
>> }
>> ...........
>>
> Given you just pass the request to cxf bc provider, so I believe you can
> get the schema of InvoiceRequest from the wsdl you used in cxf bc
> provider.
> And another solution is you can simplify the cxf se interface, only send
> some necessary info from your bean to cxf se, then composite the
> InvoiceRequest instance yourself in cxfse (in case the InvoiceRequest is
> too complex)
> something like
> @WebMethod
> public InvoiceResponse callInvoice(int i, String s){
> InvoiceRequest req = new InvoiceRequest();
> req.setI(i);
> req.setS(s);//it depend on your InvoiceRequest schema
> return invoice.send(req);
> }
>
>> Thanks a lot!
>>
>> Regards,
>> Long
>>
>> Freeman Fang wrote:
>>
>>> laolong wrote:
>>>
>>>> Hi Freeman,
>>>>
>>>> Thank you for your help.
>>>>
>>>> So we need to create raw SOAP message in order to pass data instead
>>>> of
>>>> directly deal with a JavaBean
>>>>
>>>>
>>> No, you needn't create raw soap message yourself.
>>> The raw soap message you saw in the test case is just a simple way to
>>> invoke the cxf se, it's not the key point of that test case. The key
>>> point of that test case is cxf se can hold proxy of cxf bc provider so
>>> that you can invoke external webservice
>>>
>>>> io.getInMessage().setContent(new StringSource(
>>>> "<message
>>>> xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
>>>> + "<part> "
>>>> + "<greetMe
>>>> xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
>>>> + "ffang"
>>>> + "</requestType></greetMe>"
>>>> + "</part> "
>>>> + "</message>"));
>>>>
>>>> For a client which need complexType input(in my case it's a Invoice
>>>> object), firstly we may need to get cxfse wsdl from JMX console, then
>>>> generate the raw soap message, but I cann't get whole wsdl from
>>>> jconsole
>>>> and
>>>> also it cannot be saved to a file, I'm wondering if there is another
>>>> way
>>>> to
>>>> get the wsdl? create a http:endpoint?
>>>>
>>>> Regards,
>>>> Long
>>>>
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>
>>>>
>>>>> Hi Long,
>>>>>
>>>>> To use cxfse:proxy to invoke external webservice, you need a cxf bc
>>>>> provider, take a look at [1], I believe this test case include
>>>>> everything you want.
>>>>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
>>>>> Freeman
>>>>> laolong wrote:
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> There is a process we need to implement on servicemix: get a CSV
>>>>>> file,
>>>>>> then parse it and send to external soap services, the question is how
>>>>>> to
>>>>>> invoke external webservices.
>>>>>>
>>>>>> I have tried to use a bean su to create CXF client, but looks
>>>>>> like
>>>>>> it's
>>>>>> not supported by servicemix since I have to add some cxf-*.jar to su
>>>>>> lib
>>>>>> and
>>>>>> still get error java.lang.RuntimeException: Could not find conduit
>>>>>> initiator
>>>>>> for transport http://schemas.xmlsoap.org/soap/http
>>>>>>
>>>>>> JaxWsProxyFactoryBean factoryBean = new
>>>>>> JaxWsProxyFactoryBean();
>>>>>> factoryBean.setServiceClass(getServiceClass());
>>>>>>
>>>>>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>>>>>> InvoiceInterface client = (InvoiceInterface)
>>>>>> factoryBean.create();
>>>>>> client.send(InvoiceObject);
>>>>>> ..............
>>>>>>
>>>>>>
>>>>>> Then I found cxfse:proxy could be used to invoke external
>>>>>> service,
>>>>>> but
>>>>>> how to invoke a cxfse:endpoint pojo using a bean su?
>>>>>>
>>>>>> Please advise. Thanks in advance!
>>>>>>
>>>>>> Regards,
>>>>>> Long
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>> --
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
>
--
View this message in context: http://www.nabble.com/how-to-invoke-external-webservices-using-bean-su-or-cxfse%3Aproxy--tp24122028p24160652.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: how to invoke external webservices using bean su or cxfse:proxy?
Posted by Freeman Fang <fr...@gmail.com>.
Hi Long,
My comment inline
laolong wrote:
> Hi Freeman,
>
> Yes, cxfse:proxy is working now, I just have another question :)
>
> I want to pass InvoiceRequest object to cxfse from my bean su, how to
> populate the message content?
>
> cxfse pojo as below:
>
> private InvoicePortType invoice; //cxfse:proxy
> .....
> @WebMethod
> public InvoiceResponse callInvoice(InvoiceRequest req){
> return invoice.send(req);
> }
> ...........
>
Given you just pass the request to cxf bc provider, so I believe you can
get the schema of InvoiceRequest from the wsdl you used in cxf bc provider.
And another solution is you can simplify the cxf se interface, only send
some necessary info from your bean to cxf se, then composite the
InvoiceRequest instance yourself in cxfse (in case the InvoiceRequest is
too complex)
something like
@WebMethod
public InvoiceResponse callInvoice(int i, String s){
InvoiceRequest req = new InvoiceRequest();
req.setI(i);
req.setS(s);//it depend on your InvoiceRequest schema
return invoice.send(req);
}
> Thanks a lot!
>
> Regards,
> Long
>
> Freeman Fang wrote:
>
>> laolong wrote:
>>
>>> Hi Freeman,
>>>
>>> Thank you for your help.
>>>
>>> So we need to create raw SOAP message in order to pass data instead of
>>> directly deal with a JavaBean
>>>
>>>
>> No, you needn't create raw soap message yourself.
>> The raw soap message you saw in the test case is just a simple way to
>> invoke the cxf se, it's not the key point of that test case. The key
>> point of that test case is cxf se can hold proxy of cxf bc provider so
>> that you can invoke external webservice
>>
>>> io.getInMessage().setContent(new StringSource(
>>> "<message
>>> xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
>>> + "<part> "
>>> + "<greetMe
>>> xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
>>> + "ffang"
>>> + "</requestType></greetMe>"
>>> + "</part> "
>>> + "</message>"));
>>>
>>> For a client which need complexType input(in my case it's a Invoice
>>> object), firstly we may need to get cxfse wsdl from JMX console, then
>>> generate the raw soap message, but I cann't get whole wsdl from jconsole
>>> and
>>> also it cannot be saved to a file, I'm wondering if there is another way
>>> to
>>> get the wsdl? create a http:endpoint?
>>>
>>> Regards,
>>> Long
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>
>>>
>>>> Hi Long,
>>>>
>>>> To use cxfse:proxy to invoke external webservice, you need a cxf bc
>>>> provider, take a look at [1], I believe this test case include
>>>> everything you want.
>>>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
>>>> Freeman
>>>> laolong wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> There is a process we need to implement on servicemix: get a CSV
>>>>> file,
>>>>> then parse it and send to external soap services, the question is how
>>>>> to
>>>>> invoke external webservices.
>>>>>
>>>>> I have tried to use a bean su to create CXF client, but looks like
>>>>> it's
>>>>> not supported by servicemix since I have to add some cxf-*.jar to su
>>>>> lib
>>>>> and
>>>>> still get error java.lang.RuntimeException: Could not find conduit
>>>>> initiator
>>>>> for transport http://schemas.xmlsoap.org/soap/http
>>>>>
>>>>> JaxWsProxyFactoryBean factoryBean = new
>>>>> JaxWsProxyFactoryBean();
>>>>> factoryBean.setServiceClass(getServiceClass());
>>>>>
>>>>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>>>>> InvoiceInterface client = (InvoiceInterface)
>>>>> factoryBean.create();
>>>>> client.send(InvoiceObject);
>>>>> ..............
>>>>>
>>>>>
>>>>> Then I found cxfse:proxy could be used to invoke external service,
>>>>> but
>>>>> how to invoke a cxfse:endpoint pojo using a bean su?
>>>>>
>>>>> Please advise. Thanks in advance!
>>>>>
>>>>> Regards,
>>>>> Long
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> --
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>>
>
>
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
Re: how to invoke external webservices using bean su or
cxfse:proxy?
Posted by laolong <le...@sina.com>.
Hi Freeman,
Yes, cxfse:proxy is working now, I just have another question :)
I want to pass InvoiceRequest object to cxfse from my bean su, how to
populate the message content?
cxfse pojo as below:
private InvoicePortType invoice; //cxfse:proxy
.....
@WebMethod
public InvoiceResponse callInvoice(InvoiceRequest req){
return invoice.send(req);
}
...........
Thanks a lot!
Regards,
Long
Freeman Fang wrote:
>
> laolong wrote:
>> Hi Freeman,
>>
>> Thank you for your help.
>>
>> So we need to create raw SOAP message in order to pass data instead of
>> directly deal with a JavaBean
>>
> No, you needn't create raw soap message yourself.
> The raw soap message you saw in the test case is just a simple way to
> invoke the cxf se, it's not the key point of that test case. The key
> point of that test case is cxf se can hold proxy of cxf bc provider so
> that you can invoke external webservice
>> io.getInMessage().setContent(new StringSource(
>> "<message
>> xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
>> + "<part> "
>> + "<greetMe
>> xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
>> + "ffang"
>> + "</requestType></greetMe>"
>> + "</part> "
>> + "</message>"));
>>
>> For a client which need complexType input(in my case it's a Invoice
>> object), firstly we may need to get cxfse wsdl from JMX console, then
>> generate the raw soap message, but I cann't get whole wsdl from jconsole
>> and
>> also it cannot be saved to a file, I'm wondering if there is another way
>> to
>> get the wsdl? create a http:endpoint?
>>
>> Regards,
>> Long
>>
>>
>>
>> Freeman Fang wrote:
>>
>>> Hi Long,
>>>
>>> To use cxfse:proxy to invoke external webservice, you need a cxf bc
>>> provider, take a look at [1], I believe this test case include
>>> everything you want.
>>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
>>> Freeman
>>> laolong wrote:
>>>
>>>> Hi,
>>>>
>>>> There is a process we need to implement on servicemix: get a CSV
>>>> file,
>>>> then parse it and send to external soap services, the question is how
>>>> to
>>>> invoke external webservices.
>>>>
>>>> I have tried to use a bean su to create CXF client, but looks like
>>>> it's
>>>> not supported by servicemix since I have to add some cxf-*.jar to su
>>>> lib
>>>> and
>>>> still get error java.lang.RuntimeException: Could not find conduit
>>>> initiator
>>>> for transport http://schemas.xmlsoap.org/soap/http
>>>>
>>>> JaxWsProxyFactoryBean factoryBean = new
>>>> JaxWsProxyFactoryBean();
>>>> factoryBean.setServiceClass(getServiceClass());
>>>>
>>>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>>>> InvoiceInterface client = (InvoiceInterface)
>>>> factoryBean.create();
>>>> client.send(InvoiceObject);
>>>> ..............
>>>>
>>>>
>>>> Then I found cxfse:proxy could be used to invoke external service,
>>>> but
>>>> how to invoke a cxfse:endpoint pojo using a bean su?
>>>>
>>>> Please advise. Thanks in advance!
>>>>
>>>> Regards,
>>>> Long
>>>>
>>>>
>>> --
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
>
--
View this message in context: http://www.nabble.com/how-to-invoke-external-webservices-using-bean-su-or-cxfse%3Aproxy--tp24122028p24158612.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: how to invoke external webservices using bean su or cxfse:proxy?
Posted by Freeman Fang <fr...@gmail.com>.
laolong wrote:
> Hi Freeman,
>
> Thank you for your help.
>
> So we need to create raw SOAP message in order to pass data instead of
> directly deal with a JavaBean
>
No, you needn't create raw soap message yourself.
The raw soap message you saw in the test case is just a simple way to
invoke the cxf se, it's not the key point of that test case. The key
point of that test case is cxf se can hold proxy of cxf bc provider so
that you can invoke external webservice
> io.getInMessage().setContent(new StringSource(
> "<message
> xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
> + "<part> "
> + "<greetMe
> xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
> + "ffang"
> + "</requestType></greetMe>"
> + "</part> "
> + "</message>"));
>
> For a client which need complexType input(in my case it's a Invoice
> object), firstly we may need to get cxfse wsdl from JMX console, then
> generate the raw soap message, but I cann't get whole wsdl from jconsole and
> also it cannot be saved to a file, I'm wondering if there is another way to
> get the wsdl? create a http:endpoint?
>
> Regards,
> Long
>
>
>
> Freeman Fang wrote:
>
>> Hi Long,
>>
>> To use cxfse:proxy to invoke external webservice, you need a cxf bc
>> provider, take a look at [1], I believe this test case include
>> everything you want.
>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
>> Freeman
>> laolong wrote:
>>
>>> Hi,
>>>
>>> There is a process we need to implement on servicemix: get a CSV
>>> file,
>>> then parse it and send to external soap services, the question is how to
>>> invoke external webservices.
>>>
>>> I have tried to use a bean su to create CXF client, but looks like
>>> it's
>>> not supported by servicemix since I have to add some cxf-*.jar to su lib
>>> and
>>> still get error java.lang.RuntimeException: Could not find conduit
>>> initiator
>>> for transport http://schemas.xmlsoap.org/soap/http
>>>
>>> JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
>>> factoryBean.setServiceClass(getServiceClass());
>>>
>>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>>> InvoiceInterface client = (InvoiceInterface)
>>> factoryBean.create();
>>> client.send(InvoiceObject);
>>> ..............
>>>
>>>
>>> Then I found cxfse:proxy could be used to invoke external service,
>>> but
>>> how to invoke a cxfse:endpoint pojo using a bean su?
>>>
>>> Please advise. Thanks in advance!
>>>
>>> Regards,
>>> Long
>>>
>>>
>> --
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>>
>>
>
>
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
Re: how to invoke external webservices using bean su or
cxfse:proxy?
Posted by laolong <le...@sina.com>.
Hi Freeman,
Thank you for your help.
So we need to create raw SOAP message in order to pass data instead of
directly deal with a JavaBean
io.getInMessage().setContent(new StringSource(
"<message
xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+ "<part> "
+ "<greetMe
xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
+ "ffang"
+ "</requestType></greetMe>"
+ "</part> "
+ "</message>"));
For a client which need complexType input(in my case it's a Invoice
object), firstly we may need to get cxfse wsdl from JMX console, then
generate the raw soap message, but I cann't get whole wsdl from jconsole and
also it cannot be saved to a file, I'm wondering if there is another way to
get the wsdl? create a http:endpoint?
Regards,
Long
Freeman Fang wrote:
>
> Hi Long,
>
> To use cxfse:proxy to invoke external webservice, you need a cxf bc
> provider, take a look at [1], I believe this test case include
> everything you want.
> [1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
> Freeman
> laolong wrote:
>> Hi,
>>
>> There is a process we need to implement on servicemix: get a CSV
>> file,
>> then parse it and send to external soap services, the question is how to
>> invoke external webservices.
>>
>> I have tried to use a bean su to create CXF client, but looks like
>> it's
>> not supported by servicemix since I have to add some cxf-*.jar to su lib
>> and
>> still get error java.lang.RuntimeException: Could not find conduit
>> initiator
>> for transport http://schemas.xmlsoap.org/soap/http
>>
>> JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
>> factoryBean.setServiceClass(getServiceClass());
>>
>> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
>> InvoiceInterface client = (InvoiceInterface)
>> factoryBean.create();
>> client.send(InvoiceObject);
>> ..............
>>
>>
>> Then I found cxfse:proxy could be used to invoke external service,
>> but
>> how to invoke a cxfse:endpoint pojo using a bean su?
>>
>> Please advise. Thanks in advance!
>>
>> Regards,
>> Long
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
>
--
View this message in context: http://www.nabble.com/how-to-invoke-external-webservices-using-bean-su-or-cxfse%3Aproxy--tp24122028p24158451.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: how to invoke external webservices using bean su or cxfse:proxy?
Posted by Freeman Fang <fr...@gmail.com>.
Hi Long,
To use cxfse:proxy to invoke external webservice, you need a cxf bc
provider, take a look at [1], I believe this test case include
everything you want.
[1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java
Freeman
laolong wrote:
> Hi,
>
> There is a process we need to implement on servicemix: get a CSV file,
> then parse it and send to external soap services, the question is how to
> invoke external webservices.
>
> I have tried to use a bean su to create CXF client, but looks like it's
> not supported by servicemix since I have to add some cxf-*.jar to su lib and
> still get error java.lang.RuntimeException: Could not find conduit initiator
> for transport http://schemas.xmlsoap.org/soap/http
>
> JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
> factoryBean.setServiceClass(getServiceClass());
>
> factoryBean.setAddress("http://192.168.80.111:8080/soapservices/invoice");
> InvoiceInterface client = (InvoiceInterface) factoryBean.create();
> client.send(InvoiceObject);
> ..............
>
>
> Then I found cxfse:proxy could be used to invoke external service, but
> how to invoke a cxfse:endpoint pojo using a bean su?
>
> Please advise. Thanks in advance!
>
> Regards,
> Long
>
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com