Any remote client that knows where to look for this service and what arguments to pass can call this method remotely by posting an HTTP Get request.
This is just one of three protocols that you can use to access this web service through the Internet.
The other two being HTTP Post and SOAP.
Any client that can post an HTTP request can be a client of the XML web service.
Add a Web Reference
This dialog box lets you select a web service from those registered in a Universal Description, Discovery and Integration directory.
UDDI directories are a bit like the web services yellow pages in that they list XML web services distributed across the Internet.
Visit www.uddi.org for more details.
Type the path to your .asmx file on your local machine amd press Enter.
The left pane will display a description page associated with the web service.
The right pane contains additional links to view the WSDL contract.
Go ahead and add the reference.
After any changes to the web service you should rebuild the proxy class.
The easiest way is to select the service and select "Update Reference".
3 Web Service Protocols
You should use SOAP in all your applications and only use the other two for testing purposes.
This method lets you type in the whole query string directly into a browser.
When you invoke this method the text will be automatically sent to the .asmx page.
Similar to the HTTP GET except that the arguments are passed in the HTML body rather than the query string.
This uses SOAP messages for both the input arguments and for the return value.
The root node of any SOAP message is the message envelope which contains the message body
In turn the body contains an XML tag named after the target method and all arguments are sent inside this block.
Example Text Sent
Example Text Returned
Any soap message can contain an optional header, which might contain additional information not strictly related to the method being called.
For example a client might use the header to send its credentials so that the web service can record who accessed its methods and when.
SOAP is the only protocol that support objects and structures.
The only requirement for an object fed to (or returned) is that it must be serializable.
SOAP is also the only protocol that supports output arguments using ByRef.
All three protocols are enabled by default although you can disable one or more of them by editing your local web.config file.
In a production web service you might want to drop all the add tags except the SOAP one.
<add name="HttpSoap" />
<add name="HttpPost" />
<add name="HttpGet" />
<add name="Documentation" />
© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext