Solved

Stamps.com Web Services, Asp.net, .net, xml

Posted on 2011-03-11
1
713 Views
Last Modified: 2012-05-11
I am getting this error please check your self.


soap:ServerThere was an exception running the extensions specified in the config file. ---> Root element is missing.


XML Code is as below please guide us on this error code and if possible please send us back what to update on this code.

strXML = "<?xml version='1.0' encoding='utf-8'?>"
strXML += "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"
strXML += "<soap:Body>"
strXML += "<tns:GetRates>"
strXML += "<tns:Authenticator>test</tns:Authenticator>"
strXML += "<tns:Rate>"
strXML += "<tns:FromZIPCode>90405</tns:FromZIPCode>"
strXML += "<tns:ToZIPCode>92111</tns:ToZIPCode>"
strXML += "<tns:WeightLb>12</tns:WeightLb>"
strXML += "<tns:PackageType>Package</tns:PackageType>"
strXML += "<tns:ShipDate>2009-08-31</tns:ShipDate>"
strXML += "<tns:InsuredValue>100.00</tns:InsuredValue>"
strXML += "</tns:Rate>"
strXML += "</tns:GetRates>"
strXML += "</soap:Body>"
strXML += "</soap:Envelope>"
strXMLhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlObj.loadXML(strXML)



strXMLhttp.Open("POST", "https://swsim.testing.stamps.com/swsim/SwsimV12.asmx", False)
strXMLhttp.setRequestHeader("SOAPAction", "http://stamps.com/xml/namespace/2010/11/swsim/swsimv12/GetRates")
strXMLhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8")
strXMLhttp.send(xmlObj.xml)

Dim strXMLResponse
Dim mydoc
Dim strChosen
'the response from Stamp
strXMLResponse = strXMLhttp.responseText
mydoc = Server.CreateObject("Microsoft.xmlDOM")
mydoc.loadxml(strXMLResponse)

Response.Write(strXMLResponse)
0
Comment
Question by:citadelind
1 Comment
 
LVL 30

Accepted Solution

by:
MlandaT earned 500 total points
ID: 35254541
Can you maybe post the WSDL for the webservice.

Hav eyou considered using a proxy class instead? http://msdn.microsoft.com/en-us/library/bbs97dkt%28v=vs.80%29.aspx
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now