php soap wdsl 接口问题。请大侠帮忙
- <definitions name="AuthorizationService" targetNamespace="http://service.authorize.XXXX.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.authorize.XXXX.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <xs:schema targetNamespace="http://service.authorize.XXXX.com/" version="1.0" xmlns:tns="http://service.authorize.XXXX.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="checkGoodsAuthorization" type="tns:checkGoodsAuthorization" />
<xs:element name="checkGoodsAuthorizationResponse" type="tns:checkGoodsAuthorizationResponse" />
<xs:element name="checkProductAuthorization" type="tns:checkProductAuthorization" />
<xs:element name="checkProductAuthorizationResponse" type="tns:checkProductAuthorizationResponse" />
<xs:element name="checkResourceAuthorization" type="tns:checkResourceAuthorization" />
<xs:element name="checkResourceAuthorizationResponse" type="tns:checkResourceAuthorizationResponse" />
<xs:element name="productAuthorization" type="tns:productAuthorization" />
<xs:element name="productAuthorizationResponse" type="tns:productAuthorizationResponse" />
- <xs:complexType name="checkProductAuthorization">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="authoReq" type="tns:authoReq" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="authoReq">
- <xs:sequence>
<xs:element minOccurs="0" name="productId" type="xs:string" />
<xs:element minOccurs="0" name="resourceId" type="xs:int" />
<xs:element minOccurs="0" name="serviceCode" type="xs:string" />
<xs:element minOccurs="0" name="userId" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="checkProductAuthorizationResponse">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:authoResultVo" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="authoResultVo">
- <xs:sequence>
<xs:element minOccurs="0" name="authorizationVo" type="tns:authorizationVo" />
<xs:element minOccurs="0" name="resultVo" type="tns:resultVo" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="authorizationVo">
- <xs:sequence>
<xs:element minOccurs="0" name="authorityId" type="xs:string" />
<xs:element minOccurs="0" name="availDateTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="beginTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="endTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="invalidationTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="productId" type="xs:string" />
<xs:element name="productNumber" type="xs:int" />
<xs:element minOccurs="0" name="productUnit" type="xs:string" />
<xs:element minOccurs="0" name="userId" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="resultVo">
- <xs:complexContent>
- <xs:extension base="tns:abstractReturnVo">
<xs:sequence />
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="abstractReturnVo">
- <xs:sequence>
<xs:element minOccurs="0" name="resultCode" type="xs:string" />
<xs:element minOccurs="0" name="resultMessage" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="productAuthorization">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="productAuthoReq" type="tns:productAuthoReq" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="productAuthoReq">
- <xs:sequence>
<xs:element minOccurs="0" name="productId" type="xs:string" />
<xs:element minOccurs="0" name="userId" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="productAuthorizationResponse">
- <xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:productAuthoResultVo" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="productAuthoResultVo">
- <xs:complexContent>
- <xs:extension base="tns:abstractReturnVo">
- <xs:sequence>
<xs:element minOccurs="0" name="authorityId" type="xs:string" />
<xs:element minOccurs="0" name="availDateTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="invalidationTime" type="xs:dateTime" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="checkGoodsAuthorization">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="authoReq" type="tns:goodsAuthoReq" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="goodsAuthoReq">
- <xs:sequence>
<xs:element minOccurs="0" name="goodsId" type="xs:string" />
<xs:element minOccurs="0" name="serviceCode" type="xs:string" />
<xs:element minOccurs="0" name="userId" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="checkGoodsAuthorizationResponse">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:authoResultVo" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="checkResourceAuthorization">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="authoReq" type="tns:resourceAuthReg" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="resourceAuthReg">
- <xs:sequence>
<xs:element minOccurs="0" name="goodsId" type="xs:string" />
<xs:element name="needPrice" type="xs:int" />
<xs:element minOccurs="0" name="resourceId" type="xs:string" />
<xs:element minOccurs="0" name="subGoodsId" type="xs:string" />
<xs:element minOccurs="0" name="subResourceId" type="xs:string" />
<xs:element minOccurs="0" name="userId" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="checkResourceAuthorizationResponse">
- <xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="tns:resAuthoResultVo" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="resAuthoResultVo">
- <xs:complexContent>
- <xs:extension base="tns:authoResultVo">
- <xs:sequence>
<xs:element minOccurs="0" name="goodsInfo" type="tns:preferentialPolicy" />
<xs:element minOccurs="0" name="subGoodsInfo" type="tns:preferentialPolicy" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="preferentialPolicy">
- <xs:sequence>
<xs:element minOccurs="0" name="dateBegin" type="xs:dateTime" />
<xs:element minOccurs="0" name="dateEnd" type="xs:dateTime" />
<xs:element name="discount" type="xs:float" />
<xs:element name="expenditure" type="xs:float" />
<xs:element minOccurs="0" name="name" type="xs:string" />
<xs:element name="pattern" type="xs:int" />
<xs:element minOccurs="0" name="policyCode" type="xs:string" />
<xs:element name="policyId" type="xs:int" />
<xs:element name="price" type="xs:float" />
<xs:element name="priority" type="xs:int" />
<xs:element name="productOfferingId" type="xs:int" />
<xs:element minOccurs="0" name="timeBegin" type="xs:dateTime" />
<xs:element minOccurs="0" name="timeEnd" type="xs:dateTime" />
<xs:element name="weekBegin" type="xs:int" />
<xs:element name="weekEnd" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
- <message name="Authorization_productAuthorization">
<part element="tns:productAuthorization" name="productAuthorization" />
</message>
- <message name="Authorization_checkResourceAuthorization">
<part element="tns:checkResourceAuthorization" name="checkResourceAuthorization" />
</message>
- <message name="Authorization_checkResourceAuthorizationResponse">
<part element="tns:checkResourceAuthorizationResponse" name="checkResourceAuthorizationResponse" />
</message>
- <message name="Authorization_checkGoodsAuthorizationResponse">
<part element="tns:checkGoodsAuthorizationResponse" name="checkGoodsAuthorizationResponse" />
</message>
- <message name="Authorization_productAuthorizationResponse">
<part element="tns:productAuthorizationResponse" name="productAuthorizationResponse" />
</message>
- <message name="Authorization_checkGoodsAuthorization">
<part element="tns:checkGoodsAuthorization" name="checkGoodsAuthorization" />
</message>
- <message name="Authorization_checkProductAuthorization">
<part element="tns:checkProductAuthorization" name="checkProductAuthorization" />
</message>
- <message name="Authorization_checkProductAuthorizationResponse">
<part element="tns:checkProductAuthorizationResponse" name="checkProductAuthorizationResponse" />
</message>
- <portType name="Authorization">
- <operation name="checkGoodsAuthorization" parameterOrder="checkGoodsAuthorization">
<input message="tns:Authorization_checkGoodsAuthorization" />
<output message="tns:Authorization_checkGoodsAuthorizationResponse" />
</operation>
- <operation name="checkProductAuthorization" parameterOrder="checkProductAuthorization">
<input message="tns:Authorization_checkProductAuthorization" />
<output message="tns:Authorization_checkProductAuthorizationResponse" />
</operation>
- <operation name="checkResourceAuthorization" parameterOrder="checkResourceAuthorization">
<input message="tns:Authorization_checkResourceAuthorization" />
<output message="tns:Authorization_checkResourceAuthorizationResponse" />
</operation>
- <operation name="productAuthorization" parameterOrder="productAuthorization">
<input message="tns:Authorization_productAuthorization" />
<output message="tns:Authorization_productAuthorizationResponse" />
</operation>
</portType>
php?soap?wdsl
[解决办法]
由
[7]=>
string(65) "struct productAuthorization {
productAuthoReq productAuthoReq;
}"
[8]=>
string(61) "struct productAuthoReq {
string productId;
string userId;
}"
可知:参数应为
$param['productAuthoReq'] = array('productId'=>$productId, 'userId'=>$userId);//参数
是一个巢状数组