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
[email protected]. Thanks!

Andreas


On Sun, Oct 10, 2010 at 23:09, max hal <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to