Advertisement
Guest User

Untitled

a guest
Sep 8th, 2017
2,353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub test()
  2.  
  3.     With CreateObject("winhttp.winhttprequest.5.1")
  4.         .Open "POST", "http://www.dneonline.com/calculator.asmx?op=Add", False
  5.         .setrequestheader "Content-Type", "application/soap+xml"
  6.         .send "" & _
  7.                 "<?xml version=""1.0"" encoding=""utf-8""?>" & _
  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"">" & _
  9.                 "  <soap12:Body>" & _
  10.                 "    <Add xmlns=""http://tempuri.org/"">" & _
  11.                 "      <intA>10</intA>" & _
  12.                 "      <intB>50</intB>" & _
  13.                 "    </Add>" & _
  14.                 "  </soap12:Body>" & _
  15.                 "</soap12:Envelope>"
  16.                
  17.         Debug.Print Val(Split(.responseText, "AddResult>")(1))
  18.        
  19.     End With
  20.  
  21.  
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement