trevor- Posted April 28, 2010 Share Posted April 28, 2010 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 More sharing options...
justsomeguy Posted April 28, 2010 Share Posted April 28, 2010 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. Link to comment Share on other sites More sharing options...
trevor- Posted April 28, 2010 Author Share Posted April 28, 2010 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 More sharing options...
justsomeguy Posted April 28, 2010 Share Posted April 28, 2010 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. Link to comment Share on other sites More sharing options...
trevor- Posted April 28, 2010 Author Share Posted April 28, 2010 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 More sharing options...
justsomeguy Posted April 28, 2010 Share Posted April 28, 2010 There's an example of using a web service in classic ASP here:http://www.aspfree.com/c/a/ASP/Consuming-a...rvice-from-ASP/We also have a web services forum here specifically for this stuff, you can probably find several answers there as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.