Testing a Service Using the Web Service Client Wizard

Use the Web Service Client wizard to perform repeatable tests.

  1. To test a service using the Web Service Client wizard, configure proxy settings if it has not been done.
  2. In the Enterprise Explorer view, right-click the WSDL document of a published service and select Create Web Service Client.

    The Create Web Service Client wizard appears.

  3. On the WSDL File page, complete the following:
    Table 1. WSDL File page
    Field Action
    From Local File Click Browse to navigate to the WSDL document of a service in one of your projects, for example, my project/my service/myService.wsdl.
    From URL Click Browse UDDI to navigate to the WSDL document of a published service in a UDDI registry.
    Validate WSDL Verifies the WSDL document can be used to create a Java client.

    If the message "Validation succeeded" appears, the WSDL is a well-formed XML doc.

    If the message "Validate failed" appears, check the structure of the WSDL.

  4. Click Next.
  5. On the Select a Project page, select the project in which to store the new Java client or click Create New Java Project to create a separate project for it.
  6. Select the target project, click Add Required Jars to Project, and click Next.
  7. On the Project References page, select projects containing resources used by the Java client and click Next.
  8. On the Java Package page, select an existing package from the Package menu or enter the name of a new package to be created for the Web service client, for example, myPkg , and click Next.
  9. On the WSDL2Java Options page, define the options for generating the Java code for the Web service client. The Java classes generated by this wizard require JAR files such as axis.jar. The default settings for the following options are sufficient for most uses.
    Table 2. WSDL2Java options
    Field Description
    Generate Code for This WSDL Only Generate code only for the WSDL document that appears on the command line. The default behavior is to generate files for all WSDL documents: the immediate one and all imported ones.
    Timeout Enter the number of seconds after which the process automatically stops if no results are returned. Default is 45 seconds.
    Use Special Treatment for "Wrapped" Document/Literal Style Operations This turns off the special treatment of what is called wrapped document/literal style operations. By default, WSDL2Java recognizes certain conditions and unwraps the top-level element, treating each of the components of the element as arguments to the operation.
    Type Mapping Version Choose the default type mapping registry to use: 1.1 or 1.2. The default is 1.2.
    Generate Code for All Elements (Including unreferenced ones) Select the default behavior, which is to generate files for all WSDL documents: the immediate and all imported WSDLs.
    Emit Separate Helper Classes for Metadata Choose whether to emit separate Helper classes for the metadata.
    User Name Enter a user name accessing secured WSDL documents. See Adding Code for Testing a Password-Protected Web Service.
    Password Enter a password for accessing secured WSDL documents. See Adding Code for Testing a Password-Protected Web Service.
    Note: For additional information, go to http://ws.apache.org/axis/java/reference.html.
  10. In the Input Parameters section, type or paste all values expected by the service.
    Note:

    When using dateTime or time functions with the Dialog Tester or the Web Service Client Wizard, the time is sent as a UTC in the SOAP Request. For example, if a dateTime of 2006-03-07T17:00:00 (Mountain Standard Time) is entered, the SOAP Request would contain the dateTime 2006-03-08T00:00:00.000Z (Greenwich Mean Time). The UTC date format should be used in the rule for an AXIS client.

    For additional information, go to http://www.w3schools.com/schema/schema_dtypes_date.asp.

  11. Click Invoke to call the method using the input you entered.

    The results appear in the Output Parameter field.

  12. Review the output.

    Binary response data displays as an array.

  13. Click Back to enter a new set of input parameters or Finish to generate the <testclientname>.TestClient.java file.
Related concepts
Web Service Client Wizard
Related tasks
Testing a Password Protected Web Service

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.