[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 766
  • Last Modified:

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

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
citadelind
Asked:
citadelind
1 Solution
 
MlandaTCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now