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 Sri Harsha Yenuganti <sh...@gmail.com> on 2010/03/27 15:02:19 UTC

Re: Re: Is possible to invoke multiple webservices in same http request?

No. You cannot invoke multiple webservices in one single HTML request !

On 27 March 2010 07:19, <br...@gmail.com> wrote:

> Amila, there is no another way os invoking multiple webservices in the same
> http request?
>
> Enviado pelo meu aparelho BlackBerry da Claro
> ------------------------------
> *From: * Amila Suriarachchi <am...@gmail.com>
> *Date: *Sat, 27 Mar 2010 14:27:17 +0530
> *To: *<ja...@axis.apache.org>
> *Subject: *Re: Is possible to invoke multiple webservices in same http
> request?
>
> No.
>
> On Sat, Mar 27, 2010 at 1:37 AM, Bruno Simioni <br...@gmail.com>wrote:
>
>> Hi all,
>>
>> Is there any possibility of request multiple webservices in the same
>> SOAP Request, like:
>>
>> SOAP:Body
>>    Service1
>>    /Service1
>>    Service2
>>    /Service2
>> /SOAP:Body
>>
>> Thanks,
>>
>> Bruno.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Sri Harsha Yenuganti
shyenuganti@gmail.com

"  IF YOU ARE NOT BRAVE ENOUGH TO FACE A FAILURE YOU ARE UNFIT TO
SUCCEED.AIM HIGH BUT BE PREPARED FOR THE WORST. "

Re: Is possible to invoke multiple webservices in same http request?

Posted by Nan Null <nu...@gmail.com>.
http://wiki.apache.org/ws/FrontPage/Axis/KeepAlive

On Sat, Mar 27, 2010 at 11:31 AM, Nan Null <nu...@gmail.com> wrote:
> Yes, but may not be the way you think.
>
> First, exactly what do you want to accomplish?
>
> Why do you bother doing things like this?  Why can't you call multiple
> WS requests?
>
> Ok, enough.  So, with WS, it's possible to re-use HTTP request, that
> is not to close it.  In Axis, there is a way to indicate that.  Doing
> this definitely save performance for a large number of requests to cut
> down on the number of connection overhead.
>
> The good news is that you only change a flag or two, and you don't
> have to do non-sense hacking stuffs, which I suggest don't do it.
>

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


Re: Is possible to invoke multiple webservices in same http request?

Posted by Nan Null <nu...@gmail.com>.
Yes, but may not be the way you think.

First, exactly what do you want to accomplish?

Why do you bother doing things like this?  Why can't you call multiple
WS requests?

Ok, enough.  So, with WS, it's possible to re-use HTTP request, that
is not to close it.  In Axis, there is a way to indicate that.  Doing
this definitely save performance for a large number of requests to cut
down on the number of connection overhead.

The good news is that you only change a flag or two, and you don't
have to do non-sense hacking stuffs, which I suggest don't do it.

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


Re: Is possible to invoke multiple webservices in same http request?

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Actually, you can.  It's just a small matter of coding. :)

It's true that SOAP provides no standard way of "boxcarring" multiple
requests, partly because it's a complex problem.  For starters, how do you
deal with errors?  Should you treat the whole package of N requests as a
transactional unit?  Should you stop processing if request 2 of 5 fails, or
process everything and boxcar up all the responses including faults?  And
then of course you need to deal with the fact that there's only one shared
SOAP header between all the requests....

Despite all this, nothing in SOAP actually prohibits you from doing it, and
if you can force certain limitations (i.e. no SOAP headers, and no stateful
requests that rely on the outcome of earlier requests, and the most important
one: you must be in control of both sides of the wire), it's quite achievable.

If you're using Axis2's code generation / stub capabilities, this isn't easy,
since the logic in the generated code absolutely assumes that each operation
is in control of the whole SOAP envelope. (*) But if you're using the dynamic
APIs and passing OMElements around, this is actually pretty straightforward -
you just wrap up your requests in a wrapper element, and then unwrap them on
the other side to process them.  There are tricky questions like how to best
deal with faults, but that's up to you.

To sum up - is there a standard way to do this?  Definitely not.  But you can
certainly custom-code one (and if you did a good job, we might even include
it in future versions of Axis2).

Regards,
--Glen

(*) Even then, you might be able to write an Axis2 Module that intercepts the
individual requests (blocking each on an individual thread), collects them
together, and then based on some kind of "openBoxcar() / sendBoxcar()" API,
sends them out.  But this would involve some tricky/ugly code.

On 3/27/2010 10:02 AM, Sri Harsha Yenuganti wrote:
> No. You cannot invoke multiple webservices in one single HTML request !
> 
> On 27 March 2010 07:19, <brunosimioni@gmail.com
> <ma...@gmail.com>> wrote:
> 
>     Amila, there is no another way os invoking multiple webservices in
>     the same http request?
> 
>     Enviado pelo meu aparelho BlackBerry da Claro
> 
>     ------------------------------------------------------------------------
>     *From: * Amila Suriarachchi <amilasuriarachchi@gmail.com
>     <ma...@gmail.com>>
>     *Date: *Sat, 27 Mar 2010 14:27:17 +0530
>     *To: *<java-user@axis.apache.org <ma...@axis.apache.org>>
>     *Subject: *Re: Is possible to invoke multiple webservices in same
>     http request?
> 
>     No.
> 
>     On Sat, Mar 27, 2010 at 1:37 AM, Bruno Simioni
>     <brunosimioni@gmail.com <ma...@gmail.com>> wrote:
> 
>         Hi all,
> 
>         Is there any possibility of request multiple webservices in the same
>         SOAP Request, like:
> 
>         SOAP:Body
>            Service1
>            /Service1
>            Service2
>            /Service2
>         /SOAP:Body
> 
>         Thanks,
> 
>         Bruno.
> 
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>         <ma...@axis.apache.org>
>         For additional commands, e-mail: java-user-help@axis.apache.org
>         <ma...@axis.apache.org>
> 
> 
> 
> 
>     -- 
>     Amila Suriarachchi
>     WSO2 Inc.
>     blog: http://amilachinthaka.blogspot.com/
> 
> 
> 
> 
> -- 
> Sri Harsha Yenuganti
> shyenuganti@gmail.com <ma...@gmail.com>
> 
> "  IF YOU ARE NOT BRAVE ENOUGH TO FACE A FAILURE YOU ARE UNFIT TO
> SUCCEED.AIM HIGH BUT BE PREPARED FOR THE WORST. "
> 
> 

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