[servicemix-user] WSDL and JMS

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[servicemix-user] WSDL and JMS

nsowatsk
Hi

I have some WSDL files bound to JMS and some XSDs that I'd like to  
work with using Servicemix. Is there a simple example that could get  
me started please?

Many thanks

Nathan

Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
+34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: [servicemix-user] WSDL and JMS

Scott Luttenberg
I have been playing with WSDL and JAX-WS in SM.  I got V 2.0 to work -
or at least come up with my WSDL configured in.  Take a look at this
link.  It helped me to get started.

http://servicemix.org/JAX+WS

I did need several jar files included in my SM lib before I could get SM
to come up.  They are:


http jar 20051026
jaxb-api jar 20051026
jaxb-impl jar 20051026
jaxb-xjc jar 20051026
jaxws-api jar 20051026
jaxws-rt jar 20051026
jsr181-api jar 20051026
jsr250-api jar 20051026
saaj-api jar 20051026
saaj-impl jar 20051026
sjsxp jar 20051026

and can be found at: http://dist.codehaus.org/servicemix/jars/

Load these into your servermix/lib.  I followed the config as per the
example at SM JAX-WS example (SM calling a WSDL) but I have not been
able to test the connection yet - I am running into probs using the JBI
API in a SWING client app.  It seems that I am missing a fair number of
jars and I am running into them one at a time (painful for me and those
who are helping me on this email-list - many thanks to them!!)

Good luck!!
Scott

-----Original Message-----
From: Nathan Sowatskey [mailto:[hidden email]]
Sent: Tuesday, November 08, 2005 5:32 AM
To: [hidden email]
Subject: [servicemix-user] WSDL and JMS

Hi

I have some WSDL files bound to JMS and some XSDs that I'd like to  
work with using Servicemix. Is there a simple example that could get  
me started please?

Many thanks

Nathan

Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
+34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

Dan Diephouse-2
In reply to this post by nsowatsk
Nathan Sowatskey wrote:

> Hi
>
> I have some WSDL files bound to JMS and some XSDs that I'd like to  
> work with using Servicemix. Is there a simple example that could get  
> me started please?
>
> Many thanks
>
> Nathan
>
> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [hidden email]

I don't know if simple, wsdl, and jms can be used in the same sentence. :-)

Its not clear to me what you are trying to do. Are you trying to create
a servicemix component to access your services?  Or are you trying to
create a new service with your xsd's that will be exposed through a soap
binding via ServiceMix?

--
Dan Diephouse
Envoi Solutions LLC
http://netzooid.com

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

nsowatsk
Hi

I'll be clearer, I hope.

The WSDL and XSD files define some messages and a data model.

I will need to instantiate the SOAP envelope from the WSDL, populate  
the body with data based on the XSD, and then send that as a text  
message via JMS to a queue, subject and web service end-point as  
three distinct examples.

This link (http://servicemix.org/JAX+WS) addresses the last part,  
i.e. turning a message into an invocation, so that's fairly easy.  
Subjects and queues are also.

I was really looking for examples of creating a message from the WSDL  
and populating it. The actual JMS part is straightforward, but the  
best way to create a text message from WSDL and data based on an XSD  
eludes me.

I hope that is a little clearer :-)

Regards

Nathan

Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
+34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [hidden email]

On 8 Nov 2005, at 21:26, Dan Diephouse wrote:

> Nathan Sowatskey wrote:
>
>> Hi
>>
>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>> to  work with using Servicemix. Is there a simple example that  
>> could get  me started please?
>>
>> Many thanks
>>
>> Nathan
>>
>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>> [hidden email]
>
> I don't know if simple, wsdl, and jms can be used in the same  
> sentence. :-)
>
> Its not clear to me what you are trying to do. Are you trying to  
> create a servicemix component to access your services?  Or are you  
> trying to create a new service with your xsd's that will be exposed  
> through a soap binding via ServiceMix?
>
> --
> Dan Diephouse
> Envoi Solutions LLC
> http://netzooid.com
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

James Strachan-4
BTW in your previous mail the sentence...

>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>> to  work with using Servicemix. Is there a simple example that  
>>> could get  me started please?

the WSIF framework defines a mapping in WSDL to JMS

e,g.

http://servicemix.org/WSIF

which shows how a WSDL can be bound to ServiceMix which can then use  
JMS as the transport.

Or the SOAP stacks themselves (JAX-WS / Axis / XFire / ActiveSOAP )  
can use JMS or JBI, then JMS as their transport...


On 9 Nov 2005, at 12:40, Nathan Sowatskey wrote:

> Hi
>
> I'll be clearer, I hope.
>
> The WSDL and XSD files define some messages and a data model.
>
> I will need to instantiate the SOAP envelope from the WSDL,  
> populate the body with data based on the XSD, and then send that as  
> a text message via JMS to a queue, subject and web service end-
> point as three distinct examples.
>
> This link (http://servicemix.org/JAX+WS) addresses the last part,  
> i.e. turning a message into an invocation, so that's fairly easy.  
> Subjects and queues are also.
>
> I was really looking for examples of creating a message from the  
> WSDL and populating it. The actual JMS part is straightforward, but  
> the best way to create a text message from WSDL and data based on  
> an XSD eludes me.
>
> I hope that is a little clearer :-)

Yes :)

So I guess you want to use some JAX-WS stack then use its client to  
populate the message body & perform the SOAP stuff. Create the JAXB 2  
POJOs from the WSDL/XSD using JAX-WS and use those to make a SOAP  
invocation. Then wire in either the SOAP stacks native JMS transport  
or use ServiceMix as the transport layer in the SOAP stack.

We've not yet wired ServiceMix into the JAX-WS RI as the client side  
transport; as its not pluggable right now in the RI - its hard-wired  
to HTTP :(. As soon as Celtix supports enough of JAX-WS for us we can  
certainly wire that in pretty easily (will test that shortly); plus  
there's XFire which has some of JAX-WS support now (certainly the JSR  
181 stuff and JAXB 2) - ditto ActiveSOAP has JAXB 2 support which you  
could use as well.

The other option is you forget about the JAX-WS interfaces for  
service invocations and just send Java objects into ServiceMix using  
the ServiceMix client and a JAXB 2 marshaller

http://servicemix.org/Client+API

Which is a bit more message-centric. Its probably simpler from a  
developer perspective to stick to a JAX-WS / JSR 181 style  
development from a WSDL though.

James

>
> Regards
>
> Nathan
>
> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
> [hidden email]
>
> On 8 Nov 2005, at 21:26, Dan Diephouse wrote:
>
>> Nathan Sowatskey wrote:
>>
>>> Hi
>>>
>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>> to  work with using Servicemix. Is there a simple example that  
>>> could get  me started please?
>>>
>>> Many thanks
>>>
>>> Nathan
>>>
>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>> [hidden email]
>>
>> I don't know if simple, wsdl, and jms can be used in the same  
>> sentence. :-)
>>
>> Its not clear to me what you are trying to do. Are you trying to  
>> create a servicemix component to access your services?  Or are you  
>> trying to create a new service with your xsd's that will be  
>> exposed through a soap binding via ServiceMix?
>>
>> --
>> Dan Diephouse
>> Envoi Solutions LLC
>> http://netzooid.com


James Strachan
Chief Architect
LogicBlaze, Inc. - a Simula Labs Enterprise
[hidden email]
www.logicblaze.com

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

James Strachan-4
BTW if you want, you could just stick at the JAXB 2 / XSD layer and  
ignore the WSDLs and just auto-generate the POJOs from the XSDs and  
pass them around using the ServiceMixClient using JAXBSource as the  
value to pass into the NormalizedMessage.setContent().

e.g.

Object bodyPojos = ...; // whatever JAXB POJOs you're using
JAXBSource content = new JAXBSource(jaxbContext, bodyPojojs);

