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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to