Adding Code for Testing a Password Protected Web Service

When using tooling to test a service, the Create Web Service Client Wizard generated code does not include the username and password that are required to test a password-protected service. You can edit the service-test-client-generated Java source to provide the required information.

To add user id and password to a Java source file:

  1. Edit the .java source file for the class that ends with BindingStub, for example, SimpleJavaServiceImplHTTP_BindingStub.java.

  2. Locate the source for the createCall() method.

  3. Add the following lines, substituting appropriate values for the user name and password:

    _call.setUsername("user");
    _call.setPassword("password");

Testing a Service Using the Web Service Client Wizard

Service Testing

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com