0

How can I do a POST request using PHP ?

wsdl: http://abc.vendor.com/webservices/servicealpha?wsdl
username: u01
password: p01

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns="http://abc.vendor.com/webservices/servicealpha">
   <soap:Header/>
   <soap:Body>
    <ProcessAlpha>
     <!--Optional:-->
     <xmlJob>            
      <anything>
        <Field name="id" value="C001"/>
        <Field name="name" value="One" />           
      </anything>
     </xmlJob>
  </ProcessAlpha>
 </soap:Body>
</soap:Envelope>

I see there are two option, using curl and SOAPClient but unsure which one is recommended. But I am not sure in either of these, especially with SOAPClient how to send custom xml

Thanks.

user4826347
  • 783
  • 2
  • 11
  • 29
  • This question seems to be a duplicate, have a look here: https://stackoverflow.com/questions/32225415/difference-between-soapclient-request-and-soap-curl-request-in-php – arueckauer Jun 26 '18 at 20:59
  • Possible duplicate of [Difference between SoapClient request and Soap curl request in php](https://stackoverflow.com/questions/32225415/difference-between-soapclient-request-and-soap-curl-request-in-php) – Jeff Jun 26 '18 at 21:11
  • Is there a sample code (SOAPClient) that I can have a look at - sending custom xml ? Thanks – user4826347 Jun 27 '18 at 08:00

0 Answers0