First, send the request and then process the response. I directly access WebService written in. NET and click the method name to view the instance code. I only need to use Microsoft. XMLHTTP in ASP to send the request, and then process the XML result.
Note that the namespace cannot be written incorrectly.
<% @ Language = VBScript codePage = 936%>
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
</Head>
<Body>
<%
Dim strxml
Dim Str
'Define a SOAP message
Strxml = "<? XML version = '1. 0' encoding = 'utf-8'?> "
Strxml = strxml & "<soap: envelope xmlns: xsi = 'HTTP: // your xmlns: XSD = 'HTTP: // www.w3.org/2001/xmlschema' xmlns: Soap = 'HTTP: // schemas.xmlsoap.org/soap/envelope/'>"
Strxml = strxml & "<soap: Body>"
Strxml = strxml & "<decrypt xmlns = 'HTTP: // 192.168.3.239: 8000/3 des/'>"
Strxml = strxml & "<strin> 4dv5esfhah0 = </strin>"
Strxml = strxml & "<strkey> not. cente </strkey>"
Strxml = strxml & "</decrypt>"
Strxml = strxml & "</soap: Body>"
Strxml = strxml & "</soap: envelope>"
Set H = Createobject ("Microsoft. XMLHTTP ")
'Send post message to the specified URL
H. Open "Post", "http: // 192.168.3.239: 8000/3 des/service. asmx", false
H. setRequestHeader "Content-Type", "text/XML; charset = UTF-8"
H. setRequestHeader "Content-Length", Len (strxml)
H. setRequestHeader "soapaction", "http: // 192.168.3.239: 8000/3 des/decrypt"
H. Send (strxml)
'Display returned XML Information
If H. Status = 200 then
Set xmldoc = server. Createobject ("MSXML. domdocument ")
Xmldoc. Load (H. responsexml)
STR = xmldoc. childnodes (1). text'' call showallnode
'Traverse and retrieve a node in XML
Set node = xmldoc. getelementsbytagname ("regionid ")
'For x = node. Length-1 to 0 step-1
Regmgrid = node. Item (0). Text
'Next
Set xmldoc = nothing
Response. Write (STR)
Else
Response. Write H. Status & "& nbsp ;"
Response. Write H. statustext
End if
%>
</Body>
</Html>