ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lapin Blanc <fabien.to...@lapin-blanc.com>
Subject Set WSS basic authentication on org.apache.axis.client.Stub
Date Sun, 18 Feb 2018 14:18:39 GMT
Hi,

I've created a SOAP client stub using Eclipse WST on a wsdl file from a
service provider I have to use.
To access this service I need to authenticate, with a really basic clear
text username/password.

The stub I'm trying to use inherit from org.apache.axis.client.Stub.

I first tried the "regular" way, by setting username and password
properties on the stub before my action is invoked. Nevertheless, the
system refused my credential, complaining about the absence of any token :

{}description:L'authentification a échoué : aucune information de sécurité
reçue (WSS X509 ou WSS UsernameToken)
{}description:Authentication failed : no proven X509 certificate or
username token found

Then I analyzed what SoapUI generated like XML request and saw that it
actually adds WSS headers to the request :

<con:wssContainer>
<con:outgoing>
<con:name>etnic</con:name>
<con:entry type="Username" password="changeMe"
username="machin@truc.be">
<con:configuration>
<addCreated>false</addCreated>
<addNonce>false</addNonce>
<passwordType>PasswordText</passwordType>
</con:configuration>
</con:entry>
</con:outgoing>
</con:wssContainer>

This way, no problem, I got the correct answer.

But I can't really figure out how to do this programmatically into my
project without having to dig deep into the XML headers etc.

I tried to understand the doc at several places (especially
https://ws.apache.org/wss4 ), but it's overwhelming, I'm wondering if there
is a simple approach...

Any help is very, very welcome... :-)

Mime
View raw message