Skip to main content

Creating Proxy Classes using the Wizard: Part 1

In order to communicate with a Web Service producer, a Caché Web Service consumer requires proxy classes for the producer. These proxy classes are generated according to the specifications of the Web Service producer's WSDL document. Using the WSDL document, the Caché Web Services Client Wizard automatically generates the proxy classes.

Complete the following steps to use the Caché Web Services Client Wizard to create a Caché client for the example Web Services Producer application:

  1. Open Studio. Change to a namespace different from the namespace in which example producer application is installed, for example, the SAMPLES namespace. This helps to simulate remote communication between the producer and consumer.

  2. Click Tools —> Add-Ins —> Add-Ins. This displays the Add-Ins list. Click SOAP Client Wizard and then click OK.

    generated description: soapclientwizard1 20141

  3. On the first SOAP Client Wizard screen do the following:

    1. Click URL for the Select a WSDL File or URL option.

    2. Enter the URL for the example producer application's WSDL in the Enter a WSDL URL: box. The URL is http://localhost:<port>/csp/<server namespace>/SOAPTutorial.SOAPService.cls?WSDL=1 where <server namespace> is the Caché namespace in which the application is installed and <port> is the Web server port for the Caché instance.

      generated description: soapclientwizard2 20142
      You can determine the Web server port for your Caché instance by clicking the About link in the upper left of the Management Portal.

    3. Click Next.

  4. The SOAP Client Wizard displays the WSDL document for the example producer application. Enter the following under the Options to control class generation heading:

    • Click Create Client for Web Service.

    • Click Compile generated classes.

    • Class Type Registered.

    • Proxy Class Package ContactApplication.

    Click Next.

    generated description: soapclientwizard3 20142

  5. The SOAP Client Wizard displays the package names for the different sets of proxy classes that it generates. Click Next to accept the default values.

    generated description: soapclientwizard4 20152

Note:

To learn more about using the SOAP Client Wizard, read Using the SOAP Client Wizard in the Creating Web Clients section of Creating Web Services and Web Clients in Caché.

If the CSP application containing the Web Service is password protected, then you must add a valid Caché user name and password to the WSDL url. Do this by appending &CacheUserName=<user name>&CachePassword=<password> to the WSDL url.

FeedbackOpens in a new tab