Hi,

I was not aware of the fact that there is a separate list for Axis 1. 
Therefore, i am forwarding my own post to this list. I hope that someone can 
help me with the problem below.

Thanks in advance
 --Max

-------- Original-Nachricht --------
Datum: Sun, 10 Oct 2010 23:13:37 +0200
Von: Andreas Veithen <andreas.veit...@gmail.com>
An: java-u...@axis.apache.org
Betreff: Re: Axis 1. UserToken authentication

As part of the promotion of the Axis project to a top level project,
we have decided to create separate mailing lists for Axis 1 and Axis2.
For all Axis 1 related questions please subscribe and post to
axis1-java-u...@axis.apache.org. Thanks!

Andreas


On Sun, Oct 10, 2010 at 23:09, max hal <max-...@gmx.de> wrote:
> Hello,
>
> currently i am working on a web service client that interfaces a web service 
> which requires WS-Security UsernameToken authentication. The web service 
> expects the UsernameToken as a soap header.
>
> I was studying the WSS4J documentation of Axis 1 
> (http://ws.apache.org/wss4j/axis.html). However, my implementation throws the 
> error:
>
> ---snip---
> "AxisFault
>  faultCode: 
> {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd}InvalidSecurity
>  faultSubcode:
>  faultString: An error was discovered processing the wsse:Security header.
>  faultActor:
>  faultNode:
>  faultDetail:
>        {http://xml.apache.org/axis/}stackTrace:An error was discovered 
> processing the wsse:Security header.
>        at 
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)"
> ...
> ---snap---
>
> I don't know why i am getting this security related error. My minimal example 
> follows the documentation above:
>
> ---snip---
>        public static void main(String[] args) {
>
>                SecurityTokenService locator = new 
> SecurityTokenServiceLocator();
>                try {
>                        SecurityTokenServiceWS service = 
> locator.getTokenService(new URL("https://sts.idm.telekom.com/TokenService";));
>
>                        PWCallback pwCallback = new PWCallback();
>                        Stub axisPort = (org.apache.axis.client.Stub) service;
>                        axisPort._setProperty(UsernameToken.PASSWORD_TYPE, 
> WSConstants.PASSWORD_DIGEST);
>                        axisPort._setProperty(WSHandlerConstants.USER, 
> "myusername");
>                        
> axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, pwCallback);
>
>                        SecurityTokenFormatIdHolder tokenFormat = new 
> SecurityTokenFormatIdHolder();
>                        SecurityTokenEncodingIdHolder tokenEncoding = new 
> SecurityTokenEncodingIdHolder();
>                        StringHolder tokenData = new StringHolder();
>                        service.login(tokenFormat, tokenEncoding, tokenData);
>                } catch (ServiceException e) {
>                        e.printStackTrace();
>                } catch (FaultResponse e) {
>                        e.printStackTrace();
>                } catch (RemoteException e) {
>                        e.printStackTrace();
>                } catch (MalformedURLException e) {
>                        e.printStackTrace();
>                }
>        }
> ---snap---
>
> I am using Axis 1 and java 1.4. The stub was generated with wsdl4java. I 
> appreciate any help on this.
>
> --Max
>
> --
> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org


-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: axis1-java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: axis1-java-user-h...@axis.apache.org

Reply via email to