Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 22nd, 2014, 04:42 AM
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 https://www.cartell.ie/secure/xml/findvehicle 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
Code:
 <%Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP")

oXmlHTTP.Open "POST", "https://www.cartell.ie/secure/xml/findvehicle", False 

oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8" 
oXmlHTTP.setRequestHeader "SOAPAction", "https://www.cartell.ie/secure/xml/findvehicle"
oXmlHTTP.setRequestHeader "Authorisation", "QWxhZGRpbjpvcGVIHNl2FtZQ=="

SOAPRequest = _
  "<?xml version=""1.0"" encoding=""utf-8""?>" &_
  "<soap:Envelope xmlns:soap=""http://www.w3.org/2003/05/soap-envelope"">" &_
    "<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") %>
<ul>
<%    For Each node in nodes    %> 
   <li><%=node.text%></li>
<%    Next    %>
</ul>
The Request message posted should be like this

Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<FindByRegistration>
  <registration>96D29782</registration>
  <servicename>XML_Cartell</servicename>
</FindByRegistration>
</soap:Body>
</soap:Envelope>
The Response Message should be something like this.

Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><FindByRegistration>
<Vehicle>
  <Registration>96d29782</Registration>
  <Make>OPEL</Make>
  <Model>OMEGA</Model>
  <Description>CD 2.0</Description>
  <BodyType>SALOON</BodyType>
  <FirstRegistrationDate>1996-05-20</FirstRegistrationDate>
  <FuelType>PETROL</FuelType>
  <EngineCapacity>1998</EngineCapacity>
  <Transmission>Manual</Transmission>
  <Power>136BHP</Power>
</Vehicle>
</FindByRegistration>
</soap:Body></soap:Envelope>
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert classic ASP - Web API code to ASP.NET melvik ASP.NET 3.5 Professionals 0 February 24th, 2012 03:02 PM
What is a SOAP Request ? mscanand .NET Web Services 1 August 4th, 2007 12:40 PM
how to send https request in classic asp johndoewn Classic ASP Professional 1 March 25th, 2006 12:37 AM
API SOAP request harpua PHP How-To 0 September 13th, 2005 11:21 AM
Posting SOAP request to third party vendor finny.net .NET Web Services 4 January 24th, 2005 03:16 AM



All times are GMT -4. The time now is 07:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.