使用SoapUI,我的webService获得了正确的响应。 但是当我从php
尝试它时,我有一个异常这是我的代码:
$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>]]>'
)
)
);
我如何转换&#39; InfoValue&#39;在php。
这是infoValue请求,
<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代码的情况下重新播放的
答案 0 :(得分:0)
非常感谢 最后它的工作 我刚删除,用于转义的xml。 祝你有愉快的一天