Link to home
Start Free TrialLog in
Avatar of nj07869
nj07869

asked on

.net client for Java (Axis2) web service with UserName Security WSE 3.0

Hello,

I am not able to call a java web service using c# VS 2005. Pleaes Help.. I am using WSE 3.0 Here is what it generates...


<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <soap:Header>
         <wsa:Action>urn:MYURL.com/TheService/getMethod</wsa:Action>
         <wsa:MessageID>urn:uuid:1c5398d0-ca77-443f-a71e-08b18986e882</wsa:MessageID>
         <wsa:ReplyTo>
            <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
         </wsa:ReplyTo>
         <wsa:To>http://localhost:8421/the/services/TheService</wsa:To>
         <wsse:Security soap:mustUnderstand="1">
            <wsu:Timestamp wsu:Id="Timestamp-2ad48bb9-4d2c-49d9-8e75-315b6ad2d868">
               <wsu:Created>2008-11-05T02:13:12Z</wsu:Created>
               <wsu:Expires>2008-11-05T02:18:12Z</wsu:Expires>
            </wsu:Timestamp>
            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-299a03c2-9432-4698-8442-9fc3c8c5c04d">
               <wsse:Username>theuser</wsse:Username>
               <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhHP/yb9stz8=</wsse:Password>
               <wsse:Nonce>fkanrkls6oHVANrTw==</wsse:Nonce>
               <wsu:Created>2008-11-05T02:13:12Z</wsu:Created>
            </wsse:UsernameToken>
         </wsse:Security>
      </soap:Header>
      <soap:Body>
         <getMethod xmlns="http://MYURL.com/TheService/">

         </getMethod>
      </soap:Body>
   </soap:Envelope>




Now, if I remove the extra headers and time stamp from this, it works great (see below)


<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <soap:Header>
          <wsse:Security soap:mustUnderstand="1">
            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-299a03c2-9432-4698-8442-9fc3c8c5c04d">
               <wsse:Username>theuser</wsse:Username>
               <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhHP/yb9stz8=</wsse:Password>
               <wsse:Nonce>fkanrkls6oHVANrTw==</wsse:Nonce>
               <wsu:Created>2008-11-05T02:13:12Z</wsu:Created>
            </wsse:UsernameToken>
         </wsse:Security>
      </soap:Header>
      <soap:Body>
         <getMethod xmlns="http://MYURL.com/TheService/">

         </getMethod>
      </soap:Body>
   </soap:Envelope>



please help!
SOLUTION
Avatar of ShazbotOK
ShazbotOK
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nj07869
nj07869

ASKER

d