Building a Web Service Client

See Also 

In general, you build a web service client implemented within a Java application or a web application just as you would build any other project. As with other projects, the IDE automatically detects whether a project is part of a J2EE application and sets whether to package the archive files on the classpath accordingly. You can adjust which archive files are packaged with your module in the module project's Project Properties dialog box.

However, the wscompile tool is run as part of the build process. It generates the web service client from the WSDL file that describes the web service's external interface. The wscompile tool provides features that you can set to optimize the resulting web service client.

To build the web service client:

  1. Do one of the following to build the web service client:
  2. Analyze the result and, if necessary, customize the wscompile tool's features and build the web service again.

To customize the wscompile tool's features:

  1. Right-click the project node in the Projects window and choose Properties.
  2. In the Project Properties dialog box, select the Web Service Clients page.
  3. Type or select the wscompile features that are appropriate for your client:
    Feature Effect on Web Service Client
    datahandleronly Maps attachments to the DataHandler type.
    donotoverride No regeneration of classes that already exist on the classpath.
    donounwrap Disables unwrapping of document/literal wrapper elements in WSI mode (default).
    explicitcontext Turns on explicit service context mapping.
    jaxbenumtype Maps anonymous enumeration to its base type.
    nodatabinding Turns off data binding for literal encoding.
    noencodedtypes Turns off encoding type information.
    nomultirefs Turns off support for multiple references.
    norpcstructures No generation of RPC structures (-import only).
    novalidation Turns off full validation of imported WSDL documents.
    resolveidref Resolve xsd:IDREF.
    searchschema Searches schema aggressively for types.
    serializeinterfaces Turns on direct serialization of interface types.
    strict Generates code strictly compliant with JAXRPC Specification.
    unwrap Enables unwrapping of document/literal wrapper elements in WSI mode.
    wsi Checks for compliance with the WSI-Basic Profile, which is a specification for improved interoperability. For example, the WS-I Basic Profile prohibits the use of rpc/encoded. Therefore, if you set the wsi feature, a warning will be generated when you build a web service client that uses a WSDL file that uses rpc/encoded.
  4. Click OK.
See Also
About Web Services

Legal Notices