PHP soap服务器实施

时间:2019-02-22 16:51:17

标签: php soap xml-parsing soapserver

鉴于以下是您通常会收到的肥皂消息:

        <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://ary.org/" xmlns:at="http://cps.xman.com//goa/at" xmlns:goa="http://cps.xman.com/goa"> 
    <soap:Header/> 
    <soap:Body> 
        <tem:ApplyRequest> 
            <at:Header> 
                <goa:id>Gbp</goa:id> 
                <goa:Version>1.0</goa:Version> 
                <goa:LoginID>foo</goa:LoginID> 
                <goa:Password>bar</goa:Password> 
                <goa:Timestamp>20170315081101</goa:Timestamp> 
                <goa:ConversationID>1234</goa:ConversationID> 
                <goa:HeaderExtension> 
                    <goa:Parameter> 
                    <goa:Key>name</goa:Key> 
                    <goa:Value>cps</goa:Value> 
                </goa:Parameter> 
                </goa:HeaderExtension> 
            </at:Header> 
            <at:Body> 
                <at:Parameters> 
                <goa:Parameter>
                    <goa:Key>Bunt</goa:Key> 
                    <goa:Value>1420091</goa:Value> 
                </goa:Parameter> 
                <goa:Parameter>
                    <goa:Key>Reference</goa:Key> 
                    <goa:Value>201741</goa:Value> 
                </goa:Parameter>
                </at:Parameters> 
            </at:Body> 
        </tem:ApplyRequest> 
    </soap:Body> 
    </soap:Envelope>

,以下是发送回的预期响应,

        <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://ary.org/" xmlns:at="http://cps.xman.com//goa/at" xmlns:goa="http://cps.xman.com/goa"> 
    <soap:Header/> 
    <soap:Body> 
        <tem:ApplyResponse> 
            <at:ResponseCode>0</at:ResponseCode> 
            <at:ResponseDesc>Success</at:ResponseDesc> 
        </tem:ApplyResponse> 
    </soap:Body> 
    </soap:Envelope>

一个人怎么可以实现一个php soap服务器来解析传入的soap消息,//用该数据做一些处理,然后以上面要求的格式发送回响应。请帮忙。预先感谢。

0 个答案:

没有答案