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 Huitang Li <hu...@kpi-consulting.net> on 2007/10/05 07:19:15 UTC
AxisCallback vs. the deprecated Callback
Hi,
I created a web service client following Async/One Channel model using
axis2-generated stub. In the stub code, AxisCallback interface is used.
For almost all tests, no soap message response is received before the
client is finished. This is verified with the help of the excellent tool
tcpmon.
In AxisCallback, I did not see something like isComplete() to test
whether a whole message is retrieved or not. So I had to replace the
AxisCallback with the depreciated Callback, and then put the following
code in the stub.
while (!callback.isComplete()) {
Thread.sleep(1000);
}
Does anyone have a better solution without having to use the deprecated API?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Rajith Attapattu <ra...@gmail.com>.
Deepal,
I agree that an isComplete method is convinient, but it can be easily added
as I have shown in the example.
So it's not a major issue.
Perhaps if we document the behaviour properly we don't really need to add
that method in a hurry.
But I also agree that for the sake of backward compatibility it is good to
add that method.
It will also allow an easy migration path to the users.
Regards,
Rajith
On 10/8/07, Deepal Jayasinghe <de...@opensource.lk> wrote:
>
> Hi Huitang ,
> Yes I also agree with you that is one of the missing API in the
> AxisCallback , and even I have found it difficult without that. So
> please create a JIRA I am more than happy to fix that , though it is
> going to be a API changes.
>
> Thanks
> Deepal
> > Hi,
> >
> > I created a web service client following Async/One Channel model using
> > axis2-generated stub. In the stub code, AxisCallback interface is used.
> >
> > For almost all tests, no soap message response is received before the
> > client is finished. This is verified with the help of the excellent
> > tool tcpmon.
> >
> > In AxisCallback, I did not see something like isComplete() to test
> > whether a whole message is retrieved or not. So I had to replace the
> > AxisCallback with the depreciated Callback, and then put the following
> > code in the stub.
> >
> > while (!callback.isComplete()) {
> > Thread.sleep(1000);
> > }
> >
> > Does anyone have a better solution without having to use the
> > deprecated API?
> >
> > Thanks.
> >
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: AxisCallback vs. the deprecated Callback
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Huitang ,
Yes I also agree with you that is one of the missing API in the
AxisCallback , and even I have found it difficult without that. So
please create a JIRA I am more than happy to fix that , though it is
going to be a API changes.
Thanks
Deepal
> Hi,
>
> I created a web service client following Async/One Channel model using
> axis2-generated stub. In the stub code, AxisCallback interface is used.
>
> For almost all tests, no soap message response is received before the
> client is finished. This is verified with the help of the excellent
> tool tcpmon.
>
> In AxisCallback, I did not see something like isComplete() to test
> whether a whole message is retrieved or not. So I had to replace the
> AxisCallback with the depreciated Callback, and then put the following
> code in the stub.
>
> while (!callback.isComplete()) {
> Thread.sleep(1000);
> }
>
> Does anyone have a better solution without having to use the
> deprecated API?
>
> Thanks.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Huitang Li <hu...@kpi-consulting.net>.
Hmm.... No one replies to this posting.
It seems that it is only me who does not quite like the new AxisCallback
which does not the isComplete() method. I see the beauty of it as well,
though.
Huitang Li wrote:
> Hi,
>
> I created a web service client following Async/One Channel model using
> axis2-generated stub. In the stub code, AxisCallback interface is used.
>
> For almost all tests, no soap message response is received before the
> client is finished. This is verified with the help of the excellent
> tool tcpmon.
>
> In AxisCallback, I did not see something like isComplete() to test
> whether a whole message is retrieved or not. So I had to replace the
> AxisCallback with the depreciated Callback, and then put the following
> code in the stub.
>
> while (!callback.isComplete()) {
> Thread.sleep(1000);
> }
>
> Does anyone have a better solution without having to use the
> deprecated API?
>
> Thanks.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Huitang Li <hu...@kpi-consulting.net>.
Excellent. Thanks. Probably I just cannot help missing the old and good
isComplete() method though its era is over.
Rajith Attapattu wrote:
> There are several ways you can use AxisCallback to notify the
> completion to interested parties.
> What I showed you was a way to implement something simillar to the way
> the old Callback class was used.
>
> We could add a sample on how to use the new API.
> The general idea is for you to hook up your notification logic in the
> onComplete method.
> How this notification should happen depends on your implementation
> stratergy.
> Above is just one example.
>
> Regards,
>
> Rajith
>
> On 10/8/07, *Huitang Li* <huitang.li@kpi-consulting.net
> <ma...@kpi-consulting.net>> wrote:
>
> Thanks very much. I will try it. I hope axis2 developers will use the
> new API in the sample codes (under userguide folder) for next axis2
> release so that they can give me an idea on how to use it without
> having
> the spawning thread die prematurely.
>
>
> Rajith Attapattu wrote:
> > Here is an idea on how to use the new AxisCallback in a similar
> > fashion to the old Callback. (if thats what you are looking for)
> >
> > When you implement your callback, in the onComplete method you could
> > do the following.
> >
> > void onComplete()
> > {
> > _complete = true;
> > }
> >
> > you can add an additional method to your implementation called
> > isComplete().
> >
> > void boolean isComplete()
> > {
> > return _complete;
> > }
> >
> > Now you have the same functionality as the old Callback.
> >
> > You can poll for isComplete to know if it's done and the java
> doc for
> > onComplete says that it will be called at the end of a MEP no matter
> > what happens.
> > (I looked at the code and I see that it is the case)
> > So you can be sure that the MEP is completed when the _complete
> > boolean is set to "true".
> >
> > Regards,
> >
> > Rajith Attapattu.
> > Red Hat Canada.
> >
> > On 10/8/07, * Huitang Li* < huitang.li@kpi-consulting.net
> <ma...@kpi-consulting.net>
> > <mailto:huitang.li@kpi-consulting.net
> <ma...@kpi-consulting.net>>> wrote:
> >
> > Any thought here, please? I would love to use new API, but I do
> > not know
> > how to fit it into the product.
> >
> >
> > Huitang Li wrote:
> > > Thanks for your input. I saw the thread you mentioned
> before I sent
> > > out my question to the list. However, I cannot see the
> solution
> > to the
> > > question. The main thread can be finished before the
> spawning thread
> > > finishes getting the response from the web service server.
> Also, in
> > > axis2 1.3 sample codes, it still uses the old Callback class.
> > >
> > > I just wonder how the main thread can detect whether the
> spawning
> > > thread is complete or not with the new AxisCallback API.
> > >
> > > Any idea?
> > >
> > >
> > >
> > >
> > > Suran Jayathilaka wrote:
> > >> Huitang Li wrote:
> > >>> Hi,
> > >>>
> > >>> I created a web service client following Async/One
> Channel model
> > >>> using axis2-generated stub. In the stub code, AxisCallback
> > interface
> > >>> is used.
> > >>>
> > >>> For almost all tests, no soap message response is
> received before
> > >>> the client is finished. This is verified with the help
> of the
> > >>> excellent tool tcpmon.
> > >>>
> > >>> In AxisCallback, I did not see something like
> isComplete() to test
> > >>> whether a whole message is retrieved or not. So I had to
> > replace the
> > >>> AxisCallback with the depreciated Callback, and then put the
> > >>> following code in the stub.
> > >>>
> > >>> while (!callback.isComplete()) {
> > >>> Thread.sleep(1000);
> > >>> }
> > >>>
> > >>> Does anyone have a better solution without having to use
> the
> > >>> deprecated API?
> > >>>
> > >>> Thanks.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> >
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> > <mailto:axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>>
> > >>> For additional commands, e-mail:
> axis-user-help@ws.apache.org <ma...@ws.apache.org>
> > <mailto:axis-user-help@ws.apache.org
> <ma...@ws.apache.org>>
> > >>>
> > >>>
> > >> Hi!
> > >> Please refer to this thread.
> > >>
> >
> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
> > <
> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html>
> > >>
> > >> Cheers.
> > >> Suran
> > >>
> > >>
> >
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> > <mailto:axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>>
> > >> For additional commands, e-mail:
> axis-user-help@ws.apache.org <ma...@ws.apache.org>
> > <mailto:axis-user-help@ws.apache.org
> <ma...@ws.apache.org>>
> > >>
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> > <mailto:axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>>
> > > For additional commands, e-mail:
> axis-user-help@ws.apache.org <ma...@ws.apache.org>
> > <mailto:axis-user-help@ws.apache.org
> <ma...@ws.apache.org>>
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> > <mailto:axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>>
> > For additional commands, e-mail:
> axis-user-help@ws.apache.org <ma...@ws.apache.org>
> > <mailto:axis-user-help@ws.apache.org
> <ma...@ws.apache.org>>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Rajith Attapattu <ra...@gmail.com>.
There are several ways you can use AxisCallback to notify the completion to
interested parties.
What I showed you was a way to implement something simillar to the way the
old Callback class was used.
We could add a sample on how to use the new API.
The general idea is for you to hook up your notification logic in the
onComplete method.
How this notification should happen depends on your implementation
stratergy.
Above is just one example.
Regards,
Rajith
On 10/8/07, Huitang Li <hu...@kpi-consulting.net> wrote:
>
> Thanks very much. I will try it. I hope axis2 developers will use the
> new API in the sample codes (under userguide folder) for next axis2
> release so that they can give me an idea on how to use it without having
> the spawning thread die prematurely.
>
>
> Rajith Attapattu wrote:
> > Here is an idea on how to use the new AxisCallback in a similar
> > fashion to the old Callback. (if thats what you are looking for)
> >
> > When you implement your callback, in the onComplete method you could
> > do the following.
> >
> > void onComplete()
> > {
> > _complete = true;
> > }
> >
> > you can add an additional method to your implementation called
> > isComplete().
> >
> > void boolean isComplete()
> > {
> > return _complete;
> > }
> >
> > Now you have the same functionality as the old Callback.
> >
> > You can poll for isComplete to know if it's done and the java doc for
> > onComplete says that it will be called at the end of a MEP no matter
> > what happens.
> > (I looked at the code and I see that it is the case)
> > So you can be sure that the MEP is completed when the _complete
> > boolean is set to "true".
> >
> > Regards,
> >
> > Rajith Attapattu.
> > Red Hat Canada.
> >
> > On 10/8/07, * Huitang Li* <huitang.li@kpi-consulting.net
> > <ma...@kpi-consulting.net>> wrote:
> >
> > Any thought here, please? I would love to use new API, but I do
> > not know
> > how to fit it into the product.
> >
> >
> > Huitang Li wrote:
> > > Thanks for your input. I saw the thread you mentioned before I
> sent
> > > out my question to the list. However, I cannot see the solution
> > to the
> > > question. The main thread can be finished before the spawning
> thread
> > > finishes getting the response from the web service server. Also,
> in
> > > axis2 1.3 sample codes, it still uses the old Callback class.
> > >
> > > I just wonder how the main thread can detect whether the spawning
> > > thread is complete or not with the new AxisCallback API.
> > >
> > > Any idea?
> > >
> > >
> > >
> > >
> > > Suran Jayathilaka wrote:
> > >> Huitang Li wrote:
> > >>> Hi,
> > >>>
> > >>> I created a web service client following Async/One Channel model
> > >>> using axis2-generated stub. In the stub code, AxisCallback
> > interface
> > >>> is used.
> > >>>
> > >>> For almost all tests, no soap message response is received
> before
> > >>> the client is finished. This is verified with the help of the
> > >>> excellent tool tcpmon.
> > >>>
> > >>> In AxisCallback, I did not see something like isComplete() to
> test
> > >>> whether a whole message is retrieved or not. So I had to
> > replace the
> > >>> AxisCallback with the depreciated Callback, and then put the
> > >>> following code in the stub.
> > >>>
> > >>> while (!callback.isComplete()) {
> > >>> Thread.sleep(1000);
> > >>> }
> > >>>
> > >>> Does anyone have a better solution without having to use the
> > >>> deprecated API?
> > >>>
> > >>> Thanks.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> >
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > >>> For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> > >>>
> > >>>
> > >> Hi!
> > >> Please refer to this thread.
> > >>
> > http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
> > <http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html>
> > >>
> > >> Cheers.
> > >> Suran
> > >>
> > >>
> >
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > >> For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> > >>
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > <ma...@ws.apache.org>
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > <ma...@ws.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: AxisCallback vs. the deprecated Callback
Posted by Huitang Li <hu...@kpi-consulting.net>.
Thanks very much. I will try it. I hope axis2 developers will use the
new API in the sample codes (under userguide folder) for next axis2
release so that they can give me an idea on how to use it without having
the spawning thread die prematurely.
Rajith Attapattu wrote:
> Here is an idea on how to use the new AxisCallback in a similar
> fashion to the old Callback. (if thats what you are looking for)
>
> When you implement your callback, in the onComplete method you could
> do the following.
>
> void onComplete()
> {
> _complete = true;
> }
>
> you can add an additional method to your implementation called
> isComplete().
>
> void boolean isComplete()
> {
> return _complete;
> }
>
> Now you have the same functionality as the old Callback.
>
> You can poll for isComplete to know if it's done and the java doc for
> onComplete says that it will be called at the end of a MEP no matter
> what happens.
> (I looked at the code and I see that it is the case)
> So you can be sure that the MEP is completed when the _complete
> boolean is set to "true".
>
> Regards,
>
> Rajith Attapattu.
> Red Hat Canada.
>
> On 10/8/07, * Huitang Li* <huitang.li@kpi-consulting.net
> <ma...@kpi-consulting.net>> wrote:
>
> Any thought here, please? I would love to use new API, but I do
> not know
> how to fit it into the product.
>
>
> Huitang Li wrote:
> > Thanks for your input. I saw the thread you mentioned before I sent
> > out my question to the list. However, I cannot see the solution
> to the
> > question. The main thread can be finished before the spawning thread
> > finishes getting the response from the web service server. Also, in
> > axis2 1.3 sample codes, it still uses the old Callback class.
> >
> > I just wonder how the main thread can detect whether the spawning
> > thread is complete or not with the new AxisCallback API.
> >
> > Any idea?
> >
> >
> >
> >
> > Suran Jayathilaka wrote:
> >> Huitang Li wrote:
> >>> Hi,
> >>>
> >>> I created a web service client following Async/One Channel model
> >>> using axis2-generated stub. In the stub code, AxisCallback
> interface
> >>> is used.
> >>>
> >>> For almost all tests, no soap message response is received before
> >>> the client is finished. This is verified with the help of the
> >>> excellent tool tcpmon.
> >>>
> >>> In AxisCallback, I did not see something like isComplete() to test
> >>> whether a whole message is retrieved or not. So I had to
> replace the
> >>> AxisCallback with the depreciated Callback, and then put the
> >>> following code in the stub.
> >>>
> >>> while (!callback.isComplete()) {
> >>> Thread.sleep(1000);
> >>> }
> >>>
> >>> Does anyone have a better solution without having to use the
> >>> deprecated API?
> >>>
> >>> Thanks.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> >>> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
> >>>
> >>>
> >> Hi!
> >> Please refer to this thread.
> >>
> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
> <http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html>
> >>
> >> Cheers.
> >> Suran
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> <ma...@ws.apache.org>
> For additional commands, e-mail: axis-user-help@ws.apache.org
> <ma...@ws.apache.org>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Rajith Attapattu <ra...@gmail.com>.
Here is an idea on how to use the new AxisCallback in a similar fashion to
the old Callback. (if thats what you are looking for)
When you implement your callback, in the onComplete method you could do the
following.
void onComplete()
{
_complete = true;
}
you can add an additional method to your implementation called isComplete().
void boolean isComplete()
{
return _complete;
}
Now you have the same functionality as the old Callback.
You can poll for isComplete to know if it's done and the java doc for
onComplete says that it will be called at the end of a MEP no matter what
happens.
(I looked at the code and I see that it is the case)
So you can be sure that the MEP is completed when the _complete boolean is
set to "true".
Regards,
Rajith Attapattu.
Red Hat Canada.
On 10/8/07, Huitang Li <hu...@kpi-consulting.net> wrote:
>
> Any thought here, please? I would love to use new API, but I do not know
> how to fit it into the product.
>
>
> Huitang Li wrote:
> > Thanks for your input. I saw the thread you mentioned before I sent
> > out my question to the list. However, I cannot see the solution to the
> > question. The main thread can be finished before the spawning thread
> > finishes getting the response from the web service server. Also, in
> > axis2 1.3 sample codes, it still uses the old Callback class.
> >
> > I just wonder how the main thread can detect whether the spawning
> > thread is complete or not with the new AxisCallback API.
> >
> > Any idea?
> >
> >
> >
> >
> > Suran Jayathilaka wrote:
> >> Huitang Li wrote:
> >>> Hi,
> >>>
> >>> I created a web service client following Async/One Channel model
> >>> using axis2-generated stub. In the stub code, AxisCallback interface
> >>> is used.
> >>>
> >>> For almost all tests, no soap message response is received before
> >>> the client is finished. This is verified with the help of the
> >>> excellent tool tcpmon.
> >>>
> >>> In AxisCallback, I did not see something like isComplete() to test
> >>> whether a whole message is retrieved or not. So I had to replace the
> >>> AxisCallback with the depreciated Callback, and then put the
> >>> following code in the stub.
> >>>
> >>> while (!callback.isComplete()) {
> >>> Thread.sleep(1000);
> >>> }
> >>>
> >>> Does anyone have a better solution without having to use the
> >>> deprecated API?
> >>>
> >>> Thanks.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >>> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>>
> >>>
> >> Hi!
> >> Please refer to this thread.
> >> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
> >>
> >> Cheers.
> >> Suran
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Re: AxisCallback vs. the deprecated Callback
Posted by Huitang Li <hu...@kpi-consulting.net>.
Any thought here, please? I would love to use new API, but I do not know
how to fit it into the product.
Huitang Li wrote:
> Thanks for your input. I saw the thread you mentioned before I sent
> out my question to the list. However, I cannot see the solution to the
> question. The main thread can be finished before the spawning thread
> finishes getting the response from the web service server. Also, in
> axis2 1.3 sample codes, it still uses the old Callback class.
>
> I just wonder how the main thread can detect whether the spawning
> thread is complete or not with the new AxisCallback API.
>
> Any idea?
>
>
>
>
> Suran Jayathilaka wrote:
>> Huitang Li wrote:
>>> Hi,
>>>
>>> I created a web service client following Async/One Channel model
>>> using axis2-generated stub. In the stub code, AxisCallback interface
>>> is used.
>>>
>>> For almost all tests, no soap message response is received before
>>> the client is finished. This is verified with the help of the
>>> excellent tool tcpmon.
>>>
>>> In AxisCallback, I did not see something like isComplete() to test
>>> whether a whole message is retrieved or not. So I had to replace the
>>> AxisCallback with the depreciated Callback, and then put the
>>> following code in the stub.
>>>
>>> while (!callback.isComplete()) {
>>> Thread.sleep(1000);
>>> }
>>>
>>> Does anyone have a better solution without having to use the
>>> deprecated API?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>> Hi!
>> Please refer to this thread.
>> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
>>
>> Cheers.
>> Suran
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Huitang Li <hu...@kpi-consulting.net>.
Thanks for your input. I saw the thread you mentioned before I sent out
my question to the list. However, I cannot see the solution to the
question. The main thread can be finished before the spawning thread
finishes getting the response from the web service server. Also, in
axis2 1.3 sample codes, it still uses the old Callback class.
I just wonder how the main thread can detect whether the spawning thread
is complete or not with the new AxisCallback API.
Any idea?
Suran Jayathilaka wrote:
> Huitang Li wrote:
>> Hi,
>>
>> I created a web service client following Async/One Channel model
>> using axis2-generated stub. In the stub code, AxisCallback interface
>> is used.
>>
>> For almost all tests, no soap message response is received before the
>> client is finished. This is verified with the help of the excellent
>> tool tcpmon.
>>
>> In AxisCallback, I did not see something like isComplete() to test
>> whether a whole message is retrieved or not. So I had to replace the
>> AxisCallback with the depreciated Callback, and then put the
>> following code in the stub.
>>
>> while (!callback.isComplete()) {
>> Thread.sleep(1000);
>> }
>>
>> Does anyone have a better solution without having to use the
>> deprecated API?
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> Hi!
> Please refer to this thread.
> http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
>
> Cheers.
> Suran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: AxisCallback vs. the deprecated Callback
Posted by Suran Jayathilaka <su...@wso2.com>.
Huitang Li wrote:
> Hi,
>
> I created a web service client following Async/One Channel model using
> axis2-generated stub. In the stub code, AxisCallback interface is used.
>
> For almost all tests, no soap message response is received before the
> client is finished. This is verified with the help of the excellent
> tool tcpmon.
>
> In AxisCallback, I did not see something like isComplete() to test
> whether a whole message is retrieved or not. So I had to replace the
> AxisCallback with the depreciated Callback, and then put the following
> code in the stub.
>
> while (!callback.isComplete()) {
> Thread.sleep(1000);
> }
>
> Does anyone have a better solution without having to use the
> deprecated API?
>
> Thanks.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Hi!
Please refer to this thread.
http://www.mail-archive.com/axis-user@ws.apache.org/msg31442.html
Cheers.
Suran
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org