webservice client & ws-security

D

Dirk Daems

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
 
J

John W.

Dirk said:
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
 
B

blueice

John W. schreef:
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
 
J

John W.

blueice said:
John W. schreef:


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
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top