.net client calling Apache axis web service

D

danparker276

I just need to pass a username and password.

In .net I pass a UsernameToken using wse,
Microsoft.Web.Services2.Security.

Is there an easier way to set the username and password in .net so
Apache axis can just with the AuthHandler with the users.list file?

When I call the apache java webservice, I can see the username and
password if I print out the soap header, but I can't use a handler to
authenticate it. I tried WSS4J, but that doesn't seem to work for me.
This example
http://www.mail-archive.com/[email protected]/msg00022.html

I'm using this in my wsdd, inside my service
<SERVICE...
<responseFlow>
<handler type="java:eek:rg.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="action" value="UsernameToken"/>
</handler>
</responseFlow>


This works:
Message m = MessageContext.getCurrentContext().getCurrentMessage();
SOAPHeader sh = m.getSOAPPart().getEnvelope().getHeader();

I can't get username and password though:
MessageElement usernameToken = new
MessageElement("","wsse:UsernameToken");
What's the best way to pull it out??


and this is my header:
<soapenv:Header
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><ns1:Action
xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/03/addressing"/><ns2:MessageID
xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:3bdbf5ff-863d-40d8-9ac5-1e06175796cc</ns2:MessageID><ns3:ReplyTo
xmlns:ns3="http://schemas.xmlsoap.org/ws/2004/03/addressing"><ns3:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</ns3:Address></ns3:ReplyTo><ns4:To
xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://usfshlxcol01:8098/alert/services/AlertService</ns4:To><ns5:Security
xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><ns6:Timestamp
ns6:Id="Timestamp-cbfb8490-f3d0-4c89-9af8-7cde7e649673"
xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns6:Created>2005-06-08T18:41:26Z</ns6:Created><ns6:Expires>2005-06-08T18:42:26Z</ns6:Expires></ns6:Timestamp><ns5:UsernameToken
wsu:Id="SecurityToken-04c0f2cc-2b92-47c3-b8db-806dcf32e292"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns5:Username>verve2</ns5:Username><ns5:password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">verve2</ns5:password><ns5:Nonce>eYjIDmQciKMfFveKzc4Wqw==</ns5:Nonce><wsu:Created>2005-06-08T18:41:26Z</wsu:Created></ns5:UsernameToken></ns5:Security></soapenv:Header>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top