I am trying to use QAS web services for postcode lookup in UK. When I am posting my request XML, it says "Server did not recognize the value of HTTP Header SOAPAction: DoSearch."
When I remove mMethod.setRequestHeader("SOAPAction", "/DoSearch"); from my SOAPClient, the error then received is Unable to handle request without a valid action parameter. Please supply a valid soap action.
The link to WSDL is: https://ws.ondemand.qas.com/ProOnDemand/V3/ProOnDemandService.asmx?WSDL
I guess promlem is that I am not being able to set the action parameter in the header, but I dont have any clue on how to do so, and I am kind of stuck. Please help.
The request XML which I am trying to post is:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:qas="http://www.qas.com/OnDemand_2011-03">
<soap:Header>
<qas:QAAuthentication>
<qas:Username>username</qas:Username>
<qas:Password>password</qas:Password>
</qas:QAAuthentication>
</soap:Header>
<soap:Body>
<QASearch RequestTag="Single Line postcode search"
xmlns:web="http://www.qas.com/OnDemand_2011_03">
<web:Country>GBR</web:Country>
<web:Engine Flatten="true ">Singleline</web:Engine>
<web:Layout>QADefault</web:Layout>
<web:Search>B168JR</web:Search>
</QASearch>
</soap:Body>
</soap:Envelope>
http://www.qas.com/OnDemand-2011-03/DoSearch
. – Beau Grantham