|
Subject:
|
Soap and xml
|
|
Posted By:
|
bearpaws
|
Post Date:
|
11/14/2003 1:01:20 PM
|
I hope someone can help me with this problem. I am running in circles with it. I have an xml document which I am able to pick off the values I want and I want to sent it to another page via soap. I am pretty confident that what I am sending is structure okay. All well and good. I am pretty sure it is getting to the receiving page because when I do the following in my page that sends to the receiving page:
xdDoc.xhHTTP.responseText; alert(sXML);
But when I change it to and add xdDoc = xhHTTP.responseXML; var vtest = xdDoc.selectSingleNode("//RECTEST/REASON").text alert(vtest);
and try to pickoff the error code, it blows on the var vtest line of picking off the node to get the error code. And the error message is really useless: "An exception of type MicroSoft Jscript type runtime error Object required was not handled" What in the world is happening ?? The values that are being sent over are real number that may have 9 decimal positions. I am lost at what to try next. I am using xml parser v 3 whihc is necessary because of the cml document being sent to me.
This is the receiving page. Not much to it. I haven't added any processing per say.
<%@Language=VBScript %> <!--#include file="ADO/ADOVBS.INC"--> <%Response.ContentType = "text/xml"%> <%Response.AddHeader "SOAPAction","VResults"
Dim vbNewLine,vdbase,vseps,xclient,sqltext,rsCmd,rsRec Dim xfname,xlname,xdate,vfname,vlname Dim vrates(3)
Dim xdRequestXML
Set xdRequestXML = Server.CreateObject("MSXML2.DOMDocument") xdRequestXML.Load Request
xclient = xdRequestXML.selectSingleNode"//VRate/Name").text vrates(1) = xdRequestXML.selectSingleNode("//VPRate/Rate1").text vrates(2) = xdRequestXML.selectSingleNode("//VPRate/Rate2").text vrates(3) = xdRequestXML.selectSingleNode("//VPRate/Rate3").text
on error resume next vfname = "" vlname = "" Response.Write "<RECTEST>" & vbNewLine Response.Write "<REASON>FAILED</REASON>" & vbNewLine Response.Write "</RECTEST>"
Why do I keep getting the error ? This is really been confusing me for two days now.
|
|
Reply By:
|
joefawcett
|
Reply Date:
|
11/14/2003 3:37:40 PM
|
When using msxml version 3 use progid "msxml2.domdocument.3.0. Can you show what appears when you alert responseText?
--
Joe
|
|
Reply By:
|
bearpaws
|
Reply Date:
|
11/16/2003 5:40:12 AM
|
I found the problem. I am developing in localhost mode. It was a security issue pertaining to the folder (on my machine) that contained the xml document. Once I shared my folder it was okay. But on the web server, I did not have to do this and am I ever thankful. I normally do not develope in localhost mode. I ususlly always have a web developing cpu and I have found somethings are different. But as long as it processes correctly on the live production server, that's what counts!
|
|