-
1. Re: JAXB annotations for easy web service use
rick_wagner Jun 17, 2011 8:18 AM (in response to jpechanec)Hi Jiri,
Thanks for asking for opinions, it's nice to talk things over.
Could you please give us a little more context about the question:
- Is this for a web service we want to make available to others via Switchyard, or a web service someone else is making available that we want to consume?
- (Maybe for another topic) what about REST?
Thanks,
Rick
-
2. Re: JAXB annotations for easy web service use
tfennelly Jun 17, 2011 8:32 AM (in response to jpechanec)Hey Jiri.
I def think we should make it easy to use JAXB. It should be possible for us to auto register a JAXBTransformer (to be implemented) to transformer <from> the SOAP payload type <to> the JAXB Java bean type and visa versa. I don't think this would be hard at all. Then... if you implement your service using JAXB annotated types...I think we could make automagically work.
BTW... with the version of Smooks in SwitchYard... you don't need to write templates for serializing Java to XML. The Smooks <jb:bean> configs can now be used to not just read, but also write XML to/from a Java object model. So... this is not the PITA it used to be... or at least not as big a PITA
-
3. Re: JAXB annotations for easy web service use
jpechanec Jun 17, 2011 8:33 AM (in response to rick_wagner)Hi,
I was bitten by it when I was playing with SOAP inbound gateway. But IMHO this should work for both configurations - as in both cases there is a Java-to-XML and XML-to-Java transformation.
I have not thought about REST at all. IMHO there is no easy way how to expose a service via plain HTTP. But when it comes then we could re-use the JAXB approach as Jackson has a support for JAXB annotations too.
Maybe there will be an easy way to do an integration with RESTeasy - so that JAX-RS annotations will work as expected.
-
4. Re: JAXB annotations for easy web service use
rick_wagner Jun 17, 2011 8:43 AM (in response to jpechanec)Thanks, Jiri.
I like Tom's idea, 'automagic' would be great!
Rick
-
5. Re: JAXB annotations for easy web service use
tfennelly Jun 23, 2011 9:01 AM (in response to jpechanec)I created a JIRA for this: https://issues.jboss.org/browse/SWITCHYARD-314
-
6. Re: JAXB annotations for easy web service use
jpechanec Jun 23, 2011 9:03 AM (in response to tfennelly)Hmm, I created a JIRA for this: https://issues.jboss.org/browse/SWITCHYARD-313
-
7. Re: JAXB annotations for easy web service use
tfennelly Jun 23, 2011 12:46 PM (in response to jpechanec)Ooops.... sorry Jiri... I missed the notification of the issue you created... I closed the one I created.
-
8. Re: JAXB annotations for easy web service use
tfennelly Jun 29, 2011 3:42 PM (in response to jpechanec)This code is being bushed now as part of https://issues.jboss.org/browse/SWITCHYARD-313
There's a totally awesome ( ) screencast here demoing it http://www.screencast.com/t/mvqzPRGxk4g