Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1448
  • Last Modified:

.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!
0
nj07869
Asked:
nj07869
  • 2
2 Solutions
 
ShazbotOKCommented:
Any code examples to show on this?  Normally it would pertain to how your setting your SoapHeader data to send.
0
 
nj07869Author Commented:
i am using WSE 3.0.
0
 
nj07869Author Commented:
d
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now