Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Soap request body using 'postman' chrome app

Tags:

How would the body of a soap request look like for the 'holiday web service' (http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl) using the Postman google app?

I'm trying to use the getHolidaysAvailable method. I have tried the suggested format found on the holidaywebservice.com site but it does not work. In short, can anyone successfully post to this web service using Postman and share the soap request headers and body you use. Thanks!

like image 549
Roberto C Navarro Avatar asked Jan 02 '14 13:01

Roberto C Navarro


2 Answers

Method needs to be POST and use http://www.holidaywebservice.com//HolidayService_v2/HolidayService2.asmx?wsdl as the URL.

You must include the following in the Headers:

Content-Type: text/xml; charset=utf-8

You can add SOAPAction in the headers but is not necessary for this web service request to work as the request body will specify which SOAP Method to use, 'GetHolidaysAvailable'.

SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"

Finally, the Body should look like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.holidaywebservice.com/HolidayService_v2/">
 <SOAP-ENV:Body>
   <ns1:GetHolidaysAvailable>
     <ns1:countryCode>UnitedStates</ns1:countryCode>
   </ns1:GetHolidaysAvailable>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
like image 87
Roberto C Navarro Avatar answered Oct 20 '22 02:10

Roberto C Navarro


Your request could be something like this even:

POST /HolidayService_v2/HolidayService2.asmx/GetHolidaysAvailable HTTP/1.1    
Host: www.holidaywebservice.com
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

countryCode=UnitedStates
like image 38
Dinesh Halpage Avatar answered Oct 20 '22 01:10

Dinesh Halpage