SoapServer set attribute for Body



In PHP by using SoapServer class I can create response message.


Is it possible to set attribute to body tag in response?


PHP code



ini_set( "soap.wsdl_cache_enabled", "0");
$server = new SoapServer('myWsdl.wsdl');
$server->addFunction("GetDetails");
$server->handle();


Current outcome:



<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://ift.tt/sVJIaE">
<SOAP-ENV:Body>
<ns1:GetDetailsResponse/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Expected outcome:



<SOAP-ENV:Body Id="some_id">

No comments:

Post a Comment