Jump to content

Classic ASP or SOAP for XML?


trevor-

Recommended Posts

I have a web service that I have to connect my company to. I don't actually know anything about ASP other than it seems to use VB Script which is just like VB 6.0 which is VBA so I at least know the syntax, and I've been using it for a few weeks now. I have also never used XML.That aside, the web service takes XML attributes. Should I either do this with classic ASP:

<%response.ContentType="text/xml"response.Write "<?xml version='1.0' encoding='utf-8' ?>"response.Write  "<ProcessCreditCard xmlns:xsd='http://www.w3.org/2001/XMLSchema'"response.Write	  " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"response.Write	  " xmlns='http://TPISoft.com/SmartPayments/'>"response.Write	  "<UserName>" & Session("?") & "</UserName>"response.Write	  "<Password>" & Session("?") & "</Password>"response.Write	  "<TransType>" & Session("?") & "</TransType>"response.Write  "</ProcessCreditCard>"%>

Or turn this soap 1.2 code into a bunch of response.Write's (I read that you can use SOAP with classic ASP?):

POST /smartpayments/transact.asmx HTTP/1.1Host: secure1.pivotalpayments.comContent-Type: application/soap+xml; charset=utf-8Content-Length: length<?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>	<ProcessCreditCard xmlns="http://TPISoft.com/SmartPayments/">	  <UserName>string</UserName>	  <Password>string</Password>	  <TransType>string</TransType>	</ProcessCreditCard>  </soap12:Body></soap12:Envelope>

Would one way be better? Can I use SOAP with ASP, or will I need to install something on the IIS server? Is my ASP code bit set up right? Does SOAP require that envelope?Any help is greatly appreciated.

Link to comment
Share on other sites

Thank you, I totally missed SOAP so I will look for that now (only saw XML tutorials that didn't help me much, other than telling me I could just send XML requests directly with classic ASP). Just wondering though, why not use classic ASP directly instead of ... mimicking(?) SOAP through classic ASP?

Link to comment
Share on other sites

I read the tutorial on SOAP, so now I understand all of the SOAP syntax that was thrown at me, however I'm still unsure of how to make SOAP work with a classic ASP webpage. Can I response.write all of the SOAP lines in a .asp file?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...