Home » Php » How can i call and set parameter in header and function in SOAP API in PHP?

How can i call and set parameter in header and function in SOAP API in PHP?

Posted by: admin August 13, 2018 Leave a comment

Questions:

I Work on Rest API Only and I am new in SOAP API, I am integrating Third Party API Which developed on SOAP API?

How can I call it function “GetAvailibility” and also header and set the parameter?

THIRD PARTY XML CODE:

<?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
       <Authenticate xmlns="http://tempuri.org/">
         <InterfaceCode>10</InterfaceCode>
         <InterfaceAuthKey>jskjks</InterfaceAuthKey>
         <AgentCode>ggsjs2222</AgentCode>
         <Password>abcd</Password>
       </Authenticate>
    </soap:Header>
  <soap:Body>
     <GetAvailibility xmlns="http://tempuri.org/">
        <strRequestXML>string</strRequestXML>
     </GetAvailibility>
   </soap:Body>
  </soap:Envelop
Answers: