Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 74,280 times

Contents

Related Categories

XML SOAP - ASP Server Code

ASP Server Code

This code resides in an ASP – Soap.asp, in the root directory of the web server.

<%
Set objReq = Server.CreateObject("Microsoft.XMLDOM")

'Load the request into XML DOM
objReq.Load Request

'Query the DOM for the input parameter
strQuery = "SOAP:Envelope/SOAP:Body/m:GetSalesTax/SalesTotal"
varSalesTotal = objReq.SelectSingleNode(strQuery).Text

'Calculate the sales tax
varSalesTax = varSalesTotal * 0.04

'Prepare the return envelope
strTmp = _
"<soap:envelope xmlns:soap=""urn:schemas-xmlsoap-org:soap.v1"">" & _
"<soap:header></soap:header>" & _
"<soap:body>" & _
"<m:getsalestaxresponse xmlns:m=""urn:myserver/soap:TaxCalc"">" & _
"<salestax>" & varSalesTax & "</salestax>" & _
"</m:getsalestaxresponse>" & _
"</soap:body>" & _
"</soap:envelope>"

'Write the return envelope
Response.Write strTmp
%>

Comments

  • Posted by kpma_l on 19 May 2004

    [quote][1]Posted by [b]kpma_l[/b] on 19 May 2004 04:05 PM[/1]
    I tried to copy the the code and add references to VB project and run the VB app. but get runtime error at the DOMDocument object accesin...

  • getting Runtime error 91 - object or with block va

    Posted by kpma_l on 19 May 2004

    I tried to copy the the code and add references to VB project and run the VB app. but get runtime error at the DOMDocument object accesing a single node.

    Run time error 91.

    MSXML2 and MTS Admin ...

  • WebServices

    Posted by shirikok on 01 Apr 2004

    In .NET web services; How to monitor from where (mostly his/her web site URL but not his/her machine IP) requester is consuming the web service? Techies, [b]'HTTP_REFERER' [/b] and [b]'URLReferrer'[/b...

  • XML SOAP - ASP

    Posted by shirikok on 01 Apr 2004

    Great work by ComponentSource and they have very well explained VB 6.0 client and access to web service. I have a question here. How to monitor from where (mostly his/her web site URL not his/her mac...

  • got the same ???????+???...

    Posted by synapticdata on 20 Nov 2003

    if anyone knows the meaning of this, i could use the feedback. my hunch is, that the SOAP server is not configured to handle the request properly. but i dunno... =)