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 - [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