Sub Main()
Dim objHTTP As New MSXML.XMLHTTPRequest
Dim strEnvelope As String
Dim strReturn As String
Dim objReturn As New MSXML.DOMDocument
Dim dblTax As Double
Dim strQuery As String
'Create the SOAP Envelope
strEnvelope = _
"<soap:envelope xmlns:soap=""urn:schemas-xmlsoap-org:soap.v1"">"
& _
"<soap:header></soap:header>" & _
"<soap:body>" & _
"<m:getsalestax xmlns:m=""urn:myserver/soap:TaxCalculator"">"
& _
"<salestotal>100</salestotal>" & _
"</m:getsalestax>" & _
"</soap:body>" & _
"</soap:envelope>"
'Set up to post to our local server
objHTTP.open "post", "http://localhost/soap.asp",
False
'Set a standard SOAP/ XML header for the content-type
objHTTP.setRequestHeader "Content-Type", "text/xml"
'Set a header for the method to be called
objHTTP.setRequestHeader "SOAPMethodName", _
"urn:myserver/soap:TaxCalculator#GetSalesTax"
'Make the SOAP call
objHTTP.send strEnvelope
'Get the return envelope
strReturn = objHTTP.responseText
'Load the return envelope into a DOM
objReturn.loadXML strReturn
'Query the return envelope
strQuery = _
"SOAP:Envelope/SOAP:Body/m:GetSalesTaxResponse/SalesTax"
dblTax = objReturn.selectSingleNode(strQuery).Text
Debug.Print dblTax
End Sub
XML SOAP
- Introduction
- Step by Step
- The Client
- The Server
- VB Client Code
- ASP Server Code
VB Client Code
You might also like...
XML books
-
Access 2010 Bible
The expert guidance you need to get the most out of Access 2010Get the Access 2010 information you need to succeed with this comprehensive reference. If this is your first encounter with Access, you'll appreciate the thorough attention to database fu...
XML forum discussion
-
edmonton female escort services near me
by canadapleasure (0 replies)
-
Bagaimana memenangkan $ 1,54 miliar dalam Mega Jutaan
by gametogelan (0 replies)
-
input integer from text file and output text file
by shmilon (0 replies)
-
cSharp stuck at exercise
by xander_Michiels (0 replies)
-
Need help in selected the Tax Audit Year from drop down menu and displaying results for the selected year
by citymumbai (0 replies)
XML podcasts
-
Stack Overflow Podcast: SE Podcast #27 – Dave Winer
Published 9 years ago, running time 1h2m
Jeff & Joel are joined today by Dave Winer, who’s upset that we don’t have a jingle to start the show! He “invented” (well, pioneered, really) the XML-RPC protocol. Dave tells us the story of how and why the protocol came to be. Right now, Dave’s working on a “magnificent symphony of software
Comments