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 Barzilai Spinak <ba...@internet.com.uy> on 2005/07/26 01:19:09 UTC

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




Re: I'm fed up with SOAP

Posted by Barzilai Spinak <ba...@internet.com.uy>.
jeff@cogentlogic.com wrote:
> Barzilai. Clam down!
> 
> It sounds like you need a REST  :-)
> 
> 
> Jeff

Heheh, no kidding. Except it's too late to change the whole project now. 
Soap seemed new and exciting when I started... now it's a burden.
What I may do in the next version of the project is to extend the specs 
to accept old and heavyweight soap, or a lighter approach.

BarZ

> ----- Original Message ----- 
> From: "Barzilai Spinak" <ba...@internet.com.uy>
> To: <ax...@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




Re: I'm fed up with SOAP

Posted by Robert Lowe <ro...@rmlowe.com>.
But the first of those "valuable features" doesn't really require a SOAP 
system at all. Assuming you have schemas for your XML messages, it can 
be achieved in a RESTful way with a data binding technology--such as 
JAXB, Castor, or XMLBeans--and a fairly trivial servlet base class.

A valuable side-effect is that you have a clean separation between your 
data-binding classes and the communication layer--which you don't 
currently get with Axis or most other Java SOAP engines.


Anne Thomas Manes wrote:

>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 <je...@cogentlogic.com> wrote:
>  
>
>>Barzilai. Clam down!
>>
>>It sounds like you need a REST  :-)
>>
>>
>>Jeff
>>
>>
>>
>>----- Original Message -----
>>From: "Barzilai Spinak" <ba...@internet.com.uy>
>>To: <ax...@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
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>
>
>  
>


-- 

Best regards,
Robert Lowe

http://rmlowe.com/


Re: I'm fed up with SOAP

Posted by Anne Thomas Manes <at...@gmail.com>.
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 <je...@cogentlogic.com> wrote:
> Barzilai. Clam down!
> 
> It sounds like you need a REST  :-)
> 
> 
> Jeff
> 
> 
> 
> ----- Original Message -----
> From: "Barzilai Spinak" <ba...@internet.com.uy>
> To: <ax...@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
> >
> >
> >
> >
> >
>

Re: I'm fed up with SOAP

Posted by je...@cogentlogic.com.
Barzilai. Clam down!

It sounds like you need a REST  :-)


Jeff



----- Original Message ----- 
From: "Barzilai Spinak" <ba...@internet.com.uy>
To: <ax...@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
> 
> 
> 
> 
>