View Single Post
  #1 (permalink)  
Old September 22nd, 2014, 03:42 AM
emmals emmals is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default First SOAP Request with Classic ASP

I am trying to integrate SOAP into a classic ASP website in VBScript, found numerous examples online and have viewed this one here consuming SOAP web services in classic ASP

The XML needs sending to a service at to invoke a service named XML_Cartell. The application needs to generate a http GET or Soap XML Post request identical to below. It says username and password credentials should be inserted into the HTTP header as per the http basic Authentication protocol. e.g. Authorization: Basic QWxhZGRpbjpvcGVIHNl2FtZQ==.

I am currently receiving the error msxml3.dll error '80070005' Access is denied. I am not sure if i am inserting the authorisation correctly. There is also POST and SOAPAction, not sure what the difference is ?

My current code is
 <%Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP")

oXmlHTTP.Open "POST", "", False 

oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8" 
oXmlHTTP.setRequestHeader "SOAPAction", ""
oXmlHTTP.setRequestHeader "Authorisation", "QWxhZGRpbjpvcGVIHNl2FtZQ=="

SOAPRequest = _
  "<?xml version=""1.0"" encoding=""utf-8""?>" &_
  "<soap:Envelope xmlns:soap="""">" &_
    "<soap:Body>" &_
      "<FindByRegistration>" &_
  "<registration>96D29782</registration>" &_
  "<servicename>XML_Cartell</servicename>" &_
"</FindByRegistration>" &_
    "</soap:Body>" &_
  "</soap:Envelope>" &_

   oXmlHTTP.send & SOAPRequest %>

<%Set xmlResp = oXmlHTTP.responseXML%>

<%    Set nodes = xmlResp.getElementsByTagName("Model") %>
<%    For Each node in nodes    %> 
<%    Next    %>
The Request message posted should be like this

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="">
The Response Message should be something like this.

<soap:Envelope xmlns:soap=""><soap:Body><FindByRegistration>
  <Description>CD 2.0</Description>
Reply With Quote