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 Joshua White <ge...@gmail.com> on 2007/03/01 16:26:38 UTC

Benefits of using Message style WS

Hello,

I am having a hard time understanding the benefits of using a message style
web service as opposed to a regular doc/lit wrapped service.  Could someone
please clarify this for me?

Regards,

Joshua

Re: Benefits of using Message style WS

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, you can. And I would even say you *should*. Take into account that
the wsdl is independent from the service code. The server will not use
the wsdl, except for showing it to users sending requests of type
"?wsdl". From the server point of view, the important piece is the
server-config.wsdd file. But the server will not be able to show you a
wsdl for a message service if you do not provide one.

You can put whatever you want in your wsdl, but validation of requests
will have to be done in your service code. Now you mention it, this can
be seen as another advantage:

If you use a databinding, the databinding framework will throw errors
when the incoming request does not conform to what it expects. These
errors are usually very generic, and not portable (each framework will
have its own exception hierarchy), and what is worst, they are out of
your control, because they appear before your code is invoked.

If you use message style, you can use any validation engine you may
want. And you can trap specific errors and provide better (and portable)
information to the remote user. Just as a side note, Axis does not
validate requests beyond bean construction. Just by checking conformance
to a rich XSD, you will gain a lot in terms of request validation :-)

Cheers,
Rodrigo




Joshua White wrote:
> Rodrigo,
>  
> Thanks for the reply.  I have not used message based web services before
> and I appreciate your patience with my questions.  When using the
> message oriented web services, can you still put your own input/output
> schemas in the wsdl and validate against them?  Obviously, you would be
> forced to write your own wsdl file.
>  
> -Joshua
> 
>  
> On 3/2/07, *Rodrigo Ruiz* <rruiz@gridsystems.com
> <ma...@gridsystems.com>> wrote:
> 
> Hi Joshua,
> 
> The advantages of using message instead of document oriented services
> are usually subtle. Most of the time is better to just call them
> differences :-)
> 
> The main advantage you will find is flexibility:
> 
> - No data binding --> no restrictions from the data binding framework
> - No uniqueness constraints --> operations can be overloaded
> - No pre-parsing --> you can even process requests the server does not
> "officially" support (for example, RPC/encoded in Axis 2)
> 
> Additionally, in certain cases, the performance overhead associated to
> the XML parsing and conversion to and from beans can be an important
> factor. If the operation logic is simple enough, using Raw XML may
> significantly improve the scalability of your service.
> 
> 
> Take into account that the flexibility of message services is also a
> disadvantage. Web service interoperability is very important today, and
> raw XML can break it very easily. If you choose this way, you should
> take care of these aspects.
> 
> Another important factor is that using raw XML requires different
> expertise from your programmers. This may be a disadvantage, or not. It
> depends on the case.
> 
> Finally, as Brennan said, your service should still be described
> through
> a WSDL descriptor. Indeed, in the case of message services, the WSDL
> becomes even more important than ever, because Axis will never be able
> to generate it from your code, and your programmers will need to know
> what is the expected syntax of the service inputs and outputs.
> 
> HTH,
> Rodrigo Ruiz
> 
> Joshua White wrote:
>> Hello,
> 
>> I am having a hard time understanding the benefits of using a message
>> style web service as opposed to a regular doc/lit wrapped service.
>> Could someone please clarify this for me?
> 
>> Regards,
> 
>> Joshua
> 
> 
> 


- --
- -------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca        rruiz@gridsystems.com
Baleares - Spain               Tel: +34 971 435 085
http://www.gridsystems.com/    Fax: +34 971 435 082
- -------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFF6CtJp9m/F5UenDoRAr0yAJ4lHrrCHePW1ydkDZbHTF4vAxQ0rQCeP4O3
ayDtL0YFqj+U7Na5LHi/8NE=
=vIlv
-----END PGP SIGNATURE-----

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


Re: Benefits of using Message style WS

Posted by Joshua White <ge...@gmail.com>.
Rodrigo,

Thanks for the reply.  I have not used message based web services before and
I appreciate your patience with my questions.  When using the message
oriented web services, can you still put your own input/output schemas in
the wsdl and validate against them?  Obviously, you would be forced to write
your own wsdl file.

