Results 1 to 2 of 2

Thread: Jaxb2Marshaller does not work with schema the has import

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    6

    Default Jaxb2Marshaller does not work with schema the has import

    Hello
    I am using org.springframework.oxm.jaxb.Jaxb2Marshaller to unmarshal xml file. I used the jaxb pluging to generate the objects based on the schema (the schema import another schema (xs:import). The code generated by the jaxb plugin looks correct but when I unmarshal, the object representing the imported schema comes back as empty, but the data for the base schema has the expected data).
    so I do not think this is jaxb plugin issue

    org.springframework.oxm.jaxb.Jaxb2Marshaller ab = new org.springframework.oxm.jaxb.Jaxb2Marshaller();

    ab.setContextPath("com.ftpmessage.stub");

    cm =(CM)ab.unmarshal(new StreamSource(
    new File("C:/MyEclipse10/myproject/target/local-ftp-temp/gatewayGe/16107067.xml")));

    cm.getAB is always empty.???

  2. #2
    Join Date
    Sep 2009
    Posts
    6

    Default

    I resolved this issue, thanks

Posting Permissions

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