// now lets make a one way invocation...
ServiceMixClient client = ...;
InOnly exchange = client.createInOnlyExchange();

NormalizedMessage message = exchange.getInMessage();
message.setContent(content);

client.send(exchange);


For more details see...
http://servicemix.org/Client+API

On 9 Nov 2005, at 14:21, James Strachan wrote:

> BTW in your previous mail the sentence...
>
>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>> to  work with using Servicemix. Is there a simple example that  
>>>> could get  me started please?
>
> the WSIF framework defines a mapping in WSDL to JMS
>
> e,g.
>
> http://servicemix.org/WSIF
>
> which shows how a WSDL can be bound to ServiceMix which can then  
> use JMS as the transport.
>
> Or the SOAP stacks themselves (JAX-WS / Axis / XFire / ActiveSOAP )  
> can use JMS or JBI, then JMS as their transport...
>
>
> On 9 Nov 2005, at 12:40, Nathan Sowatskey wrote:
>> Hi
>>
>> I'll be clearer, I hope.
>>
>> The WSDL and XSD files define some messages and a data model.
>>
>> I will need to instantiate the SOAP envelope from the WSDL,  
>> populate the body with data based on the XSD, and then send that  
>> as a text message via JMS to a queue, subject and web service end-
>> point as three distinct examples.
>>
>> This link (http://servicemix.org/JAX+WS) addresses the last part,  
>> i.e. turning a message into an invocation, so that's fairly easy.  
>> Subjects and queues are also.
>>
>> I was really looking for examples of creating a message from the  
>> WSDL and populating it. The actual JMS part is straightforward,  
>> but the best way to create a text message from WSDL and data based  
>> on an XSD eludes me.
>>
>> I hope that is a little clearer :-)
>
> Yes :)
>
> So I guess you want to use some JAX-WS stack then use its client to  
> populate the message body & perform the SOAP stuff. Create the JAXB  
> 2 POJOs from the WSDL/XSD using JAX-WS and use those to make a SOAP  
> invocation. Then wire in either the SOAP stacks native JMS  
> transport or use ServiceMix as the transport layer in the SOAP stack.
>
> We've not yet wired ServiceMix into the JAX-WS RI as the client  
> side transport; as its not pluggable right now in the RI - its hard-
> wired to HTTP :(. As soon as Celtix supports enough of JAX-WS for  
> us we can certainly wire that in pretty easily (will test that  
> shortly); plus there's XFire which has some of JAX-WS support now  
> (certainly the JSR 181 stuff and JAXB 2) - ditto ActiveSOAP has  
> JAXB 2 support which you could use as well.
>
> The other option is you forget about the JAX-WS interfaces for  
> service invocations and just send Java objects into ServiceMix  
> using the ServiceMix client and a JAXB 2 marshaller
>
> http://servicemix.org/Client+API
>
> Which is a bit more message-centric. Its probably simpler from a  
> developer perspective to stick to a JAX-WS / JSR 181 style  
> development from a WSDL though.
>
> James
>
>>
>> Regards
>>
>> Nathan
>>
>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>> [hidden email]
>>
>> On 8 Nov 2005, at 21:26, Dan Diephouse wrote:
>>
>>> Nathan Sowatskey wrote:
>>>
>>>> Hi
>>>>
>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>> to  work with using Servicemix. Is there a simple example that  
>>>> could get  me started please?
>>>>
>>>> Many thanks
>>>>
>>>> Nathan
>>>>
>>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>>> [hidden email]
>>>
>>> I don't know if simple, wsdl, and jms can be used in the same  
>>> sentence. :-)
>>>
>>> Its not clear to me what you are trying to do. Are you trying to  
>>> create a servicemix component to access your services?  Or are  
>>> you trying to create a new service with your xsd's that will be  
>>> exposed through a soap binding via ServiceMix?
>>>
>>> --
>>> Dan Diephouse
>>> Envoi Solutions LLC
>>> http://netzooid.com
>
>
> James Strachan
> Chief Architect
> LogicBlaze, Inc. - a Simula Labs Enterprise
> [hidden email]
> www.logicblaze.com
>


