Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > .net client calling Apache axis web service

Reply
Thread Tools

.net client calling Apache axis web service

 
 
danparker276@yahoo.com
Guest
Posts: n/a
 
      06-08-2005
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/fx-dev@w.../msg00022.html

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


This works:
Message m = MessageContext.getCurrentContext().getCurrentMessa ge();
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><ns5assword
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">verve2</ns5assword><ns5:Nonce>eYjIDmQciKMfFveKzc4Wqw==</ns5:Nonce><wsu:Created>2005-06-08T18:41:26Z</wsu:Created></ns5:UsernameToken></ns5:Security></soapenv:Header>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM
SOAP::Lite, calling apache/axis demo web service JGH Perl Misc 1 07-21-2004 07:16 PM
axis.jar does not contain org.apache.axis.client.ServiceClient? Joey Vendetta Java 0 04-01-2004 05:51 PM



Advertisments