0
有沒有人可以解釋soap請求xml架構中<req:xxx>
和<ns1:xxx>
用法之間的區別。SOAP請求中的<req:xxx>和<ns1:xxx>有什麼區別
例如: -
第一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請求模式使用<req:>
例如
<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>
在第一肥皂請求
: - 在第二<req:initiatePaymentDetailsReq>
肥皂請求<ns1:>
例如: - <ns1:ValidateMemberLogin>
它們之間有什麼不同。
謝謝@Michael Kay。當第一個SOAP請求與PHP代碼集成在一起時,我面臨一個問題(http://stackoverflow.com/questions/39571363/how-to-create-soap-client-in-php)。第二次成功完成。我認爲這個問題的原因是 –