James Strachan
Chief Architect
LogicBlaze, Inc. - a Simula Labs Enterprise
[hidden email]
www.logicblaze.com

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

James Strachan-4

On 9 Nov 2005, at 15:25, James Strachan wrote:

> BTW if you want, you could just stick at the JAXB 2 / XSD layer and  
> ignore the WSDLs and just auto-generate the POJOs from the XSDs and  
> pass them around using the ServiceMixClient using JAXBSource as the  
> value to pass into the NormalizedMessage.setContent().
>
> e.g.
>
> Object bodyPojos = ...; // whatever JAXB POJOs you're using
> JAXBSource content = new JAXBSource(jaxbContext, bodyPojojs);
>
> // now lets make a one way invocation...
> ServiceMixClient client = ...;
> InOnly exchange = client.createInOnlyExchange();
>
> NormalizedMessage message = exchange.getInMessage();
> message.setContent(content);
>
> client.send(exchange);

BTW I got by request & send methods mixed up; send() is for one-ways,  
request() is for request/responses.



Now in SVN HEAD there is a JAXBMarshaler, so we can simplify this  
much further to be...

// setup the client with a JAXBMarshaler...
ServiceMixClient client = new DefaultServiceMixClient(jbiContainer,  
jaxbMarshaler);


// now lets make a one way invocation

Object arguments = ...; // whatever JAXB POJOs you're using
Map messageProperties = null;
client.send(messageProperties, arguments);


// lets perform a synchronous request/response instead
Object result = client.request(messageProperties, arguments)

which is much simpler



James

>
>
> For more details see...
> http://servicemix.org/Client+API
>
> On 9 Nov 2005, at 14:21, James Strachan wrote:
>
>> BTW in your previous mail the sentence...
>>
>>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>>> to  work with using Servicemix. Is there a simple example that  
>>>>> could get  me started please?
>>
>> the WSIF framework defines a mapping in WSDL to JMS
>>
>> e,g.
>>
>> http://servicemix.org/WSIF
>>
>> which shows how a WSDL can be bound to ServiceMix which can then  
>> use JMS as the transport.
>>
>> Or the SOAP stacks themselves (JAX-WS / Axis / XFire /  
>> ActiveSOAP ) can use JMS or JBI, then JMS as their transport...
>>
>>
>> On 9 Nov 2005, at 12:40, Nathan Sowatskey wrote:
>>> Hi
>>>
>>> I'll be clearer, I hope.
>>>
>>> The WSDL and XSD files define some messages and a data model.
>>>
>>> I will need to instantiate the SOAP envelope from the WSDL,  
>>> populate the body with data based on the XSD, and then send that  
>>> as a text message via JMS to a queue, subject and web service end-
>>> point as three distinct examples.
>>>
>>> This link (http://servicemix.org/JAX+WS) addresses the last part,  
>>> i.e. turning a message into an invocation, so that's fairly easy.  
>>> Subjects and queues are also.
>>>
>>> I was really looking for examples of creating a message from the  
>>> WSDL and populating it. The actual JMS part is straightforward,  
>>> but the best way to create a text message from WSDL and data  
>>> based on an XSD eludes me.
>>>
>>> I hope that is a little clearer :-)
>>
>> Yes :)
>>
>> So I guess you want to use some JAX-WS stack then use its client  
>> to populate the message body & perform the SOAP stuff. Create the  
>> JAXB 2 POJOs from the WSDL/XSD using JAX-WS and use those to make  
>> a SOAP invocation. Then wire in either the SOAP stacks native JMS  
>> transport or use ServiceMix as the transport layer in the SOAP stack.
>>
>> We've not yet wired ServiceMix into the JAX-WS RI as the client  
>> side transport; as its not pluggable right now in the RI - its  
>> hard-wired to HTTP :(. As soon as Celtix supports enough of JAX-WS  
>> for us we can certainly wire that in pretty easily (will test that  
>> shortly); plus there's XFire which has some of JAX-WS support now  
>> (certainly the JSR 181 stuff and JAXB 2) - ditto ActiveSOAP has  
>> JAXB 2 support which you could use as well.
>>
>> The other option is you forget about the JAX-WS interfaces for  
>> service invocations and just send Java objects into ServiceMix  
>> using the ServiceMix client and a JAXB 2 marshaller
>>
>> http://servicemix.org/Client+API
>>
>> Which is a bit more message-centric. Its probably simpler from a  
>> developer perspective to stick to a JAX-WS / JSR 181 style  
>> development from a WSDL though.
>>
>> James
>>
>>>
>>> Regards
>>>
>>> Nathan
>>>
>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>> [hidden email]
>>>
>>> On 8 Nov 2005, at 21:26, Dan Diephouse wrote:
>>>
>>>> Nathan Sowatskey wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>>> to  work with using Servicemix. Is there a simple example that  
>>>>> could get  me started please?
>>>>>
>>>>> Many thanks
>>>>>
>>>>> Nathan
>>>>>
>>>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>>>> [hidden email]
>>>>
>>>> I don't know if simple, wsdl, and jms can be used in the same  
>>>> sentence. :-)
>>>>
>>>> Its not clear to me what you are trying to do. Are you trying to  
>>>> create a servicemix component to access your services?  Or are  
>>>> you trying to create a new service with your xsd's that will be  
>>>> exposed through a soap binding via ServiceMix?
>>>>
>>>> --
>>>> Dan Diephouse
>>>> Envoi Solutions LLC
>>>> http://netzooid.com
>>
>>
>> James Strachan
>> Chief Architect
>> LogicBlaze, Inc. - a Simula Labs Enterprise
>> [hidden email]
>> www.logicblaze.com
>>
>
>
> James Strachan
> Chief Architect
> LogicBlaze, Inc. - a Simula Labs Enterprise
> [hidden email]
> www.logicblaze.com
>


