How to Post SOAP Envelope XML Request From PHP

In this post i will show you How to send soap envelope xml request in PHP. No need to declare long request array, just simple pass soap xml as request using header information. Soap envelope contains the headers and soap body. You need to call a function or method on web server with some parameters to process the request.

Soap Envelope XML Request Format is like that:

You May Also Like:

How to Authenticate with D&B Direct API Web Service
How to Implement UPS API and Create Shipping Label
How to Get User Data From API
How to Send Order Data in Shipstation Via API Call

How to Post Soap Envelop XML Request in PHP

We can post soap xml using curl method. Define the curl request header and post the soap envelop xml data. Check the below code to execute this request.

You need to change SOAPaction and request url as per soap envelop request pattern and call method this curl method in php. This is quite easy to implement this soap api call.

Leave a Comment