带有SoapClient的PHP肥皂头

时间:2016-02-26 15:54:28

标签: php soap header

我对SOAP客户端没有经验。 到目前为止,我可以检索出版物列表,但我应该设置一个标题。

XML格式如下:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Export" nillable="true" type="Export" />
  <xs:complexType name="Export">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Header" type="GenericHeader" />
      <xs:element minOccurs="0" maxOccurs="1" name="Publications" type="ArrayOfGenericObject" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="GenericHeader">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Action" type="EAction" />
      <xs:element minOccurs="0" maxOccurs="1" name="UserReference" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="EAction">
    <xs:restriction base="xs:string">
      <xs:enumeration value="RESET" />
      <xs:enumeration value="UPDATE" />
    </xs:restriction>
  </xs:simpleType>
.......... etc

我该如何设置导出EA活动?

到目前为止,我有这个:

$client = new SoapClient("http://weblink.xxxxxxxxx.com/weblink.asmx?wsdl", array(
  'login'     => "xxxxxxx",
  'password'  => "xxxxxxx",
));
$result = $client->GetPublicationSummaries();

0 个答案:

没有答案