James Strachan
Chief Architect
LogicBlaze, Inc. - a Simula Labs Enterprise
[hidden email]
www.logicblaze.com

Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

nsowatsk
In reply to this post by James Strachan-4
James

Many thanks for the pointers. I will pursue these this afternoon.

I did want to raise a philosophical point about JAXB though. To my  
mind, and that of others (see http://www.iona.com/hyplan/vinoski/pdfs/ 
IEEE-RPC_Under_Fire.pdf and the HP paper that Steve V refers to),  
JAXB is akin to the early days of automated OO/Relational mapping  
tools. There are data representations in both that do not have an  
automated mapping to the other. Consequently, I'd prefer not to have  
JAXB in the mix automatically, I'd rather work at the level of the  
XML rather than POJOs, and let the message clients decide if and how  
to translate from one to the other.

I am not sure yet whether this simplifies or complicates matters :-)

Regards

Nathan

Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
+34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [hidden email]

On 9 Nov 2005, at 16:25, James Strachan wrote:

> BTW if you want, you could just stick at the JAXB 2 / XSD layer and  
> ignore the WSDLs and just auto-generate the POJOs from the XSDs and  
> pass them around using the ServiceMixClient using JAXBSource as the  
> value to pass into the NormalizedMessage.setContent().
>
> e.g.
>
> Object bodyPojos = ...; // whatever JAXB POJOs you're using
> JAXBSource content = new JAXBSource(jaxbContext, bodyPojojs);
>
> // now lets make a one way invocation...
> ServiceMixClient client = ...;
> InOnly exchange = client.createInOnlyExchange();
>
> NormalizedMessage message = exchange.getInMessage();
> message.setContent(content);
>
> client.send(exchange);
>
>
> For more details see...
> http://servicemix.org/Client+API
>
> On 9 Nov 2005, at 14:21, James Strachan wrote:
>
>> BTW in your previous mail the sentence...
>>
>>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>>> to  work with using Servicemix. Is there a simple example that  
>>>>> could get  me started please?
>>
>> the WSIF framework defines a mapping in WSDL to JMS
>>
>> e,g.
>>
>> http://servicemix.org/WSIF
>>
>> which shows how a WSDL can be bound to ServiceMix which can then  
>> use JMS as the transport.
>>
>> Or the SOAP stacks themselves (JAX-WS / Axis / XFire /  
>> ActiveSOAP ) can use JMS or JBI, then JMS as their transport...
>>
>>
>> On 9 Nov 2005, at 12:40, Nathan Sowatskey wrote:
>>> Hi
>>>
>>> I'll be clearer, I hope.
>>>
>>> The WSDL and XSD files define some messages and a data model.
>>>
>>> I will need to instantiate the SOAP envelope from the WSDL,  
>>> populate the body with data based on the XSD, and then send that  
>>> as a text message via JMS to a queue, subject and web service end-
>>> point as three distinct examples.
>>>
>>> This link (http://servicemix.org/JAX+WS) addresses the last part,  
>>> i.e. turning a message into an invocation, so that's fairly easy.  
>>> Subjects and queues are also.
>>>
>>> I was really looking for examples of creating a message from the  
>>> WSDL and populating it. The actual JMS part is straightforward,  
>>> but the best way to create a text message from WSDL and data  
>>> based on an XSD eludes me.
>>>
>>> I hope that is a little clearer :-)
>>
>> Yes :)
>>
>> So I guess you want to use some JAX-WS stack then use its client  
>> to populate the message body & perform the SOAP stuff. Create the  
>> JAXB 2 POJOs from the WSDL/XSD using JAX-WS and use those to make  
>> a SOAP invocation. Then wire in either the SOAP stacks native JMS  
>> transport or use ServiceMix as the transport layer in the SOAP stack.
>>
>> We've not yet wired ServiceMix into the JAX-WS RI as the client  
>> side transport; as its not pluggable right now in the RI - its  
>> hard-wired to HTTP :(. As soon as Celtix supports enough of JAX-WS  
>> for us we can certainly wire that in pretty easily (will test that  
>> shortly); plus there's XFire which has some of JAX-WS support now  
>> (certainly the JSR 181 stuff and JAXB 2) - ditto ActiveSOAP has  
>> JAXB 2 support which you could use as well.
>>
>> The other option is you forget about the JAX-WS interfaces for  
>> service invocations and just send Java objects into ServiceMix  
>> using the ServiceMix client and a JAXB 2 marshaller
>>
>> http://servicemix.org/Client+API
>>
>> Which is a bit more message-centric. Its probably simpler from a  
>> developer perspective to stick to a JAX-WS / JSR 181 style  
>> development from a WSDL though.
>>
>> James
>>
>>>
>>> Regards
>>>
>>> Nathan
>>>
>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>> [hidden email]
>>>
>>> On 8 Nov 2005, at 21:26, Dan Diephouse wrote:
>>>
>>>> Nathan Sowatskey wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I have some WSDL files bound to JMS and some XSDs that I'd like  
>>>>> to  work with using Servicemix. Is there a simple example that  
>>>>> could get  me started please?
>>>>>
>>>>> Many thanks
>>>>>
>>>>> Nathan
>>>>>
>>>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>>>> [hidden email]
>>>>
>>>> I don't know if simple, wsdl, and jms can be used in the same  
>>>> sentence. :-)
>>>>
>>>> Its not clear to me what you are trying to do. Are you trying to  
>>>> create a servicemix component to access your services?  Or are  
>>>> you trying to create a new service with your xsd's that will be  
>>>> exposed through a soap binding via ServiceMix?
>>>>
>>>> --
>>>> Dan Diephouse
>>>> Envoi Solutions LLC
>>>> http://netzooid.com
>>
>>
>> James Strachan
>> Chief Architect
>> LogicBlaze, Inc. - a Simula Labs Enterprise
>> [hidden email]
>> www.logicblaze.com
>>
>
>
> James Strachan
> Chief Architect
> LogicBlaze, Inc. - a Simula Labs Enterprise
> [hidden email]
> www.logicblaze.com
Reply | Threaded
Open this post in threaded view
|

