나는 이것에 대한 견고한 작동 대답을 찾지 못했습니다.PHP에서 간단한 SOAP XML 응답 읽기
저는 SOAP에서도 처음이지만, PHP에 익숙합니다.
나는 CURL 내 SOAP 요청을 보내고 내 대답은 다음과 같이 다시 온다 :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetFeatureResponse xmlns="http://www.supportsite.com/webservices/">
<GetFeatureResult>**string**</GetFeatureResult>
</GetFeatureResponse>
</soap:Body>
</soap:Envelope>
내가 저장해야합니다 -는 XML없이 MySQL 데이터베이스에> GetFeatureResult '문자열을'. 내가 시도한 모든 것은 공백으로 돌아 간다. 여기에 제가 지금 사용하고있는 것이 있습니다 :
$result = curl_exec($curl);
curl_close ($curl);
$resultXML = simplexml_load_string($result);
$item = $resultXML->GetFeatureResponse->GetFeatureResult;
가능한 중복의 : http://stackoverflow.com/questions/12485162/simplexml-load-string-will-not- read-soap-in-the-tags with – vee
중복되지 않음 - 특정 문제에 대한 해결책을 찾고있었습니다 ... 해당 질문은 모호하고 목표를 제시하지 않습니다. 그러므로 내가받은 대답은 내 문제에서 훨씬 더 도움이되었다. – Clandestine8