axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <atma...@gmail.com>
Subject Re: I'm fed up with SOAP
Date Tue, 26 Jul 2005 00:14:36 GMT
I agree with Jeff. If all you want to do is return an XML fragment,
then you'd be better off using REST (also known as XML over HTTP).

A SOAP system like Axis gives you two valuable features:
- it automatically converts XML into Java objects so that your
applications don't need to process XML using inefficient and
cumbersome Java APIs for XML, such as JAXP.
- it also enables separation of concern, allowing you to externalize
infrastructure funtionality, such as resource management, security,
reliability, and addressing, from your application functionality

Of course these features are only valuable to you if you prefer to
work with Java objects and/or you need advanced infrastructure
functionality. If you don't want either of these features, then SOAP
just adds unnecessary complexity.

In answer to your questions about "wrapped" -- "wrapped" is *always*
document/literal, but document/literal is not always "wrapped".
"Wrapped" is a WSDL programming convention that -- from the Java
programming perspective -- looks and feels like RPC style, but it
produces document/literal. The term "wrapped" comes from the fact that
you must define wrapper elements for your input and output messages.
These wrapper elements encapsulate the operation's input parameters
and return value.

You actually don't need to create quite as many layers of wrapping as
you indicated. Your wrapped response message could look like this:

soapenv:Envelope
    soapenv:Body
        XXXResponse
            myActualXML

(assuming that myActualXML has a single root element -- if myActualXML
has multiple root elements, then you need one more layer of wrapping
to qualify as "wrapped")

And if you don't use the "wrapped" convention (aka WSDD
style="document"), your response message could look like this:

soapenv:Envelope
    soapenv:Body
        myActualXML

(again assuming that myActualXML has a single root element).

Anne

On 7/25/05, jeff@cogentlogic.com <jeff@cogentlogic.com> wrote:
> Barzilai. Clam down!
> 
> It sounds like you need a REST  :-)
> 
> 
> Jeff
> 
> 
> 
> ----- Original Message -----
> From: "Barzilai Spinak" <barspi@internet.com.uy>
> To: <axis-user@ws.apache.org>
> Sent: Monday, July 25, 2005 7:19 PM
> Subject: I'm fed up with SOAP
> 
> 
> > <RANT>
> > I've been using Soap web services for about 2 years. It took my many
> > weeks of learning and fighting with Axis. Then I found out that three
> > quarters of the Soap specification was being "deprecated" or at least
> > falling out of favour, and now we should be using something called
> > document/literal. It took me a few more to find out what it *really* was
> > and how it related to "wrapped" mode (are they the same? are they
> > different? how so?).  Then I came to the conclusion that I'd better
> > write my WSDL by hand, where, again, 3/4 of it is a pointless leftover
> > of an overengineered specification for the stuff that fell out of
> > favour. So, now I have a "wrapped" web service where all I want to do is
> > return XML documents and the web service response to my XXX operation
> > has this structure:
> >
> > soapenv:Envelope
> >      soapenv:Body
> >          XXXResponse
> >              XXXReturn
> >                  XXXResult
> >                    myActualXML
> >
> >
> >
> > So, there, *FIVE* levels of useless elements (response, return and
> > result!!! give me a break!). Now I was considering that I really needed
> > a wrapping element for some of my responses but I'm resisting the idea
> > of yet another level.
> >
> > Well, I know all this ranting is useless but I just wanted to share some
> > of my frustrations with the list :-)
> >
> > Thanks for hearing me hehehe
> > </RANT>
> >
> > BarZ
> >
> >   Internet Banda Ancha Todo el Dia por $u 490 por mes
> >     Sin gastos adicionales - Sin ocupar su telefono
> > Y los primeros 4 meses 50% de descuento!
> >  ______________________________________________________
> >  http://www.internet.com.uy - En Uruguay somos internet
> >
> >
> >
> >
> >
>

Mime
View raw message