Chapter 8 Using the Sybase Web Services Client Proxy


Determining the name of the Web service

The Web service method name is specified in the SOAPAction for the desired service. Browse the WSDL implementation file for the Binding Operation element whose name attribute matches the Web service with the method you want to invoke. Look for soapAction. The name attribute contains the Web service name. The Binding Operation contains a SOAP Operation element which contains the SOAPAction. The method name is always specified as the first part of the SOAPAction and has the format of <package name>/<component name>.<method name>. This is the value you should specify as the first parameter to the invokeService method of the SoapProxy object.

In the SoapSampleImpl.wsdl file, there is one Binding Operation element labeled as follows:
<wsdl:binding name="SoapDemo/FindDogServiceBinding"....

This Binding has several Operation elements, all beginning with <wsdl:operation... To invoke the findByGender method in the SOAP Sample Application, look for the Binding Operation element whose name is findByGender. Next, find the <soap:operation> element and the attribute soapAction=. The first part of the soapAction is the method name. In this case, the value for the method name parameter in invokeService is: SoapDemo/FindDog.findByGender:

String methodName = "SoapDemo/FindDog.findByGender";

 


Copyright © 2002 Sybase, Inc. All rights reserved.