Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub test()
- With CreateObject("winhttp.winhttprequest.5.1")
- .Open "POST", "http://www.dneonline.com/calculator.asmx?op=Add", False
- .setrequestheader "Content-Type", "application/soap+xml"
- .send "" & _
- "<?xml version=""1.0"" encoding=""utf-8""?>" & _
- "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & _
- " <soap12:Body>" & _
- " <Add xmlns=""http://tempuri.org/"">" & _
- " <intA>10</intA>" & _
- " <intB>50</intB>" & _
- " </Add>" & _
- " </soap12:Body>" & _
- "</soap12:Envelope>"
- Debug.Print Val(Split(.responseText, "AddResult>")(1))
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement