Announcement Announcement Module
Collapse
No announcement yet.
Steps to create a client based on a WSDL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Steps to create a client based on a WSDL

    Hi,

    On my current project we are using Axis2 both as a client and a server for our Webservices. With Axis2 we can generate a client stub and the Java objects used during the marshalling/unmarshalling process. Generating these Java objects facilitates (code-completion, compile-time checks, ...) the implementation of the client code.

    When I compare this approach with Spring Web Services, I have not found the equivalent of the wsdl2java tool. So, what steps should be executed for implementing a Client based on an existing WSDL file ?

    Regards, Stefan Lecho.

  • #2
    That depends on what you want to do on the client-side. If you want to use XML directly, you can use the schema as a basis to build XML documents, using DOM, JDOM, etc, and use the sendSourceAndReceiveToResult methods on the WebServiceTemplate.

    If instead you want to use marshalling, which might be more convenient, but creates a tighter coupling between client-and server, you can take the schema that's part of the WSDL, and feed that to a code generator, such as JAXB's xjc. Some of these code generators can even do this directly from a WSDL.

    Comment

    Working...
    X