The Artima Developer Community
Sponsored Link

Web Services Forum
Question about WSS4J

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andres Reyes

Posts: 1
Nickname: blas53
Registered: Aug, 2006

Question about WSS4J Posted: Aug 2, 2006 2:56 PM
Reply to this message Reply
Advertisement
Hello,

I'm trying to consume a web service created in .NET from a Java application, but I'm having troubles connecting to it. I created a .NET client and it works as expected. I am using ws security for both wbe services. But from Java I am getting this error message:

Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated or authorized ---> System.Exception: WSE563: The computed password digest doesn't match that of the incoming username token. at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyHashedPasswo rd(UsernameToken token, String authenticatedPassword) at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPassword(Use rnameToken token, String authenticatedPassword) at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(Securi tyToken securityToken) at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityTok en(XmlElement element) --- End of inner exception stack trace --- at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityTok en(XmlElement element) at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml(Xm lElement element) at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement element, SecurityConfiguration configuration, Int32& tokenCount) at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element) at Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelop e envelope) at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope) at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServer Message message)

It happens when trying to make the invoke in the soap class. At this point:

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {name});

My Java code looks like this:

EngineConfiguration config = new FileProvider("client_deploy.wsdd");
Service1 locator = new Service1Locator(config);
Remote remote = locator.getPort(Service1Soap.class);
Stub axisPort = (Stub)remote;
axisPort._setProperty(WSHandlerConstants.ACTION,WSHandlerConstant s.USERNAME_TOKEN);
axisPort._setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_DIGEST);
axisPort._setProperty(WSHandlerConstants.USER, "test");
axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, pw);//"PWCallback");

Service1Soap port = (Service1SoapStub)axisPort;
System.out.println("Calling Service");
String usuario=request.getParameter("text2");
System.out.println("**************"+usua rio);
String ss=port.hello(usuario);

The WSDD file is this one:

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>
<transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
<globalConfiguration >
<requestFlow >
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken"/>
<parameter name="user" value="test"/>
<parameter name="password" value="pwd"/>
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="passwordType" value="PasswordDigest"/>
</handler>
</requestFlow >
</globalConfiguration >
</deployment>

I haven't been able to find out what the problem is.

Thanks for your collaboration.

Topic: building a soap message Previous Topic   Next Topic Topic: Create custom Dynamic IE7 and Firefox toolbars!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use