-Joshua


On 3/2/07, Rodrigo Ruiz <rr...@gridsystems.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Joshua,
>
> The advantages of using message instead of document oriented services
> are usually subtle. Most of the time is better to just call them
> differences :-)
>
> The main advantage you will find is flexibility:
>
> - - No data binding --> no restrictions from the data binding framework
> - - No uniqueness constraints --> operations can be overloaded
> - - No pre-parsing --> you can even process requests the server does not
> "officially" support (for example, RPC/encoded in Axis 2)
>
> Additionally, in certain cases, the performance overhead associated to
> the XML parsing and conversion to and from beans can be an important
> factor. If the operation logic is simple enough, using Raw XML may
> significantly improve the scalability of your service.
>
>
> Take into account that the flexibility of message services is also a
> disadvantage. Web service interoperability is very important today, and
> raw XML can break it very easily. If you choose this way, you should
> take care of these aspects.
>
> Another important factor is that using raw XML requires different
> expertise from your programmers. This may be a disadvantage, or not. It
> depends on the case.
>
> Finally, as Brennan said, your service should still be described through
> a WSDL descriptor. Indeed, in the case of message services, the WSDL
> becomes even more important than ever, because Axis will never be able
> to generate it from your code, and your programmers will need to know
> what is the expected syntax of the service inputs and outputs.
>
> HTH,
> Rodrigo Ruiz
>
> Joshua White wrote:
> > Hello,
> >
> > I am having a hard time understanding the benefits of using a message
> > style web service as opposed to a regular doc/lit wrapped service.
> > Could someone please clarify this for me?
> >
> > Regards,
> >
> > Joshua
> >
> >
>
> - --
> - -------------------------------------------------------------------
> GRID SYSTEMS, S.A.             Rodrigo Ruiz
> Parc Bit - Edificio 17         Research Coordinator
> 07121 Palma de Mallorca
> Baleares - Spain               Tel: +34 971 435 085
> http://www.gridsystems.com/    Fax: +34 971 435 082
> - -------------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.4 (MingW32)
>
> iD8DBQFF5+s4p9m/F5UenDoRAs+vAJ42rgJUR4JfQWhX4OxCg3a3eFHwpACfbBqZ
> VQBH/T/oegGfMH+Fz2G3WuY=
> =j9Ac
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Benefits of using Message style WS

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Joshua,

The advantages of using message instead of document oriented services
are usually subtle. Most of the time is better to just call them
differences :-)

The main advantage you will find is flexibility:

- - No data binding --> no restrictions from the data binding framework
- - No uniqueness constraints --> operations can be overloaded
- - No pre-parsing --> you can even process requests the server does not
"officially" support (for example, RPC/encoded in Axis 2)

Additionally, in certain cases, the performance overhead associated to
the XML parsing and conversion to and from beans can be an important
factor. If the operation logic is simple enough, using Raw XML may
significantly improve the scalability of your service.


Take into account that the flexibility of message services is also a
disadvantage. Web service interoperability is very important today, and
raw XML can break it very easily. If you choose this way, you should
take care of these aspects.

Another important factor is that using raw XML requires different
expertise from your programmers. This may be a disadvantage, or not. It
depends on the case.

Finally, as Brennan said, your service should still be described through
a WSDL descriptor. Indeed, in the case of message services, the WSDL
becomes even more important than ever, because Axis will never be able
to generate it from your code, and your programmers will need to know
what is the expected syntax of the service inputs and outputs.

HTH,
Rodrigo Ruiz

Joshua White wrote:
> Hello,
>  
> I am having a hard time understanding the benefits of using a message
> style web service as opposed to a regular doc/lit wrapped service. 
> Could someone please clarify this for me?
>  
> Regards,
>  
> Joshua
>  
>  

- --
- -------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca
Baleares - Spain               Tel: +34 971 435 085
http://www.gridsystems.com/    Fax: +34 971 435 082
- -------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFF5+s4p9m/F5UenDoRAs+vAJ42rgJUR4JfQWhX4OxCg3a3eFHwpACfbBqZ
VQBH/T/oegGfMH+Fz2G3WuY=
=j9Ac
-----END PGP SIGNATURE-----

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