【发布时间】:2016-09-21 07:14:38
【问题描述】:
谁能解释一下<req:xxx> 和<ns1:xxx> 在soap 请求xml 架构中的用法之间的区别?
例如:-
第一个 SOAP 请求 XML 架构
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://olp.bank.com/payement/service/olppaymentmanager/req">
<soapenv:Header/>
<soapenv:Body>
<req:initiatePaymentDetailsReq>
<olpIdAlias>****</olpIdAlias>
<merchantId>****</merchantId>
<merchantRefNum>234324</merchantRefNum>
<paymentAmount>200</paymentAmount>
<paymentCurrency>SAR</paymentCurrency>
<dynamicMerchantLandingURL></dynamicMerchantLandingURL>
<dynamicMerchantFailureURL></dynamicMerchantFailureURL>
</req:initiatePaymentDetailsReq>
</soapenv:Body>
</soapenv:Envelope>
第二个 XML 请求架构
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:brsmembersapi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:ValidateMemberLogin>
<login xsi:type="ns1:LoginCredentials">
<clientAPIVersion xsi:type="xsd:int">0</clientAPIVersion>
<username xsi:type="xsd:string">someapiusername</username>
<password xsi:type="xsd:string">someapipassword</password>
</login>
<memberLogin xsi:type="ns1:MemberLoginCredentials">
<username xsi:type="xsd:string">somememberusername</username>
<password xsi:type="xsd:string">somememberpassword</password>
</memberLogin>
</ns1:ValidateMemberLogin>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在第一个soap请求中使用<req:> eg:-<req:initiatePaymentDetailsReq> 在第二个soap请求中<ns1:> eg:-<ns1:ValidateMemberLogin>
他们之间有什么不同。?
【问题讨论】:
标签: xml web-services soap soapui