Announcement Announcement Module
No announcement yet.
(Castor XML or JiBX) && Spring WS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • (Castor XML or JiBX) && Spring WS


    I am trying to publish web services for a bunch of classes (a framework) that I created... It seems there are a few options in the arena for XML mapping... three that are in contention right now are JAXB, JiBX, and Castor. JAXB I have a technical issue with which I have not been able to resolve yet... (it's not playing nice). I am more interested in the other two options however as they appear to offer more flexibility and easier use. One factor seems to stand in the way in of each though:

    1.) JiBX - I am wondering why the Spring WS Marshalling facilities require you to select a single class as the entry point for marshalling? What if I want to pass one class to one service and another class to another? How are you supposed to create different payloads for different services offered through the same Dispatcher? - I can obviously create one generic object that accepts all possible payloads but that seems quite barbaric for Spring standards.

    2.) Castor - How does Spring WS obtain a schema to use with Castor services ? Are we required to use Java source code generation? What if you already have the classes and want to map to a schema? Unless I have not found ti yet... the Castor documentation seems to state that you can generate a mapping file to do your mapping for you but does not seem to say how you would produce a schema from this mapping...

    Any insight would be appreciated...



  • #2
    I think I have a potential solution to part one (JiBX) above but there are still questions...

    Assuming I am using the @Endpoint and @PayloadRoot annotations on my service...

    Am I required to define one GenericMarshalllingMethodEndpointAdapter with a JiBX marshaller that accepts an XML object matching that payload declaration... If so, wouldn't this also mean that I need to create a class that matches that payload declaration with the appropriate contents as well (since the schema is generated and the jibx marshaller needs to understand the binding constructs)?