Jump to content
Sign in to follow this  
trevor-

Classic ASP or SOAP for XML?

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.

Share this post


Link to post
Share on other sites

Check the tutorials on the site regarding web services and SOAP, those should answer most of your questions. If you're connecting with a web service then it would make sense to use SOAP techniques to do it.

  • Like 1

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

SOAP is a wrapper for automating much of the tasks of dealing with a web service. Sure, you could do it all yourself, but it would make more sense to have certain things automated for you.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...