You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Fullocto <br...@fr.thalesgroup.com> on 2008/07/07 16:17:36 UTC

Create an external JBI webservice client

Hello all;

Yesterday I was thinking about my JBI ESB and my webservices that use soap
to connect to the ESB.
And I was asking why I am using SOAP?

If  I know I am going to use an ESB as the backbone for our SOA, I may want
my external services to use JBI binding. For example my client will use
JBI/HTTP to contact a binding component consumer, and this one will only
have to read the header (especially if we use WS addressing) and it can copy
the message using streaming without any modifications. So it will improve
the performance. (and it would be the same for the server with a bc
provider)

I think it is possible because servicemix team has already created the JBI
binding (and transport) for the CXF SOAP stack. But I don't know if I can
already create such a client/server using WSDL 2 java tools (I need to
change the binding information in wsdl?)

Moreover the HTTP BC could be able to transfer the XML(JBI) payload to the
JBI environment.

Do you think it is possible?



-- 
View this message in context: http://www.nabble.com/Create-an-external-JBI-webservice-client-tp18317605p18317605.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Create an external JBI webservice client

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
You can use jbi binding for your standalone client by
JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
cf.setServiceName(getService());
cf.setServiceClass(type);
cf.setBindingId(org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);

But I think cxf bc consumer can't handle the incoming outside jbi 
binding request  message so far. The design for cxf bc consumer is 
receive outside soap message and transform or not transform it to  jbi 
message.

Best Regards
Freeman

Fullocto wrote:
> In fact what I'd like to do, it's generate a webservice client from a wsdl
> that will not send
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> <soap:Body>
> <ns2:addRequest xmlns:ns2="http://brice.mycompany.com/calculator">
> <nb1>20</nb1>
> <nb2>8</nb2>
> </ns2:addRequest>
> </soap:Body>
> </soap:Envelope>
>
> but 
>
> <jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
> xmlns:msg="http://brice.mycompany.com/calculator"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> name="addRequest" type="msg:addRequest" version="1.0">
> <jbi:part>
> <ns2:addRequest xmlns:ns2="http://brice.mycompany.com/calculator">
> <nb1>20</nb1>
> <nb2>8</nb2>
> </ns2:addRequest>
> </jbi:part>
> </jbi:message>
>
> and I want then the BC to send directly this message to the NMR
> I will try to change the binding to JBI in the wsdl 
>
>   


Re: Create an external JBI webservice client

Posted by Fullocto <br...@fr.thalesgroup.com>.
In fact what I'd like to do, it's generate a webservice client from a wsdl
that will not send

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<ns2:addRequest xmlns:ns2="http://brice.mycompany.com/calculator">
<nb1>20</nb1>
<nb2>8</nb2>
</ns2:addRequest>
</soap:Body>
</soap:Envelope>

but 

<jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://brice.mycompany.com/calculator"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
name="addRequest" type="msg:addRequest" version="1.0">
<jbi:part>
<ns2:addRequest xmlns:ns2="http://brice.mycompany.com/calculator">
<nb1>20</nb1>
<nb2>8</nb2>
</ns2:addRequest>
</jbi:part>
</jbi:message>

and I want then the BC to send directly this message to the NMR
I will try to change the binding to JBI in the wsdl 

-- 
View this message in context: http://www.nabble.com/Create-an-external-JBI-webservice-client-tp18317605p18342541.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Create an external JBI webservice client

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Jul 7, 2008 at 8:17 AM, Fullocto <br...@fr.thalesgroup.com> wrote:
>
> Hello all;
>
> Yesterday I was thinking about my JBI ESB and my webservices that use soap
> to connect to the ESB.
> And I was asking why I am using SOAP?
>
> If  I know I am going to use an ESB as the backbone for our SOA, I may want
> my external services to use JBI binding. For example my client will use
> JBI/HTTP to contact a binding component consumer, and this one will only
> have to read the header (especially if we use WS addressing) and it can copy
> the message using streaming without any modifications. So it will improve
> the performance. (and it would be the same for the server with a bc
> provider)
>
> I think it is possible because servicemix team has already created the JBI
> binding (and transport) for the CXF SOAP stack. But I don't know if I can
> already create such a client/server using WSDL 2 java tools (I need to
> change the binding information in wsdl?)
>
> Moreover the HTTP BC could be able to transfer the XML(JBI) payload to the
> JBI environment.
>
> Do you think it is possible?

I'm not completely following your description above, but I think
you're suggesting the use of a non-SOAP client sending messages to SMX
and then going through the servicemix-cxf-bc to contact an external
web service. If this is what you're suggesting, then yes, this is
completely possible.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/