Re: [servicemix-user] WSDL and JMS

James Strachan-4

On 10 Nov 2005, at 08:27, Nathan Sowatskey wrote:

> James
>
> Many thanks for the pointers. I will pursue these this afternoon.
>
> I did want to raise a philosophical point about JAXB though. To my  
> mind, and that of others (see http://www.iona.com/hyplan/vinoski/ 
> pdfs/IEEE-RPC_Under_Fire.pdf and the HP paper that Steve V refers  
> to), JAXB is akin to the early days of automated OO/Relational  
> mapping tools. There are data representations in both that do not  
> have an automated mapping to the other. Consequently, I'd prefer  
> not to have JAXB in the mix automatically, I'd rather work at the  
> level of the XML rather than POJOs, and let the message clients  
> decide if and how to translate from one to the other.

Thats true of JAXB 1.0, its not of JAXB 2.0. JAXB 2.0 fully supports  
XSDs; its actually the most efficient possible Java representation of  
typed XML; so if you want a 'DOMish' model, JAXB 2 is the best thing  
to use.

However if you wanna work with DOM, StAX, SAX or just Strings, thats  
fine with me too - just specify whatever TrAX Source object you wish  
on the NormalizedMessage.

> I am not sure yet whether this simplifies or complicates matters :-)

:)

