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 - [EMAIL PROTECTED]

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 - [EMAIL PROTECTED]

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 - [EMAIL PROTECTED]

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
[EMAIL PROTECTED]
www.logicblaze.com



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


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

Reply via email to