Solved

how to integrate stamps webservices in ASP.NET

Posted on 2011-03-07
2
458 Views
Last Modified: 2012-05-11
I am using stamps web services in ASP.NET.

How can i write code for using this web services.

Please give me code example of use stamps web services.

Please help me out.
0
Comment
Question by:citadelind
2 Comments
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
ID: 35065955
0
 

Author Comment

by:citadelind
ID: 35109689
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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

17 Experts available now in Live!

Get 1:1 Help Now