Chapter 10: Using the Web Services Toolkit Samples
This section provides samples of client applications that you can use to access the Web services contained on EAServer.
In addition to the samples described in this chapter, see Chapter 9, “Developing Web Service Clients” for a description of various types of clients, including sample code.
This sample is an example of using a dynamic client (a client that needs no client-side artifacts because it already knows the name and how to access the Web service method) to invoke your Web service’s methods.
In this tutorial, you:
Deploy and expose a Web service
Run the dynamic client
The source files are in the DynamicClient subdirectory. Instructions for running the tutorial are in the file readme.txt.
Client applications created with Microsoft’s .NET framework can access Web services hosted in EAServer; wsdl.exe generates the required client side proxy from the WSDL document on EAServer. The C# (“C-sharp”) compiler csc.exe compiles the client executable program that accesses the Web service through the client-side proxy.
The example in this section describes the steps for creating both the server-side Web service and client-side proxy and executable program. For more information about .NET, go to Microsoft’s .NET Web site.
Only primitive data types are supported as Web services accessible by .NET clients, not user-defined data types. See Chapter 3, “Components, Datatypes, and Type Mappings,” for a list of supported data types.
In this sample, you:
Deploy a Web service using an example from a previous tutorial for this step. See “Exposing a stateless EJB as a Web service”.
Install Microsoft’s .NET SDK on your machine and add the .NET libraries to your environment.
Run .NET’s wsdl.exe command or a batch file to create the client proxy.
Create the client executable program and compile it using csc.exe.
Run the client program to invoke the service.
The source files are in the DotNetSample subdirectory. Instructions for running the tutorial are in the file readme.txt.
This sample illustrates how to deploy a PowerBuilder 9 component as a Web service in EAServer, and use a PowerBuilder 9 client to invoke the Web service. In this sample, you:
Deploy the PowerBuilder component
Create the required stub and skeleton files
Expose the component as a Web service
Invoke the Web service from the PowerBuilder client
The source files are in the PB9 subdirectory. Instructions for running the tutorial are in the file wsPBEAServer.htm.
|Copyright © 2005. Sybase Inc. All rights reserved.|