axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: [Axis2] Asynchronous web service invocation
Date Tue, 11 Jul 2006 16:20:56 GMT
Hi;
Engaging module at client side can be done in two ways;
  - Create ConfigurationContext using a repository where that repository
has addressing module
  - And then create ServiceClient using that configuration context
 
  - The second way is to drop the addressing.mar into class path and
then create Service client using its default constructor;
   (here the meaning of class path is , the location where your
axis2.jar file is located)

Jean-Michel PATER wrote:

> I found how to do it looking in the following message :
>    [Axis2] How can I engage a module at the client side?
>
> Thanks
>
> Jean-Michel PATER wrote:
>
>> Hi,
>>
>> In the available modules, there is "addressing-1.0", and in the
>> available services, for my service it seems that "addressing-1.0" is
>> engaged.
>>
>>> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
>>> Jul 7, 2006 3:42:14 PM org.apache.catalina.core.StandardHost start
>>> INFO: XML validation disabled
>>> Jul 7, 2006 3:42:14 PM org.apache.catalina.startup.HostConfig deployWAR
>>> INFO: Deploying web application archive axis2.war
>>> INFO  org.apache.axis2.deployment.DeploymentEngine  - Deploying
>>> module : soapmonitor-1.0
>>> INFO  org.apache.axis2.deployment.DeploymentEngine  - Deploying
>>> module : addressing-1.0
>>
>> Shall I have to do something else ?
>>
>>
>> Ajith Ranabahu wrote:
>>
>>> hi,
>>> For the async calls to work WS-Addressing needs to be there. Basically
>>> you have to have the addressing module in your modules directory (or
>>> in your class path if you don't have a repo) to be engaged.
>>>
>>> Ajith
>>>
>>> On 7/7/06, Jean-Michel PATER <pater@cogenit.fr> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm trying to call a web service with the Non-Blocking API
>>>> My code is :
>>>> >             OMElement payload = doc;
>>>> >             Options options = new Options();
>>>> >             options.setTo(targetEPR);
>>>> >             options.setAction("printHello");
>>>> >            
>>>> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>>>> >             options.setUseSeparateListener(true);
>>>> >
>>>> >
>>>> >             //Callback to handle the response
>>>> >             org.apache.axis2.client.async.Callback callback =
>>>> >                 new org.apache.axis2.client.async.Callback() {
>>>> >                 public void onComplete(AsyncResult result)
>>>> > {
>>>> >                     try {
>>>> >
>>>> >
>>>> >                        
>>>> System.out.println(result.getResponseEnvelope());
>>>> >                     }
>>>> >                     catch(Exception e) {
>>>> >                         e.printStackTrace();
>>>> >                     }
>>>> >                 }
>>>> >
>>>> >                 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);
>>>> And I get the following exception :
>>>> > org.apache.axis2.AxisFault: Module not found
>>>> >     at
>>>> >
>>>> org.apache.axis2.description.AxisService.engageModule(AxisService.java:427)
>>>>
>>>> >     at
>>>> >
>>>> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:270)
>>>>
>>>> Whats' wrong ?
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>>>
>>>>
>>>
>>>
>>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 




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


Mime
View raw message