Chapter 8 Using the Sybase Web Services Client Proxy


Setting the WSDL file name

The SoapProxy class has two constructors: one takes the qualified name of the WSDL implementation file and uses it to retrieve service information; the other takes no parameters and uses the file specified in the ClientProxy.props file. For the zero-arg constructor, the WSDL implementation file to be used use must be located in the directory specified by %SYBASE_SOAP%\Proxy. You must make the SYBASE_SOAP value available to the SoapProxy. See "Setting environment variables and system properties for the Client Proxy".

If you want to call multiple Web services within a single application, use the SoapProxy constructor that takes the name of the WSDL file that describes the Web service you want to call. For each Web service create a new the SoapProxy with the name of the applicable WSDL file. If the Web services are all in the same WSDL document, they you only need to create a new SoapProxy once. The following code segments demonstrate how you might call multiple Web services within your application.

SoapProxy proxy = new SoapProxy(  "c:\\MyWsdlDocs\\StockQuotesImpl.wsdl"  ); 
... code to invoke the web service proxy = new  SoapProxy( "c:\\MyWsdlDocs\\OrderBooksImpl.wsdl"  ); 
... code to invoke the web service

 


Copyright © 2002 Sybase, Inc. All rights reserved.