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, <[email protected]
> <mailto:[email protected]>> 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 <[email protected]
>     <mailto:[email protected]>>
>     *Date: *Sat, 27 Mar 2010 14:27:17 +0530
>     *To: *<[email protected] <mailto:[email protected]>>
>     *Subject: *Re: Is possible to invoke multiple webservices in same
>     http request?
> 
>     No.
> 
>     On Sat, Mar 27, 2010 at 1:37 AM, Bruno Simioni
>     <[email protected] <mailto:[email protected]>> 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: [email protected]
>         <mailto:[email protected]>
>         For additional commands, e-mail: [email protected]
>         <mailto:[email protected]>
> 
> 
> 
> 
>     -- 
>     Amila Suriarachchi
>     WSO2 Inc.
>     blog: http://amilachinthaka.blogspot.com/
> 
> 
> 
> 
> -- 
> Sri Harsha Yenuganti
> [email protected] <mailto:[email protected]>
> 
> "  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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to