0 Replies Latest reply on Aug 7, 2011 10:10 AM by 880781



      first appologies for my bad english. i hope you can still understand my problem.

      - i created XSD file, to describe my XML. top level node is called ORDER.
      - i used JAXB to generate java classes for my xml. I ended with ORDER.java, ObjectFactory.java and package-info.java, all in package named model.
      - i can use jaxb now to read in my xml or to write out my xml.

      this is where i get confused:

      - i want to create webservice now, which would work with my xml.
      - i created WSDL file describing my service, which has 2 commands:
      --- readData(orderId) which should return Order from database
      --- writeData(order) which should write order to database

      i would like readData to return type ORDER which would be the same as my XML, and i would like writeData to accept ORDER (which i get from unmarshalling XML) and write it to database.
      -- how can i use types defined in .java files inside WSDL ?

      i tried creating exactly the same structure inside WSDL editor (eclipse), however when i create web service from this WSDL, it creates its own data types, which cant be simply cast to the ones
      generated by jaxb.

      --what is the correct way to do this ?*

      i tried using jaxb on classes generated from WSDL, but i get exception, that ObjectFactory is not found in that package (of course there is none) ...
      -- can i somehow write my own ObjectFactory.java to work with classes generated from WSDL ?

      thank you for your help