Results 1 to 8 of 8

Thread: JAXB2 generation - separate

  1. #1

    Default JAXB2 generation - separate

    I have a couple of XSDs, one being Domain.xsd. The other XSDs import Domain.xsd. The other XSDs are generated into their own packages. So subsequently JAXB2 generation includes Domain.xsd, which results in duplicate copies of objects in Domain.xsd. Excluding Domain.xsd from the maven generation doesn't work. Is it possible to tell the org.jvnet.jaxb2.maven2 maven-jaxb2-plugin to only generate objects in the explicit XSD and not any imported files?

  2. #2

    Default

    Secondly, is it possible to add contextPaths property to AbstractJaxbMarshaller?

  3. #3
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Quote Originally Posted by mmccaskill View Post
    Secondly, is it possible to add contextPaths property to AbstractJaxbMarshaller?
    No, because the JAXBContext object does not support that. See http://java.sun.com/javase/6/docs/ap...va.lang.String)

    You can define multiple JAXB Marshallers, though, each with their own context path.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  4. #4

    Default

    Seems like slightly more configuration but I'll opt for using the classesToBeBound property. I can't imagine that creating/using multiple marshallers is cheap. Plus I'd have to have multiple MarshallingEndpointAdapters, right? Possibly multiple PayloadRootAnnotationMethodEndpointMappings?

    Thanks for the help.

  5. #5
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Yes, that would mean that you define two adapters, but not two endpoint mappings.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  6. #6

    Default

    On the server that makes sense. But WebServiceGatewaySupport only allows using one Marshaller & Unmarshaller. Not sure how that would work out.

  7. #7
    Join Date
    Oct 2004
    Posts
    207

    Default

    If you go with multiple MarshallingMethodEndpointAdapters beware of the bug I ran into last night...
    http://opensource.atlassian.com/proj...browse/SWS-220

  8. #8

    Default

    Hey thanks for that. Patch looks good too. But unless the WebServiceGatewaySupport can support multiple marshallers I can't use this route. Unless I dig into the source and make it work. Hmmm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •