使用webservice得到json数据,是xsd格式的,如何用php将xsd格式文件生成xml文件?给点思路或者提示,谢谢 40
//webservice得到xsd格式文本$hu=array("CARDNO"=>"123456");$result=$client->__soapCall('GetCa...
//webservice得到xsd格式文本
$hu = array("CARDNO" => "123456");
$result = $client->__soapCall('GetCardInfo', array($hu));
//print_r 打印 result
stdClass Object
(
[GetCardInfoResult] => stdClass Object
(
[schema] => <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ds">
<xs:complexType>
<xs:sequence>
<xs:element name="CARDID" type="xs:int" minOccurs="0"/>
<xs:element name="FAX" type="xs:string" minOccurs="0"/>
<xs:element name="POSTALCODE" type="xs:string" minOccurs="0"/>
<xs:element name="EMAIL" type="xs:string" minOccurs="0"/>
<xs:element name="PROVINCE" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
[any] => <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<ds diffgr:id="ds1" msdata:rowOrder="0">
<CARDID>1344</CARDID>
<FAX/>
<POSTALCODE>201414</POSTALCODE>
<EMAIL/>
<PROVINCE>上海市</PROVINCE>
</ds>
</NewDataSet>
</diffgr:diffgram>
)
) 展开
$hu = array("CARDNO" => "123456");
$result = $client->__soapCall('GetCardInfo', array($hu));
//print_r 打印 result
stdClass Object
(
[GetCardInfoResult] => stdClass Object
(
[schema] => <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ds">
<xs:complexType>
<xs:sequence>
<xs:element name="CARDID" type="xs:int" minOccurs="0"/>
<xs:element name="FAX" type="xs:string" minOccurs="0"/>
<xs:element name="POSTALCODE" type="xs:string" minOccurs="0"/>
<xs:element name="EMAIL" type="xs:string" minOccurs="0"/>
<xs:element name="PROVINCE" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
[any] => <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<ds diffgr:id="ds1" msdata:rowOrder="0">
<CARDID>1344</CARDID>
<FAX/>
<POSTALCODE>201414</POSTALCODE>
<EMAIL/>
<PROVINCE>上海市</PROVINCE>
</ds>
</NewDataSet>
</diffgr:diffgram>
)
) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询