Announcement Announcement Module
Collapse
No announcement yet.
How to use Spring WS with Axis2, generating java files from WSDLs? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use Spring WS with Axis2, generating java files from WSDLs?

    Hello,

    I used Spring WS before as a client to communicate with a Webservice. I had the WSDL for which I wrote the class representing the Webservice-Data manually. Now I have to use Spring WS in a bigger project to communicate with webservices with a lot of WSDL files. I cannot write classes manually for all those WSDLs so I have to use some kind of code generator.

    As far as I know, Spring WS does not come with some kind of WSDL to Java-class generator, is that right?

    So my question is, what combination whould you suggest, perhaps Spring WS and Axis2? If yes, may you give me a hint how those two frameworks work together, which one is responsible for what task (please note, my main task is to communicate with a foreign webservice, not to offer an own webservice)?

    (I would say I'm a beginner in both Spring WS and Axis2 and the concepts behind them.)

    I really appreciate your help

    Thank you!

  • #2
    That isn't going to work... You use either Spring WS or Axis... But you cannot use axis to generate classes for you and expect spring ws to work with those endpoints...

    What you can do is use Jaxb (or what ever technology you use) to create java classes for the xsds associated with the WSDL. After that it is quite easy to setup spring ws to react to messages etc.

    Comment


    • #3
      Hello Marten,

      thanks a lot for your answer!

      So I was on the wrong path ;-)

      I read on and learned that JAXB has the "jxc" compiler to create the classes (and that their is a maven plugin which can use jxc to generate the classes). Can you please give me a hint where to go next? I must get an understanding where the "connection" is between Spring WS and the generated classes (I assume that Spring WS can be configured to use the JAXB marshalling/unmarshalling?)

      Thank you!

      Comment


      • #4
        The marshalling/unmarshalling is quite clearly explained in the reference guide (and shown in the samples) so I suggest you take a look at those.

        Comment

        Working...
        X