You have created Web services by using the .NET platform and Java. However, it is essential that the Web services you created using the two platforms are interoperable with each other.
In this section, you will test the interoperability between Web services created using Java and .NET. To do this, you will create a client application in .NET by using Visual Studio .NET. Then you will access the Java Web services that you have created in this chapter by using the .NET client application.
Creating a Visual Basic .NET Client Application
To create a .NET client application, perform the following steps:
Reference from the displayed menu. The Add Web Reference dialog box is displayed, as shown in Figure.
The Add Web Reference Dialog Box
Note?/td>Note that the Websphere Studio does not come with a fullfledged application server. Instead, it comes with a micro version of the Websphere application server, which you can use only within the Studio IDE. As a result, you cannot connect to it from Visual Studio .NET.
The Web service that you built using Websphere Studio Application Developer is deployed on an internal version of Websphere; therefore, it uses one of the other Web services that you have deployed on Tomcat. Tomcat is a complete application server that can be accessed from external applications.
The following code shows the content of the WSDL file for the Web service that you created and deployed on Tomcat:
As you can see, the preceding WSDL file is not very different from the WSDL file that you could have created using the Java2Wsdl tool.
The following code shows the content of the proxy class created in Visual Basic .NET, which represents the remote Web service:
The bold part of the preceding code shows the isValid() method and how neatly it encapsulates the isValid() method of the Web service.
Adding Code to the Button Control
Add a Button control to the Visual Basic .NET Windows application. To add functionality to the Button control, add the following code to the Click event of the button:
Now run the application and verify the functioning of the Web service by passing appropriate values to the isValid() method.
XML Related Interview Questions
|Soap Tool Interview Questions||HTML Interview Questions|
|PHP Interview Questions||ASP.NET Interview Questions|
|PHP5 Interview Questions||Java Interview Questions|
|CSS Interview Questions||XSLT Interview Questions|
|Java XML Interview Questions||XMLHttpRequest (XHR) Interview Questions|
|ebXML Interview Questions||XML DOM Interview Questions|
|XML-RPC Interview Questions||XSD Interview Questions|
|Soap Web Services Interview Questions||XSL Interview Questions|
|Xml Publisher Interview Questions|
Basics Of Xml
Basics Of Web Services
Introduction To Soap
Introduction To Uddi
Introduction To Wsdl
Creating A Web Service Using The Microsoft Soap Toolkit
Building Web Applications On The .net Platform
Creating An Asp.net Web Service
Creating A Web Service From An Interface
Introduction To The Atl Server
Creating A Web Service Using The Atl Server Library
Design And Creation Of The Knowledge Share Web Service
Introduction To Java Xml Technologies
Developing Java Web Services
Design And Creation Of A Web Service Using The Ibm Toolkit
Introduction To Mobile Applications
Creating A Mobile Application That Consumes A Web Service
Web Services Development With Jdeveloper
Creating Web Services Using Perl
Integration Of Xml Web Services With The Office Xp And Sql
Server 2000 Toolkits
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.