You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dilip Jain <di...@interinfosystems.com> on 2006/08/02 17:28:40 UTC

Module not found Error

Hi
I am trying to implement the nonblocking execution of my service sine my
service takes long time to execute..more than 15 mins.
Previously i was using blocking client. But that was giving me time out
execption as my service takes time to proces.
So i impelemted non-blocking client with a separate listener which needs to
addressing module.
In my code the foll line gives exception....
sender.engageModule(new QName(Constants.MODULE_ADDRESSING));

I tried setting the module directory in classpath. But same error. Then i
tries setting the module directory in
ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Ax
is2\\1.0\\axis2-std-1.0-bin", null);
But this too didn't worked.

Please help me


Exception:
org.apache.axis2.AxisFault: Module not found
at
org.apache.axis2.description.AxisService.engageModule(AxisService.java:395)
at
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:279)
at com.apsiva.client.ws.WSClient.getNonBlockingWebService(WSClient.java:326)
at com.apsiva.client.ws.WSClient.main(WSClient.java:76)


Code:

OMElement payload = getOMElement();

   EndpointReference targetEPR = new EndpointReference(serviceUrl);
   Options options = new Options();
         options.setAction(serviceMethod);
         options.setTo(targetEPR);
         options.setUseSeparateListener(true);
         ConfigurationContext context =

ConfigurationContextFactory.createConfigurationContextFromFileSystem(
               "D:\\Axis2\\1.0\\axis2-std-1.0-bin",
               null);

            //Callback to handle the response
            Callback callback = new Callback() {
                public void onComplete(AsyncResult result) {
                    System.out.println(result.getResponseEnvelope());
                }

                public void onError(Exception e) {
                    e.printStackTrace();
                }
            };

            //Non-Blocking Invocation
            sender = new ServiceClient();
            sender.setOptions(options);
            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.sendReceiveNonBlocking(payload, callback);

            //Wait till the callback receives the response.
            while (!callback.isComplete()) {
                Thread.sleep(1000);
            }


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Module not found Error

Posted by Dilip Jain <di...@interinfosystems.com>.
HI Chinthaka
First of all thanks for replying.
By changing my sender = new ServiceClient() to sender = new
ServiceClient(configContext, null) it did worked and my code went ahead. It
waits in the while loop
while (!callback.isComplete()) {
                Thread.sleep(1000);
            }
But now the problem seems that my client request is not reaching to the
server where service is residing.
I am using tomcat and i have added some System.out.println() messages in my
service so to know if service is been called or not.
My client is waiting the while loop and never getting response and no server
is see no messages.

What must be the problem now.
Please help
Thanks in advance.

Dilip Jain

----- Original Message ----- 
From: "Eran Chinthaka" <ch...@opensource.lk>
To: <ax...@ws.apache.org>
Sent: Wednesday, August 02, 2006 11:10 PM
Subject: Re: Module not found Error



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Module not found Error

Posted by Eran Chinthaka <ch...@opensource.lk>.
You have forgotten to pass the created config context in to the service
client.

replace sender = new ServiceClient()
with

sender = new ServiceClient(configContext, null);

-- Chinthaka

Dilip Jain wrote:
> Hi
> I am trying to implement the nonblocking execution of my service sine my
> service takes long time to execute..more than 15 mins.
> Previously i was using blocking client. But that was giving me time out
> execption as my service takes time to proces.
> So i impelemted non-blocking client with a separate listener which needs to
> addressing module.
> In my code the foll line gives exception....
> sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
> 
> I tried setting the module directory in classpath. But same error. Then i
> tries setting the module directory in
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Ax
> is2\\1.0\\axis2-std-1.0-bin", null);
> But this too didn't worked.
> 
> Please help me
> 
> 
> Exception:
> org.apache.axis2.AxisFault: Module not found
> at
> org.apache.axis2.description.AxisService.engageModule(AxisService.java:395)
> at
> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:279)
> at com.apsiva.client.ws.WSClient.getNonBlockingWebService(WSClient.java:326)
> at com.apsiva.client.ws.WSClient.main(WSClient.java:76)
> 
> 
> Code:
> 
> OMElement payload = getOMElement();
> 
>    EndpointReference targetEPR = new EndpointReference(serviceUrl);
>    Options options = new Options();
>          options.setAction(serviceMethod);
>          options.setTo(targetEPR);
>          options.setUseSeparateListener(true);
>          ConfigurationContext context =
> 
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(
>                "D:\\Axis2\\1.0\\axis2-std-1.0-bin",
>                null);
> 
>             //Callback to handle the response
>             Callback callback = new Callback() {
>                 public void onComplete(AsyncResult result) {
>                     System.out.println(result.getResponseEnvelope());
>                 }
> 
>                 public void onError(Exception e) {
>                     e.printStackTrace();
>                 }
>             };
> 
>             //Non-Blocking Invocation
>             sender = new ServiceClient();
>             sender.setOptions(options);
>             sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
>             sender.sendReceiveNonBlocking(payload, callback);
> 
>             //Wait till the callback receives the response.
>             while (!callback.isComplete()) {
>                 Thread.sleep(1000);
>             }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>