Daniela,

is you client enabled to use WSS4J? If your client
does not use WSS4J the server does not accept the request
because of missing security tokens and returns an
error code.

To enable your client you must have an Axis deployment
file for your client als well. In turn your client shall
have the WSS4J libs (and probably the xmlsec libs), all 
other classes (also you PWCallback) in its classpath.

Regards,
Werner

> -----Urspr�ngliche Nachricht-----
> Von: Daniela CLARO [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 11. M�rz 2005 16:36
> An: [email protected]
> Betreff: Problem in deploying with wss4j
> 
> 
> Hi all, 
>  I am using Tomcat 5.0.25 with Java 1.4.2_06-b03, Axis 1.2, 
> and I put wss4j
> that I download from 
> http://www.sagagames.com/johan/blog/wss4j.jar and I
> download xmlsec.jar at "Found XML Security API
> (org.apache.xml.security.Init) at C:\Program Files\Apache Tomcat
> 5.0\webapps\axis\WEB-INF\lib\xmlsec.jar"
> 
> The problem is that when I deploy that
> 
> <deployment xmlns="http://xml.apache.org/axis/wsdd/";
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>  <service name="stock-wss-01" provider="java:RPC" style="document"
> use="literal">
>   <requestFlow>
>    <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
>     <parameter name="passwordCallbackClass" value="PWCallback"/>
>     <parameter name="action" value="UsernameToken"/>
>    </handler>
>   </requestFlow>
>   <parameter name="className" 
> value="samples.stock.StockQuoteService"/>
>   <parameter name="allowedMethods" value="getQuote"/>
>   <parameter name="scope" value="application"/>
>  </service>
> </deployment> 
> 
> And if I did not use the handler, all think works. I create the class
> PWCallback 
> import java.io.IOException;
> import javax.security.auth.callback.Callback;
> import javax.security.auth.callback.CallbackHandler;
> import javax.security.auth.callback.UnsupportedCallbackException;
> import org.apache.ws.security.WSPasswordCallback;
> 
> public class PWCallback implements CallbackHandler {
>     public void handle(Callback[] callbacks) throws IOException,
> UnsupportedCallbackException {
>         for (int i = 0; i < callbacks.length; i++) {
>             if (callbacks[i] instanceof WSPasswordCallback) {
>                 WSPasswordCallback pc = 
> (WSPasswordCallback)callbacks[i];
>                 // set the password given a username
>                 if ("wss4j".equals(pc.getIdentifer())) {
>                     pc.setPassword("security");
>                 }
>             } else {
>                 throw new UnsupportedCallbackException(callbacks[i],
> "Unrecognized Callback");
>             }
>         }
>     }
> }
> 
> I want to know if isn't it some lib that I am missing...I 
> checked all, I did
> not find, please, if you have some idea, mail me!
> Thank you
> Daniela
> 

Reply via email to