One of the biggest challenges with XML is there's so many ways of  
working with it. When writing business logic type stuff, my  
preference is for JAXB 2; it is only used for the *data* so has  
nothing to do with RPC versus message based, sync versus async etc.  
JAXB 2 can just marshall the payload into and out of a transport in a  
cross-platform and cross technology way. But by all means use the  
best tool for the job. If you wanna create some test harness; then a  
few text files generally do the trick :)

James

>
> Regards
>
> Nathan
>
> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
> [hidden email]
>
> On 9 Nov 2005, at 16:25, James Strachan wrote:
>
>> BTW if you want, you could just stick at the JAXB 2 / XSD layer  
>> and ignore the WSDLs and just auto-generate the POJOs from the  
>> XSDs and pass them around using the ServiceMixClient using  
>> JAXBSource as the value to pass into the  
>> NormalizedMessage.setContent().
>>
>> e.g.
>>
>> Object bodyPojos = ...; // whatever JAXB POJOs you're using
>> JAXBSource content = new JAXBSource(jaxbContext, bodyPojojs);
>>
>> // now lets make a one way invocation...
>> ServiceMixClient client = ...;
>> InOnly exchange = client.createInOnlyExchange();
>>
>> NormalizedMessage message = exchange.getInMessage();
>> message.setContent(content);
>>
>> client.send(exchange);
>>
>>
>> For more details see...
>> http://servicemix.org/Client+API
>>
>> On 9 Nov 2005, at 14:21, James Strachan wrote:
>>
>>> BTW in your previous mail the sentence...
>>>
>>>>>> I have some WSDL files bound to JMS and some XSDs that I'd  
>>>>>> like to  work with using Servicemix. Is there a simple example  
>>>>>> that could get  me started please?
>>>
>>> the WSIF framework defines a mapping in WSDL to JMS
>>>
>>> e,g.
>>>
>>> http://servicemix.org/WSIF
>>>
>>> which shows how a WSDL can be bound to ServiceMix which can then  
>>> use JMS as the transport.
>>>
>>> Or the SOAP stacks themselves (JAX-WS / Axis / XFire /  
>>> ActiveSOAP ) can use JMS or JBI, then JMS as their transport...
>>>
>>>
>>> On 9 Nov 2005, at 12:40, Nathan Sowatskey wrote:
>>>> Hi
>>>>
>>>> I'll be clearer, I hope.
>>>>
>>>> The WSDL and XSD files define some messages and a data model.
>>>>
>>>> I will need to instantiate the SOAP envelope from the WSDL,  
>>>> populate the body with data based on the XSD, and then send that  
>>>> as a text message via JMS to a queue, subject and web service  
>>>> end-point as three distinct examples.
>>>>
>>>> This link (http://servicemix.org/JAX+WS) addresses the last  
>>>> part, i.e. turning a message into an invocation, so that's  
>>>> fairly easy. Subjects and queues are also.
>>>>
>>>> I was really looking for examples of creating a message from the  
>>>> WSDL and populating it. The actual JMS part is straightforward,  
>>>> but the best way to create a text message from WSDL and data  
>>>> based on an XSD eludes me.
>>>>
>>>> I hope that is a little clearer :-)
>>>
>>> Yes :)
>>>
>>> So I guess you want to use some JAX-WS stack then use its client  
>>> to populate the message body & perform the SOAP stuff. Create the  
>>> JAXB 2 POJOs from the WSDL/XSD using JAX-WS and use those to make  
>>> a SOAP invocation. Then wire in either the SOAP stacks native JMS  
>>> transport or use ServiceMix as the transport layer in the SOAP  
>>> stack.
>>>
>>> We've not yet wired ServiceMix into the JAX-WS RI as the client  
>>> side transport; as its not pluggable right now in the RI - its  
>>> hard-wired to HTTP :(. As soon as Celtix supports enough of JAX-
>>> WS for us we can certainly wire that in pretty easily (will test  
>>> that shortly); plus there's XFire which has some of JAX-WS  
>>> support now (certainly the JSR 181 stuff and JAXB 2) - ditto  
>>> ActiveSOAP has JAXB 2 support which you could use as well.
>>>
>>> The other option is you forget about the JAX-WS interfaces for  
>>> service invocations and just send Java objects into ServiceMix  
>>> using the ServiceMix client and a JAXB 2 marshaller
>>>
>>> http://servicemix.org/Client+API
>>>
>>> Which is a bit more message-centric. Its probably simpler from a  
>>> developer perspective to stick to a JAX-WS / JSR 181 style  
>>> development from a WSDL though.
>>>
>>> James
>>>
>>>>
>>>> Regards
>>>>
>>>> Nathan
>>>>
>>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>>> [hidden email]
>>>>
>>>> On 8 Nov 2005, at 21:26, Dan Diephouse wrote:
>>>>
>>>>> Nathan Sowatskey wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> I have some WSDL files bound to JMS and some XSDs that I'd  
>>>>>> like to  work with using Servicemix. Is there a simple example  
>>>>>> that could get  me started please?
>>>>>>
>>>>>> Many thanks
>>>>>>
>>>>>> Nathan
>>>>>>
>>>>>> Nathan Sowatskey - Technical Leader, NMTG CTO Engineering -  
>>>>>> +34-638-083-675, +34-91-201-2139 - AIM NathanCisco -  
>>>>>> [hidden email]
>>>>>
>>>>> I don't know if simple, wsdl, and jms can be used in the same  
>>>>> sentence. :-)
>>>>>
>>>>> Its not clear to me what you are trying to do. Are you trying  
>>>>> to create a servicemix component to access your services?  Or  
>>>>> are you trying to create a new service with your xsd's that  
>>>>> will be exposed through a soap binding via ServiceMix?
>>>>>
>>>>> --
>>>>> Dan Diephouse
>>>>> Envoi Solutions LLC
>>>>> http://netzooid.com
>>>
>>>
>>> James Strachan
>>> Chief Architect
>>> LogicBlaze, Inc. - a Simula Labs Enterprise
>>> [hidden email]
>>> www.logicblaze.com
>>>
>>
>>
>> James Strachan
>> Chief Architect
>> LogicBlaze, Inc. - a Simula Labs Enterprise
>> [hidden email]
>> www.logicblaze.com


James Strachan
Chief Architect
LogicBlaze, Inc. - a Simula Labs Enterprise
[hidden email]
www.logicblaze.com