As I haven't any answer, I am trying again
 
Please help me...
Fabien
----- Original Message -----
Sent: Tuesday, July 11, 2006 9:59 AM
Subject: Re: [AXIS2] Problem to engage a module at the client side

i still have the same problem -> my module is not executed in the client side...
 
1) This is a part of my client code:
 
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:/eclipse_workspace/axis2", "D:/eclipse_workspace/axis2/conf/axis2.xml");
           
//Non-Blocking Invocation
sender = new ServiceClient(configContext, null);
sender.setOptions(options);
sender.sendReceiveNonBlocking(payload, callback);
2) This is the content of the D:/eclipse_workspace/axis2 directory:
 
D:/eclipse_workspace/axis2
            |
            |---------conf
            |            |
            |            |---------axis2.xml
            |
            |---------modules
            |            |
            |            |-----------------logging.mar
            |            |-----------------addressing.mar
            |       
            |---------services
            |            |
            |            |-----------------MyService.aar
            |            |-----------------version.aar
 
 
3) My modules are engaged in the axis2.xml with the two following commands:
 
<module ref="addressing"/>
<module ref="logging"/>
 
4) I added the logging phase in the axis2.xml:
 
<phaseOrder type="inflow">
        <!--  System pre defined phases       -->
        <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
        </phase>
        <phase name="Security"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
 
            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="PostDispatch"/>
            </handler>
        </phase>
        <!--  System pre defined phases       -->
        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
        <phase name="logging"/>
        <phase name="OperationInPhase"/>
        <phase name="soapmonitorPhase"/>
    </phaseOrder>
    <phaseOrder type="outflow">
        <!--      user can add his own phases to this area  -->
        <phase name="logging"/>
        <phase name="OperationOutPhase"/>
  <phase name="soapmonitorPhase"/>
        <!--system predefined phase-->
        <!--these phase will run irrespective of the service-->
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
    </phaseOrder>
    <phaseOrder type="INfaultflow">
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
 
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
 
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
 
            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="PostDispatch"/>
            </handler>
        </phase>
        <!--      user can add his own phases to this area  -->
        <phase name="logging"/>
        <phase name="OperationInFaultPhase"/>
  <phase name="soapmonitorPhase"/>
    </phaseOrder>
    <phaseOrder type="Outfaultflow">
        <!--      user can add his own phases to this area  -->
        <phase name="logging"/>
        <phase name="OperationOutFaultPhase"/>
        <phase name="soapmonitorPhase"/>
  <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
    </phaseOrder>
 
5) This is my module.xml file
 
<module name="logging">
<Description> This is a test module! </Description>
    <inflow>
        <handler name="InFlowLogHandler" class="userguide.loggingmodule.LogHandler">
            <order phase="logging"/>
        </handler>
    </inflow>
 
    <outflow>
        <handler name="OutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
            <order phase="logging"/>
        </handler>
    </outflow>
 
    <Outfaultflow>
        <handler name="FaultOutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
            <order phase="logging"/>
        </handler>
    </Outfaultflow>
 
    <INfaultflow>
        <handler name="FaultInFlowLogHandler" class="userguide.loggingmodule.LogHandler">
            <order phase="logging"/>
        </handler>
    </INfaultflow>
</module>
 
6) This is the content of logging.mar
 
logging.mar
            |
            |---------META-INF  
            |            |---------module.xml
            |
            |---------userguide
            |            |
            |            |-----------loggingmodule           
                                            |           
                                            |--------------LogHandler.class
                                            |--------------LogHandler.java
 
 
 
7) Finally, this is the code in the LogHandler.java file
 
 
package userguide.loggingmodule;
 
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
 

import javax.xml.namespace.QName;
 
public class LogHandler extends AbstractHandler{
 private static final Log log = LogFactory.getLog(LogHandler.class);
    private QName name;
 
    public QName getName() {
        return name;
    }
 
    public void invoke(MessageContext msgContext) throws AxisFault {
     System.out.println("TRACE LOGHANDLER --> Module LOGGING - Méthode Invoke");
     System.out.println(msgContext.getEnvelope()+"\n");
    }
 
    public void revoke(MessageContext msgContext) {
        log.info(msgContext.getEnvelope().toString());
    }
 
    public void setName(QName name) {
        this.name = name;
    }
 
}
 
 
Notes:
The module Addressing works properly in both sides (server and client).
The module logging works only in the server side.
With all these data, someone has an idea!!?
I'm a bit lost... It should work for me!!
 
Please help me
Fabien
 
 
 
----- Original Message -----
Sent: Monday, July 10, 2006 2:08 PM
Subject: Re: [AXIS2] Problem to engage a module at the client side

Okay Ajith,
But my modules are engaged in the client side. I'm sure of that because I have checked.
The only thing is that the module is not executed.
Have we to declare something different that we do for thr server?
Actually, I was wondering how the client know that it has to execute the handlers.
In fact, in the server, handlers are assigned to service so I understant how it works.
But in the client side, there is nothing which specify which handlers has to be executed!!
If you have some explanations!!
Any suggestion about my problems?
 
Fabien
----- Original Message -----
Sent: Monday, July 10, 2006 11:27 AM
Subject: Re: [AXIS2] Problem to engage a module at the client side

Hi,
That is the problem :) The SOAP monitor is actually set to work in the serverside AFAIK and from your stacktrace, that seems to be the culprit. Please comment out the module element and see.

Ajith

On 7/10/06, Fabien Couble <[EMAIL PROTECTED]> wrote:
Yes, the soapMonitor is engaged in the client side
I have the following line in my axis2.xml file
 
<module ref="soapmonitor"/>
 
But is it really necessary?
 
Regards
Fabien
----- Original Message -----
Sent: Monday, July 10, 2006 10:59 AM
Subject: Re: [AXIS2] Problem to engage a module at the client side

Hi,
Did you enable the SOAPmonitor ? please check your Axis2.xml to see whether there are any SOAPMonitor handlers engaged in the client side

Ajith


On 7/10/06, Fabien Couble <[EMAIL PROTECTED]> wrote:
Hello,
I still have a problem to engage a module at the client side.
To engage the module, I just put the following command in my client code:
 
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:/eclipse_workspace/axis2", "D:/eclipse_workspace/axis2/conf/axis2.xml"); 
sender = new ServiceClient(configContext, null);
sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
sender.engageModule(new QName("logging"));
sender.setOptions(options);
sender.sendReceiveNonBlocking(payload, callback);
 
But an exception is raised at the client side. The exception is the following:
 

Exception in thread "Axis2 Task" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at org.apache.axis2.handlers.soapmonitor.SOAPMonitorHandler.invoke(SOAPMonitorHandler.java:107)

at org.apache.axis2.engine.Phase.invoke(Phase.java:381)

at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)

at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:610)

at org.apache.axis2.transport.http.HTTPWorker.processRequest(HTTPWorker.java:292)

at org.apache.axis2.transport.http.server.SimpleConnectionThread.run(SimpleConnectionThread.java:92)

at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Unknown Source)

 

Please, help me because I'm very confused.

Fabien

 

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.




--
Ajith Ranabahu
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.




--
Ajith Ranabahu
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Reply via email to