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:Acti on>
<wsa:MessageID>urn:uuid:1c 5398d0-ca7 7-443f-a71 e-08b18986 e882</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-315b 6ad2d868">
<wsu:Created>2008-11-05T02 :13:12Z</w su:Created >
<wsu:Expires>2008-11-05T02 :18:12Z</w su: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-299a 03c2-9432- 4698-8442- 9fc3c8c5c0 4d">
<wsse:Username>theuser</ws se:Usernam e>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhH P/yb9stz8= </wsse:Pas sword>
<wsse:Nonce>fkanrkls6oHVAN rTw==</wss e:Nonce>
<wsu:Created>2008-11-05T02 :13:12Z</w su: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-299a 03c2-9432- 4698-8442- 9fc3c8c5c0 4d">
<wsse:Username>theuser</ws se:Usernam e>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhH P/yb9stz8= </wsse:Pas sword>
<wsse:Nonce>fkanrkls6oHVAN rTw==</wss e:Nonce>
<wsu:Created>2008-11-05T02 :13:12Z</w su:Created >
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<getMethod xmlns="http://MYURL.com/TheService/">
</getMethod>
</soap:Body>
</soap:Envelope>
please help!
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/
<wsa:MessageID>urn:uuid:1c
<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
<wsu:Created>2008-11-05T02
<wsu:Expires>2008-11-05T02
</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-299a
<wsse:Username>theuser</ws
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhH
<wsse:Nonce>fkanrkls6oHVAN
<wsu:Created>2008-11-05T02
</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-299a
<wsse:Username>theuser</ws
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jtT6X4XEpJjeN5LxhH
<wsse:Nonce>fkanrkls6oHVAN
<wsu:Created>2008-11-05T02
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<getMethod xmlns="http://MYURL.com/TheService/">
</getMethod>
</soap:Body>
</soap:Envelope>
please help!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER