Generating Java Service Proxies

Java service proxies are generated Java classes that allow you to invoke other services from your Java service through the WSIF interface.

The proxy class contains a method for each operation that is exposed in the service interface. The Java Service Editor generates service proxies when you add service-to-service calls with drag-and-drop. You can also generate proxies manually as described here.

  1. Review the Java Editor preference settings that affect generation of proxy code:
    • The Catch WSIF Exceptions and Catch Other Exceptions options configure which exceptions are caught in the proxy code and which are thrown by proxy methods to be caught in your service code.
    • The Retry Count and Wait Time Before Retry settings specify how the generated code handles retries of failed invocations.

    If you modify these settings later, you must regenerate existing service proxies for the settings to take affect.

  2. Find the service in the Service Explorer.
  3. Right-click the service and select Generate Service Proxy.

    The Code Generation wizard runs and creates source code for the service proxy in the source folder for the service's parent project.

The Java package for the proxy is based on the urn: prefix of the the Target Namespace for the service. For example, if the Target Namespace is urn:myorg:mycompany:com:/JavaWorkSpaceProject/Services/JavaService, the Java package is com.mycompany.myorganization.

Note: To invoke services that are defined in a different project than your Java project, you must add project references to the build path for the project that contains your Java service. Add a project reference for each project that contains a service invoked by your Java service.
Related concepts
Exceptions in a Java Service
Calling Java Proxy Methods
Related tasks
Implementing Service-to-Service Calls in a Java Service
Related reference
Java Service Datatypes

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.