发送请求之前的Soap Change Namespace前缀

时间:2016-06-13 12:19:12

标签: java xml web-services soap

我的肥皂信封生成如下,我想将此代码<ns1:RetrieveCustomer>生成的ns1更改为<ns0:RetrieveCustomer>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <wsse:Security env:mustUnderstand="1"
            xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>pgw</wsse:Username>
                <wsse:Password
                    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">pgw</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <ns1:RetrieveCustomer soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:ns1="http://www.webmethods.com/MEAI_OnlineServices.webServices.PGW">
            <MSISDN xsi:type="xsd:string">123456789</MSISDN>
            <CustomerCode xsi:type="xsd:string" xsi:nil="true" />
        </ns1:RetrieveCustomer>
    </soapenv:Body>
</soapenv:Envelope>

我希望将此 ns1 更改为 ns0

<ns1:RetrieveCustomer soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                xmlns:ns1="http://www.webmethods.com/MEAI_OnlineServices.webServices.PGW">
                <MSISDN xsi:type="xsd:string">123456789</MSISDN>
                <CustomerCode xsi:type="xsd:string" xsi:nil="true" />
            </ns1:RetrieveCustomer>

0 个答案:

没有答案