如何使用xsd结构作为wsdl的输入?

时间:2018-06-04 12:15:33

标签: php soap xsd wsdl

我不知道使用xsd文件调用wsdl中记录的Web服务?

并且,当我测试" SoapClient :: __ getFunctions"对于wsdl,只有一个命名过程的方法及其输入&输出是" TSO_DATA"

最终可能在下面 TSO关联数组(作为json表示)?

[
    "TSOheader": {
        "TSOID": "",
        ....
    },
    "TSOattributes": [
        "attribute": {
            "name": "",
            "value": ""
        },
        "list": [
            "name": "",
            "value": ""
        ]
    ],
    "TSOresult": [
        "statusCode": "",
        "errorCode": "",
        "errorDescription": ""
    ],
    "DELIVERY_CONTENT": ""
]

wsdl文件

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="SO_BC_Prov_SubscriptionServiceVariant"
    targetNamespace="http://www.accenture.com/assets/sdp/sync/SO_BC_Prov_SubscriptionServiceVariant"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://www.accenture.com/assets/sdp/sync/SO_BC_Prov_SubscriptionServiceVariant"
    xmlns:cdm="http://www.accenture.com/assets/sdp/commonDataModel/asynch"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
        <schema attributeFormDefault="qualified" elementFormDefault="qualified"
            targetNamespace="http://www.accenture.com/assets/sdp/sync/SO_BC_Prov_SubscriptionServiceVariant"
            xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://www.accenture.com/assets/sdp/commonDataModel/asynch"
                schemaLocation="TSOSchema_ASYNCH_withnamespace_v4.xsd" />
        </schema>
    </types>
    <message name="SO_BC_Prov_SubscriptionServiceVariantRequestMessage">
        <part name="payload" element="cdm:TSO_DATA">
        </part>
    </message>
    <message name="SO_BC_Prov_SubscriptionServiceVariantResponseMessage">
        <part name="payload" element="cdm:TSO_DATA">
        </part>
    </message>
    <portType name="SO_BC_Prov_SubscriptionServiceVariant">
        <operation name="process">
            <documentation>
                process
                @autopilot.sla.success 250
                @autopilot.sla.exception 500
            </documentation>
            <input message="client:SO_BC_Prov_SubscriptionServiceVariantRequestMessage">
            </input>
            <output message="client:SO_BC_Prov_SubscriptionServiceVariantResponseMessage">
            </output>
        </operation>
    </portType>
    <binding name="SO_BC_Prov_SubscriptionServiceVariantBinding"
        type="client:SO_BC_Prov_SubscriptionServiceVariant">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <operation name="process">
            <soap:operation style="document" />
            <input>
                <soap:body use="literal" />
            </input>
            <output>
                <soap:body use="literal" />
            </output>
        </operation>
    </binding>
    <service name="SO_BC_Prov_SubscriptionServiceVariant">
        <port name="SO_BC_Prov_SubscriptionServiceVariantPortType"
            binding="client:SO_BC_Prov_SubscriptionServiceVariantBinding">
            <soap:address
                location="http://example.com:7712/CallGateSubscriptionWS/services/SO_BC_Prov_SubscriptionServiceVariant/" />
        </port>
    </service>
</definitions>

xsd文件

<?xml version='1.0' encoding='ISO-8859-1'?>
<xs:schema targetNamespace="http://www.accenture.com/assets/sdp/commonDataModel/asynch"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.accenture.com/assets/sdp/commonDataModel/asynch"
    elementFormDefault="qualified">
    <xs:element name="TSO_DATA">
    <xs:element name="TSO_DATA">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="TSOheader" />
                <xs:element ref="TSOattributes" minOccurs="0" />
                <xs:element ref="TSOresult" minOccurs="0" />
                <xs:element name="DELIVERY_CONTENT" type="xs:string"
                    minOccurs="0" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="TSOattributes">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="attribute" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="list" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="TSOheader">
        <xs:complexType>
            <xs:attribute name="TSOID" type="xs:string" use="required" />
            <xs:attribute name="TSOlabel" type="xs:string" use="required" />
            <xs:attribute name="destinationSystemId" type="xs:string" />
            <xs:attribute name="destinationSystemPassword" type="xs:string" />
            <xs:attribute name="inconcertTaskId" type="xs:string" />
            <xs:attribute name="numberOfAttributes" type="xs:string" />
            <xs:attribute name="sequenceId" type="xs:string" />
            <xs:attribute name="continueOnFail" type="xs:string" />
            <xs:attribute name="rollbackOnError" type="xs:string" />
            <xs:attribute name="actionReason" type="xs:string" />
            <xs:attribute name="submitTSO" type="xs:string" />
            <xs:attribute name="orderId" type="xs:string" />
            <xs:attribute name="MSISDN" type="xs:string" />
            <xs:attribute name="IMSI" type="xs:string" />
            <xs:attribute name="priority" type="xs:int" />
        </xs:complexType>
    </xs:element>
    <xs:element name="TSOresult">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="statusCode" />
                <xs:element ref="errorCode" minOccurs="0" />
                <xs:element ref="errorDescription" minOccurs="0" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="attribute">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="value" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="errorCode" type="xs:string" />
    <xs:element name="errorDescription" type="xs:string" />
    <xs:element name="list">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="attribute" minOccurs="0" maxOccurs="unbounded" />
                <xs:element ref="list" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="value" type="xs:string" />
        </xs:complexType>
    </xs:element>
    <xs:element name="statusCode" type="xs:string" />
</xs:schema>

0 个答案:

没有答案