Call webservice in VB6 or ASP

Source: Internet
Author: User
Tags http post soap xmlns
Webservice is called in VB6 or ASP.

Web Services enables data sharing and communication between heterogeneous computing environments to achieve information consistency. We can use
Http post/GET and SOAP protocols are used to call Web Services.

1. Use the SOAP protocol to call Web Services in VB6

First, use. net to publish a simple Web Services.
<WebMethod ()> _
Public Function getString (ByVal str As String) As String
Return "Hello World," & str &"! "
End Function
This Web service only contains one getString method, which is used to return a string. When we call this Web Services, the SOAP message sent to the. asmx page is:
<? Xml version = "1.0" encoding = "UTF-8"?>
<Soap: Envelope xmlns: xsi = http://www.w3.org/2001/XMLSchema-instance
Xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: soap = "http ://
Schemas.xmlsoap.org/soap/envelope/ ">
<Soap: Body>
<GetString xmlns = "http://tempuri.org/TestWebService/Service1">
<Str> string </str>
</GetString>
</Soap: Body>
</Soap: Envelope>
The returned SOAP message is:
<? Xml version = "1.0" encoding = "UTF-8"?>
<Soap: Envelope xmlns: xsi = http://www.w3.org/2001/XMLSchema-instance
Xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: soap ="
Http://schemas.xmlsoap.org/soap/envelope/>
<Soap: Body>
<GetStringResponse xmlns = "http://tempuri.org/TestWebService/Service1">
<GetStringResult> string </getStringResult>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.