webservice client & ws-security

Discussion in 'Java' started by Dirk Daems, Jun 19, 2006.

  1. Dirk Daems

    Dirk Daems Guest

    Hi,
    I want to call a webservice using a Java proxy I created from a wsdl
    file. The webservice expects a ws-security username token in the SOAP
    header. Is there a common way to add this header information when
    invocing a webservice from a servlet?

    Kind regards,
    Dirk
     
    Dirk Daems, Jun 19, 2006
    #1
    1. Advertising

  2. Dirk Daems

    John W. Guest

    Dirk Daems wrote:
    > Hi,
    > I want to call a webservice using a Java proxy I created from a wsdl
    > file. The webservice expects a ws-security username token in the SOAP
    > header. Is there a common way to add this header information when
    > invocing a webservice from a servlet?
    >
    > Kind regards,
    > Dirk


    If you are using Apache Axis for the client you could use WSS4J (also
    an Apache Web Services project), it supports the Username Token
    Profile.

    John
     
    John W., Jun 19, 2006
    #2
    1. Advertising

  3. Dirk Daems

    blueice Guest

    John W. schreef:

    > Dirk Daems wrote:
    > > Hi,
    > > I want to call a webservice using a Java proxy I created from a wsdl
    > > file. The webservice expects a ws-security username token in the SOAP
    > > header. Is there a common way to add this header information when
    > > invocing a webservice from a servlet?
    > >
    > > Kind regards,
    > > Dirk

    >
    > If you are using Apache Axis for the client you could use WSS4J (also
    > an Apache Web Services project), it supports the Username Token
    > Profile.
    >
    > John


    Ok John,
    WSS4J provides utility methods to enrich a DOM document with a username
    token. But in a webservice client you normally just call a Java proxy
    class: you don't access the SOAP DOM document. So, is it possible to
    enrich the header with the token without accessing the SOAP DOM
    document?

    Kind regards,
    Dirk
     
    blueice, Jun 20, 2006
    #3
  4. Dirk Daems

    John W. Guest

    blueice wrote:
    > John W. schreef:
    >
    > > Dirk Daems wrote:
    > > > Hi,
    > > > I want to call a webservice using a Java proxy I created from a wsdl
    > > > file. The webservice expects a ws-security username token in the SOAP
    > > > header. Is there a common way to add this header information when
    > > > invocing a webservice from a servlet?
    > > >
    > > > Kind regards,
    > > > Dirk

    > >
    > > If you are using Apache Axis for the client you could use WSS4J (also
    > > an Apache Web Services project), it supports the Username Token
    > > Profile.
    > >
    > > John

    >
    > Ok John,
    > WSS4J provides utility methods to enrich a DOM document with a username
    > token. But in a webservice client you normally just call a Java proxy
    > class: you don't access the SOAP DOM document. So, is it possible to
    > enrich the header with the token without accessing the SOAP DOM
    > document?
    >
    > Kind regards,
    > Dirk


    The website provides examples of how to use an axis client
    configuration file and how to programatically insert a Username Token.
    According to the examples you can use the generated java classes but
    you will need to call the _setProperty method of the axis Stub class in
    order to inject the header.

    John
     
    John W., Jun 20, 2006
    #4
    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. batista
    Replies:
    1
    Views:
    951
    Laurent Bugnion
    Jan 26, 2006
  2. batista
    Replies:
    0
    Views:
    581
    batista
    Jan 26, 2006
  3. Mr. x
    Replies:
    2
    Views:
    738
    Andrew
    Oct 10, 2003
  4. Cyril
    Replies:
    2
    Views:
    4,542
    Cyril
    Jun 1, 2006
  5. Mr. x

    use another webservice in a webservice

    Mr. x, Sep 26, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    157
    Mr. x
    Sep 26, 2003
Loading...

Share This Page