1
我想使用ksoap2庫在android中調用wsdl文件。我必須爲肥皂信封中的標題提供安全性。我在下面給出了以下類型的肥皂請求。在android中使用ksoap2提供頭文件的安全性
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" soap:mustUnderstand="1">
<wsse:UsernameToken
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Username>cbrown</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome</wsse:Password></wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body xmlns:ns1="http://xmlns.oracle.com/bpel/aubi/mobile/Worklist">
<ns1:WorklistRetrievalREQ>
<ns1:WorklistType>HR_OFFER</ns1:WorklistType>
<ns1:Status>TODO</ns1:Status>
<ns1:Mode/>
</ns1:WorklistRetrievalREQ>
</soap:Body>
</soap:Envelope>
但我不知道如何提供信封頭()中的安全性。所以,請幫助代碼。
在此先感謝...
感謝分享!!! – Mateus