SUMMARY
This article describes how to integrate a .NET client with an Apache SOAP 2.2-based Web service. This article assumes that a Web Services Description Language (WSDL) file exists and was created by using the IBM Web Services Toolkit version 2.4.2.
back to the top
Requirements
This article assumes that you are familiar with the following topics:
- Reading and editing WSDL files
- Microsoft .NET Framework Software Development Kit (SDK)
back to the top
About IBM Web Services Toolkit WSDL Files
The IBM Web Services Toolkit places the WSDL information in two files:
- Java class name_Service.wsdl (the service file)
- Java class name_Service-interface.wsdl (the interface file)
The first file contains the service information. The second file contains the message, port type, and binding definitions.
back to the top
Create the Proxy
To create the proxy, you can use either of the following methods:
- Use the Wsdl.exe tool, and include the file in a project.
- Create a Web reference from within the Microsoft Visual Studio .NET Integrated Development Environment (IDE).
After you create the proxy, you can use the proxy as you would any other Microsoft .NET class.
back to the top
Use the Wsdl.exe Tool to Create the Proxy
- From the Start menu, point to Programs, point to Microsoft Visual Studio .NET, point to Visual Studio .NET Tools, and then click Visual Studio .NET Command Prompt.
- At the command prompt, browse to the folder that contains the edited .wsdl file.
- Type the following command to produce a Microsoft Visual C# .NET language file that you can include in your project:
wsdl Java class name_Service.wsdl Java class name_Service-interface.wsdl
If you want Wsdl.exe to create the proxy in a different language, use the /language switch as follows:- For Microsoft Visual Basic .NET, use the following command:
wsdl Java class name_Service.wsdl Java class name_Service-interface.wsdl /language:VB
- For Microsoft JScript .NET, use the following command:
wsdl Java class name_Service.wsdl Java class name_Service-interface.wsdl /language:JS
- For Microsoft C# .NET, use the following command:
wsdl Java class name_Service.wsdl Java class name_Service-interface.wsdl /language:CS
To obtain this information, as well as other options, type
wsdl /? at the command prompt.
back to the top
Use the Visual Studio .NET IDE to Create the Proxy
- In Visual Studio .NET, from the Project menu, click Add Web Reference.
- In the Add Web Reference dialog box, in the Address combo box, type the path to the Java class name_Service.wsdl file, and then click the arrow button next to the combo box.
- Click Add Reference. This produces a file in the project language and automatically includes the file in your project.
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
back to the top