0
我想從soap標題和SOAP正文中讀取元素值。請查看下面的代碼,並幫助我獲取custid和clientid表單標題和正文。如果您需要任何進一步澄清讀取SOAP標題和正文元素
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<APHeader xmlns="http://www.test.com/es/v1/ws">
<usr>
<Verb>Set</Verb>
<Noun>ProcessEIACMPermissions</Noun>
<DataVer>001:000</DataVer>
<SrcAppID xsi:type="xsd:string">AP</SrcAppID>
<CustID>30081241</CustID>
<APMsgCorrelationID>00000000000000000000000000000000</APMsgCorrelationID>
</usr>
</APHeader>
</soap:Header>
<soap:Body>
<ProcessEIACMPermissionsRequest xmlns="http://www.adp.com/es/ezlm/v1/schema/tlmclientconfiguration">
<ClientID>30081241</ClientID>
</ProcessEIACMPermissionsRequest>
</soap:Body>
你在擺弄一個SOAP消息的XML,而不是使用工具包(Web服務)的對象模型的任何原因? – 2014-11-01 09:40:32
這是我以這種格式從客戶端獲得的請求。我沒有任何其他選擇 – Uttam 2014-11-01 09:43:15
當然,您可以選擇如何使用SOAP消息。您可以使用X(ml)文檔並採用硬核方式,您可以使用WCF通道/服務層,您可以使用XmlSerializer,DataContractSerializer,SoapFormatter。這麼多選擇。爲什麼客戶首先向你發送SOAP?網頁服務!使用WebServices工具箱! (WCF或WebAPI for Asp.Net) – 2014-11-01 09:46:05