axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Chinthaka <chinth...@opensource.lk>
Subject Re: [Axis2] Non-blocking dual client
Date Sat, 22 Jul 2006 14:28:20 GMT
Hi Marta,

If there is an NPE, I will fix it.

But I'm sorry I'm missing something here. You *must* have a relatesTo
value, when you do a dual channel, non-blocking invocation. So what do
you mean by saying "in my case relatesTO is null"?


-- Chinthaka


Marta García Rueda wrote:
> I´m very sorry, I don´t explain my problem well.
> You are right, I´m trying to do a dual channel non-blocking client and the
> CodeGen generates my CallbackHandler, I´m using ADB also.
> 
> The problem it´s that when I´m trying to obtain the result for:
> callbackReceiver.receive(messageContext) I have an exception.
> 
> java.lang.NullPointerException at
> org.apache.axis2.util.CallbackReceiver.receive(CallbackReceiver.java:32)
> 
> I have seen that the method receive in
> org.apache.axis2.util.CallbackReceiver makes 
> RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
> String messageID = relatesTO.getValue();
> 
> And in my case relatesTO is null so messageID throws an exception and I
> can´t obtain the result. So, callback in never onComplete and the
> CallbackHandler is never call.
> 
> My client works fine but I don´t know how to obtain the webservice response.
> 
> 
> Thank you very much.
> 
> Marta García.
> 
> -----Mensaje original-----
> De: robert lazarski [mailto:robertlazarski@gmail.com] 
> Enviado el: miércoles, 19 de julio de 2006 20:32
> Para: axis-dev@ws.apache.org
> Asunto: Re: [Axis2] Non-blocking dual client
> 
> You're trying to do dual channel non-blocking, right?  Several things
> here don't make sense to me here. Perhaps with some more info maybe we
> can help:
> 
> 1) You say you are using codegen with a hashMap - but there is no wsdl
> type for java.util.HashMap .
> 
> 2) CodeGen generates its own *CallbackHandler.java , right? The code
> you are showing looks like its from the code gen stub. What you really
> need to do, IMHO, is implement your
> *CallbackHandler.java methods and invoke your Stub.start* (at least
> using xmlbeans, probably the samething for ADB) methods that receive
> the argument of *CallbackHandler .
> 
> HTH,
> Robert
> http://www.braziloutsource.com/
> 
> On 7/19/06, Marta García Rueda <mgr223@tid.es> wrote:
>>
>>
>>
>> Hi,
>>
>> I´m doing an asynchronous client for a web services with the Code
> Generator
>> Tool and my stub class it´s like that:
>>
>>
>>
>> _operationClient.getOptions().setUseSeparateListener(true);
>>
>>
> _operationClient.getOptions().setTransportInProtocol(org.apache.axis2.Consta
> nts.TRANSPORT_HTTP);
>> org.apache.axis2.util.CallbackReceiver _callbackReceiver =
>> null;
>>
>> if (_operations[0].getMessageReceiver() == null &&
>> _operationClient.getOptions().isUseSeparateListener()) {
>>
>> _callbackReceiver = new
>> org.apache.axis2.util.CallbackReceiver();
>>
>>
>> _operations[0].setMessageReceiver(_callbackReceiver);
>>
>> }
>>
>> _operationClient.execute(false);
>>
>>
>>
>> When I debug this I see that the object callbackReceiver has the result in
> a
>> hashMap callbackStore. But I don´t know how to retrieve the result. I have
>> to implement a Listener o something like that? Could you tell me where can
> I
>> find an example?
>>
>>
>>
>> Thank you very much.
>>
>> Marta García.
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> 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