Question

Hi I got response as like instead of STD xml. How Can i convert it into XML by using PHP ..

    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><rfc:ZHR_TIMESHEETS_GETLIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><ZDAYSUMMARY></ZDAYSUMMARY><ZMESSAGES><item><MANDT></MANDT><PERNR>00956025</PERNR><WKSTRTDT>0000-00-00</WKSTRTDT><WKENDDT>0000-00-00</WKENDDT><ZDAY>0</ZDAY><ZMESSAGE>E</ZMESSAGE><ZCOLOR_CODE></ZCOLOR_CODE><ZMESSAGE_T>You have no reportees.</ZMESSAGE_T></item></ZMESSAGES><ZTSDETAIL></ZTSDETAIL><ZWKSUMMARY></ZWKSUMMARY></rfc:ZHR_TIMESHEETS_GETLIST.Response></SOAP-ENV:Body></SOAP-ENV:Envelope> 

Thanks, Mangesh

Was it helpful?

Solution

try this:

html_entity_decode("your_string")

OTHER TIPS

If you can modify the request headers, try using Content-Type: application/soap+xml;

If not, just use html_entity_decode() on the response string.

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