Simple Web Service Client Implementation

1. Introduction:

The Post present a client provides its users the facility to explore the list of medics available in its town or city. The service is available for UK and USA uses. The Client gets the city name from the user and sends the addresses (only UK) for verification to the web services and if the town Name is correct the client sends the Request to retrieve the list of medics in the town/city.

On entering an address of UK Location the Client does.

1: Validate the UK Address through service

2: Get the Medics that are Located in the area.

2. Client Description: The Client provides its users the facility to explore the list of medics available in its town or city

3.1 Implementation Technology Selection

The implementation of the web service Is done using Microsoft API for web services. The Client uses ASP.Net and C# as a client end languages, which in turn communicates with the web services and retrieves the required information to the client, the client then displays the Information to the users. The Technology implementation stack used for this web services client is discussed in detail in the following text.

3.1.1: Web services Technology stack

The web services are used to invoke the methods of remote objects through the use of XML and SOAP. The SOAP and XML used in the web services are essential parts of all the implementations of web services. The technology is built be many companies and they interoperability is the basic term on which all the companies agree. The Dissection of who the web services work and what technologies are involved in the implementation using Microsoft ASP.NET and Microsoft C#, as given below.

For the implementation of a client and server that work together, the server exposes the web services and the client consumes the web services. The first thing that comes into our mind is that how they are different from the client server architecture that we have been using from last decade. The most beautiful thing is that the client and server are not dependent on each other anymore. That was not possible in any of the previously known technologies. Thus this also is the most convincing factor about web services. Further the question is raised as how this dependency is removed. The Technology behind this is a protocol that is used in the web services for communication, SOAP is the protocol used in the web services to communicate. SOAP is an acronym for Simple Object Access Protocol. This protocol makes the web services possible.

SOAP is a protocol used communication in XML based web services. SOAP is simply a specification of the message format; the messages are in XML format and they self defines themselves. That’s it. No specific object models and no specific object activation and naming conventions. Thus they are understood by the recipient without any help.

SOAP can also define how to represent program data into the message; it defines how the remote procedure calls are made. These are used for the functions that accept parameters and return values. SOAP relies on for communication on HTTP protocol and inherent the security features provided by the HTTP protocol. Thus the security specification is not a part of the current SOAP specification; anyhow the security of the HTTP protocol might not be enough, so the Web Services Security Specification is under development for future development.

After the communication between the client and server is done in required way, the next step is how the two ends speak to each other. WSDL is used to describe set of SOAP messages and how to exchange messages. The WSDL defines what the SAOP message is all about. The WSDL is written in WSDL file and included in the web service definition. WSDL is a XML file that describes and provides everything that a client program requires to consume the web service and provide the required functionality to the client program.

The last thing that is in the core of web service architecture is the UDDI; it is abbreviation of Universal Discovery Description and Integration. This is a service that is used to register different web services, so that they can be used and explored by the developers that want to use that service. The UDDI describes what services are available and what they are used for. This is not a mandatory to register the service in UDDI but if you have to advertise the services you are providing then you have to do this. This UDDI is an XML file that describes the service; The UDDI has three parts the white pages that describes the source of web service. The yellow pages that describe that categorize and present the services. The green pages that defines the procedure and requirements to consume the service in your application. The UDDI has many ways to search the services and provide the information about them.

The web services in Microsoft asp.net clients include the disco files to discover the services and the applications services used by the consumed service.

With the above all things in place we can architect the application architecture that describes the technology stack that is used for web services based applications in Microsoft ASP.NET applications.

3.1.2: Technology Selection

The technology selection that I have made is a on the basis of ease of implementation and the familiarity of the technology. The application architecture implementations and explanations in the web services implementations using ASP.NET are fairly simple to me. The Web services are interoperable, so it was a matter of choice for me and I choose what I was comfortable with. The Integrated application development in Visual Studio let you explore the Technology in depth as well as manage the work on your behalf. So you have always on a good position to understand things.

3.1.2.1 Alternatives

            For the technology I had chosen to implement the Web Service client. There could be many more application development technologies that can be used to implement the web services client. But for the client I have developed the web technology is the best. Thus I had to choose between the main technologies i.e. JAVA based web services client using JSP, Microsoft implementation of web services using the ASP.NET, and IBM WebSphere web services.

The alternatives of the technology are as stronger as the technology I have chosen.

3.1.2.2 Selected Technology Justification

            The justification that the technology I have selected is a fair choice for the task that I have to do based on my personal experience. The usage of java as an enterprise library is fairly comparable with the other enterprise libraries, but I have to get into the details of a simple client that has to be as simple as to present everything and does not confuse me with other architectures as MVC and the Layer architecture used in the Enterprise application architectures in other choices. Thus my choice was based on the fact that Microsoft’s implementation is fairly simple and can be dissected to see what is going on, this simplicity and easiness in the implementation has encouraged me to implement the client in ASP.NET.

3.1.2.3 Screen shots of Client Implementation

            Initial Screen Presents the User with the space to enter the location user want to search for the Medics.

When the user enters the Address it send request to a web service and retrieves the data about the Medics. If the user does not enter information or enter wrong information no data is received or the client presents the error message.

When the data is received the client presents it in a formatted report as follows.

3.2 Interface Implementation

The interfacing of the application to the web services is done as follows. The application asks the user to enter the address information, for this I have coded an ASP.NET web page. The code is included separately. There is a mandatory check for the City as this is required by the service to get the data.

The there is a service that Checks the validity of UK based addresses , if the user enters the UK address then that service is called to check if the address is correct, the web service address is as follows

http://www.webservicex.net/ws/WSDetails.aspx?WSID=49&CATID=7

after the verification the client requests another web service to get the medics information near the address of the user.

The service address is as follows.

http://www.webservicex.net/medicareSupplier.asmx?wsdl

The service returns the data for the query, the data is then presented to the user using a report format as shown above in the screen shots.

3.3 Conclusion: The web services are a best possible way to implement SOA, the web services have opened a new horizon in the race of enterprise architectures, and the goal of providing agility in the enterprise level applications and architectures is now seem to be achievable through the use of web services. With the implementation of systems the web Services technology is getting matured and thus the future implementations will be much securer and agile. This is a major step in the evolution of Semantic web.