I do not know the class that is missing because the only message that I
receive is that one, shown below.
Just right now, I did not change any code, that is, all thing that I
developed for axis, my simple addition web service, works fine if I did not
put this part in the deploy:
<requestFlow>
> <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
> <parameter name="passwordCallbackClass" value="PWCallback"/>
> <parameter name="action" value="UsernameToken"/>
> </handler>
> </requestFlow>
Before putting this code, everything works fine. The only thing until now
that I changed is that I create the PWCallback, as I copied from the link
below
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 {
System.out.println("Dentro do PWCallback");
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 put also the wss4j.jar that I copied either from the site, and also the
xmlsec-1.2.1.jar. It can be my wss4j.jar that has some problems, can't it?
Thank you,
Daniela
-----Message d'origine-----
De : Ashok Shah [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 4 mars 2005 18:27
� : [EMAIL PROTECTED]; [email protected]
Objet : Re: Problems on deploying with wss4j
Daniela:
Can you be more specific? Which class is not found? Make sure that your code
AND WSS4J code in axis.
--as
On Fri, 4 Mar 2005 17:39:17 +0100, Daniela CLARO <[EMAIL PROTECTED]>
wrote:
> Hi all,
> I am having some problems when I deploy my service. The first thing
> that I do is to deploy normally, as explained at
> http://weblogs.asp.net/jdanforth/archive/2005/01/16/354060.aspx
>
> When I click at View, I can view all my services with its wsdl,
> everything works fine. But when I put the wss4j code, as <deployment
> xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> <service name="Addition">
> <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="Addition"/>
> <parameter name="allowedMethods" value="add"/>
> <parameter name="scope" value="application"/> </service>
> </deployment>
>
> After deploying that, when I click at view, I can not see anymore my
> published services. And if I try to executes my application that add 2
> 3, I receive an error like NoClassDefinition, as seen above.
>
> I am only trying to receive an error like that, because I did not
> change my client yet to send the username and password.
> Exception in thread "main" AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> faultSubcode:
> faultString: WSDoAllReceiver: Request does not contain required
> Security header
>
> Thus, what am I missing?
> Thanks in advance,
> Daniela
>
>
>
> Here error that I receive...
> ------------------
>
> HTTP/1.1 500 Erreur Interne de Servlet Content-Type:
> text/html;charset=ISO-8859-1 Content-Language: fr-FR Content-Length:
> 3485
> Date: Fri, 04 Mar 2005 15:58:08 GMT Server: Apache-Coyote/1.1 Connection:
> close <html><head><title>Apache Tomcat/5.0.25 - Rapport
> d'erreur</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
> D76;fo
> nt-size:22px;} H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
> D76;fo
> nt-size:16px;} H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
> D76;fo
> nt-size:14px;} BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:whit
> e;}
> B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
> D76;}
> P
>
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:
> 12px;}A {color : black;}A.name {color : black;}HR {color :
> #525D76;}--></style> </head><body><h1>Etat HTTP 500 - </h1><HR size="1"
> noshade="noshade"><p><b>type</b> Rapport
> d'exception</p><p><b>message</b> <u></u></p><p><b>description</b>
> <u>Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de
> satisfaire la requ�te.</u></p><p><b>exception</b>
<pre>javax.servlet.ServletException:
> L'ex�cution de la servlet a lanc� une exception </pre></p><p><b>cause
> m�re</b> <pre>java.lang.NoClassDefFoundError
> java.lang.Class.forName0(Native Method)
> java.lang.Class.forName(Class.java:219)
> org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:215)
> java.security.AccessController.doPrivileged(Native Method)
> org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:199)
> org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:139)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDe
> ployab
> leItem.java:388)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSD
> DDeplo
> yableItem.java:330)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDD
> Deploy
> ableItem.java:309)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDep
> loyabl
> eItem.java:295)
>
> org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.ja
> va:164
> )
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDD
> Deploy
> ableItem.java:309)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDep
> loyabl
> eItem.java:295)
>
> org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDServic
> e.java
> :446)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDD
> Deploy
> ableItem.java:309)
>
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDep
> loyabl
> eItem.java:295)
>
> org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployme
> nt.jav
> a:485)
>
>
org.apache.axis.configuration.FileProvider.getService(FileProvider.java:261)
> org.apache.axis.AxisEngine.getService(AxisEngine.java:322)
>
> org.apache.axis.MessageContext.setTargetService(MessageContext.java:794)
> org.apache.axis.handlers.http.URLMapper.invoke(URLMapper.java:87)
>
>
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
> 71)
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)
> org.apache.axis.SimpleChain.invoke(SimpleChain.java:122)
> org.apache.axis.server.AxisServer.invoke(AxisServer.java:277)
>
> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:639)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
> 339)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> </pre></p><p><b>note</b> <u>La trace compl�te de la cause m�re de
> cette erreur est disponible dans les fichiers journaux de Apache
> Tomcat/5.0.25.</u></p><HR size="1" noshade="noshade"><h3>Apache
> Tomcat/5.0.25</h3></body></html>
>
>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/