+

Search Tips   |   Advanced Search

WSDL2Java command for JAX-RPC applications

Run the WSDL2Java command-line tool against the WSDL file to create Java APIs and deployment descriptor templates.

(ZOS) The WSDL2Java command-line tool is not supported on the z/OS platform. This functionality is provided by the assembly tools provided with WebSphere Application Server running on the z/OS platform.

A WSDL file describes a Web service. The Java API for XML-based Remote Procedure Call (JAX-RPC) 1.1 specification defines a Java API mapping that interacts with the web service. The Web Services for Java EE specification defines deployment descriptors that deploy a web service in a Java EE environment. The WSDL2Java command is run against the WSDL file to create Java APIs and deployment descriptor templates according to these specifications.

It is a best practice to use absolute namespaces within the WSDL or schema. By default, the WSDL2Java tool does not permit the use of relative namespaces. Relative namespaces have been deprecated by the XML Plenary Interest Group and the use of relative namespaces causes the XML Digital Signature to fail as required by the Canonical XML Version 1.0 specification. However, if we have an established WSDL or schema that relies on relative namespaces, under specific conditions we can use the allowRelativeNamespace property to disable the relative namespace restrictions in the WSDL2Java tool. For additional information, see the property description. bprac

We can convert any relative namespaces to absolute namespaces. The following is an example of a relative namespace:

targetNamespace="MyRelNamespace"
. We can change the relative namespace in this example to an absolute namespace by adding the protocol and base URI information:
targetNamespace="http://www.sample.com/MyRelNamespace"


Command-line syntax

The command-line syntax is:

WSDL2Java [arguments] WSDL-URI


Required arguments


Important arguments


Other arguments


Related:

  • SOAP with Attachments API for Java interface
  • Custom data binders for JAX-RPC applications
  • Development and assembly tools
  • Developing a service endpoint interface from JavaBeans for JAX-RPC applications
  • Java2WSDL command for JAX-RPC applications
  • Mapping between Java language, WSDL and XML for JAX-RPC applications
  • Web services specifications and APIs