Reputation: 51
I am sending a SOAP Request to web service but web service soapaction is null.
My Request as below
<soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org /soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<hb:getHotelValuedAvail
xmlns:hb="http://axis.frontend.hydra.hotelbeds.com" xsi:type="xsd:string">
<HotelValuedAvailRQ echoToken="DummyEchoToken"
sessionId="sdff34rasdvs"
xmlns="http://www.hotelbeds.com/schemas/2005/06/messages" version="2013/12"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hotelbeds.com/schemas/2005/06/messages HotelValuedAvailRQ.xsd">
<Language>ENG</Language>
<Credentials>
<User>xxxxxxxx</User>
<Password>xxxxxxxx</Password>
</Credentials>
<PaginationData pageNumber="1"/>
<CheckInDate date="20150513"/>
<CheckOutDate date="20150515"/>
<Destination code="PMI" type="SIMPLE"/>
<OccupancyList>
<HotelOccupancy>
<RoomCount>1</RoomCount>
<Occupancy>
<AdultCount>2</AdultCount>
<ChildCount>0</ChildCount>
</Occupancy>
</HotelOccupancy>
</OccupancyList>
</HotelValuedAvailRQ>
</hb:getHotelValuedAvail>
</soapenv:Body>
I am getting soap action error.
Response as below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
<detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">we3mpf01</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Can anyone suggest me what we can do here ?
Upvotes: 3
Views: 16981
Reputation: 4192
The "SOAPAction" is an HTTP header that you're expected to add to the SOAP request to that service can correctly identify the action being requested. The value of the HTTP header is expected to be the fully qualified name (I.e. it includes the namespace) identifier of the action represented by the body. For the scenario you provided my guess is the value should be the following, but the WSDL will give you the specific value:
SOAPAction: "http://axis.frontend.hydra.hotelbeds.com/getHotelValuedAvail"
Upvotes: 12