[Web Services] three creation process

zhaozj2021-02-17  54

How to use Web Service

Now we can use this web service, let us enter a value to get a fake price.

Click the INVOKE button to display a new window and XML documentation below.

This shows how the web service issues information, we need to design a client to display an XML document, this client should be:

1, a web page

2, console or windows application

3, WML or WMLScript that can interact with mobile phone

4. Palm or Windows CE application that can be used on PDA

I will explain the process of building a client.

You can call the Web Service directly through the HTTP GET method. In this example, you will not pass the above web pages and click the Invoke button to get the XML document directly, then call the XML document with the HTTP GET method, then the syntax should:

http://server/webservicename.asmx/functionName? parameter = parametervalue

So for us, the statement will be:

http://localhost/Work/aspx/sampleService.asmx/getsecurityInfo? code = IBM

This will result in the same result as the effect of clicking the Invoke button.

Now we know how to create and use a Web Service, but our work is only half. How to make the client discover the web service? What ways to search on the Internet online? Is it like a search engine like an Yahoo search engine? In order to solve these problems, we need to create a "discovery" file for Web Service.

Create a "discovery" file

Web Service is an inquiry and locate the process of Web Service, which is a preparatory process for accessing the Web Service. The client will get the existence, size, how to interact, "discovery" file by discovering the Web Service process, how to interact, "discovery" file is an extension To: .disco's XML document. It is not necessary to enforce a "discovery" file for each Web Service, and below is the "discovery" file instance of this example:

Configuring Web Service

Configuring Web Service is very simple, similar to the ASP.NET application file, copy .asmx and .disco files to the appropriate directory.

Web Service's future

The future of Web Service is very bright, and now is Microsoft to develop Web Service technology, IBM and Sun are also committed to developing Web Service. Soap Toolkits can already be used on Apache and Java Web Servers, but I believe that I also need for Web Service. Do a little job, especially the Web Service discovery process, she is really too primitive.

转载请注明原文地址:https://www.9cbs.com/read-29912.html

New Post(0)