.net client calling Apache axis web service

Discussion in 'Java' started by danparker276@yahoo.com, Jun 8, 2005.

  1. Guest

    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//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>
     
    , Jun 8, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joey Vendetta
    Replies:
    0
    Views:
    3,508
    Joey Vendetta
    Apr 1, 2004
  2. Replies:
    0
    Views:
    990
  3. hocho888
    Replies:
    1
    Views:
    680
  4. Michael Averstegge
    Replies:
    0
    Views:
    4,323
    Michael Averstegge
    Jan 10, 2006
  5. JGH
    Replies:
    1
    Views:
    441
Loading...

Share This Page