-1
SoapUI를 사용하면 웹 서비스에서 올바른 응답을받습니다. 내가 PHP를webservice : xml을 PHP 배열로 변환
에서 그것을 할 때 내가 이상이 그러나 이 내 코드입니다 : 나는 'InfoValue을 변환 할 수있는 방법
$mysoap = new SoapClient($wsdlFile,array('trace' => 1));
$result = $mysoap->__call("Myfunction", array("parameters" => array('Entry' => $Entry,'Parm' => $data)));
그것은 정확하지의 내 $ 데이터의 (InfoValue)
$data = array('appName' => 'Globe',
'exitUrl' => '' ,
'redirectError' => '',
'sessionId' => '' ,
'addInfo' => array(
'Info'=> array(
'InfoName' => 'CLIENT_LAYOUT',
'InfoValue' => '
<![CDATA[
<cartSession xmlns:ns2="com.camel.business.xml.settingsTree-7.1.0.0" xmlns:ns4="com.camel.business.xml.cameleonTree-7.2.0.0" xmlns:ns3="com.camel.business.xml.configurationTree-7.1.0.0">
<cartSessionSettings>
<operationType>createCart</operationType>
<lazyLoading>YES</lazyLoading>
<cartDomainId>-</cartDomainId>
<cartId>CATALOGUE_ON_LINE</cartId>
<cartRelease>1</cartRelease>
<modelName>Default</modelName>
<modelRelease>1</modelRelease>
<layout>cpqUI</layout>
<language>FR</language>
<currency>EUR</currency>
<targetURL>/cartApp.do</targetURL>
<redirectModeOnClose>inside</redirectModeOnClose>
<userGroup>SalesRep</userGroup>
<userId>admin</userId>
<admin</userName>
<ownerGroup>SalesRep</ownerGroup>
<ownerId>admin</ownerId>
<ownerName>admin</ownerName>
<applyDate>20161020 120000</applyDate>
<initAction name="CatalogList">
<param id="catalogServiceNames" value="CATALOGUE_PRODUITS"/>
</initAction>
</cartSessionSettings>
<customSettings>
</customSettings>
<connectorsData>
<services>
<service id="CATALOGUE_PRODUITS" type="edgeConfigurator">
<param id="CPE.Settings.Session.ModelVersion" value=""/>
</service>
</services>
</connectorsData>
</cartSession>]]>'
)
)
);
'on php.
이
은<ns3:Info> <ns3:InfoNom>CLIENT_LAYOUT</ns3:InfoNom> <ns3:InfoValue> <![CDATA[ <cartSession xmlns:ns2="com.camel.business.xml.settingsTree-7.1.0.0" xmlns:ns4="com.camel.business.xml.camelTree-7.2.0.0" xmlns:ns3="com.camel.business.xml.configurationTree-7.1.0.0"> <cartSessionSettings> <operationType>createCart</operationType> <lazyLoading>YES</lazyLoading> <cartDomainId>-</cartDomainId> <cartId>CATALOGUE_EN_LIGNE</cartId> <cartRelease>1</cartRelease> <modelName>Default</modelName> <modelRelease>1</modelRelease> <layout>cpqUI</layout> <language>FR</language> <currency>EUR</currency> <targetURL>/cartApp.do</targetURL> <redirectModeOnClose>inside</redirectModeOnClose> <userGroup>SalesRep</userGroup> <userId>admin</userId> <userName>The administrator</userName> <ownerGroup>SalesRep</ownerGroup> <ownerId>admin</ownerId> <ownerName>The administrator</ownerName> <applyDate>20161129 120000</applyDate> <initAction name="CatalogList"> <param id="catalogServiceNames" value="CATALOGUE_PRODUITS"/> </initAction> </cartSessionSettings> <customSettings> </customSettings> <connectorsData> <services> <service id="CATALOGUE_PRODUITS" type="edgeConfigurator"> <param id="CPE.Settings.Session.ModelVersion" value=""/> </service> </services> </connectorsData> </cartSession>]]></ns3:InfoValeur>
infoValue 이스케이프 XML 코드없이
... 이제 귀하의 질문은 무엇입니까? –
내 질문은 어떻게 변경하거나 PHP 코드로 해석 될 "infoValue"로 변환 – WebDev
당신은하지 않습니다. XML 조각 (CDATA 섹션) 안에있는 XML 문자열이며이를 문자열로 읽고 XML API를 사용하여 파싱합니다. – ThW