Question

My task is to setup a server in PHP (5.3) and respond to client with already prepared message.

Is there's any method to post/respond with raw data with SoapServer, NusoapServer or Zend?

Was it helpful?

Solution

If you want to retrieve the raw XML request document, process it and then send the raw XML response document, then none of the aforementioned libraries are probably going to help you, because they are all specifically intended to shield you from that complexity.

In order to receive the raw XML data you will need to read the raw POST data, which is best done like this:

$requestDocument = file_get_contents('php://input');

Then you'll need to process it, construct your response document and transmit it using print or echo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top