File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Webservice implementing Provider<Source>: no difference with service mode MESSAGE or PAYLOAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice implementing Provider<Source>: no difference with service mode MESSAGE or PAYLOAD" Watch "Webservice implementing Provider<Source>: no difference with service mode MESSAGE or PAYLOAD" New topic
Author

Webservice implementing Provider<Source>: no difference with service mode MESSAGE or PAYLOAD

Ulli Hertlein
Greenhorn

Joined: Jan 13, 2011
Posts: 15

hi everybody,

i am new to jax-ws and noticed that my webservice which implements interface Provider<Source> (Annotation WebServiceProvider) behaves the same
regardless of the chosen servicemode. In both cases (PAYLOAD or MESSAGE) the method invoke gets an object of type StAXSource which holds the entire SOAP-Message
(beginning with <?xml .... <S:Envelope ....). Using payload-mode i expected only the contents of the soap-body , but i always get the whole soap-message.
(i am using glassfish 2.1.1, java 5)

the j2ee 5 doc says:
Service mode. PAYLOAD indicates that the Provider implementation wishes to work with protocol message payloads only. MESSAGE indicates that the Provider implementation wishes to work with entire protocol messages
( see http://download.oracle.com/javaee/5/api/javax/xml/ws/ServiceMode.html )

maybe this behaviour is specific to glassfish ?

thanks in advance
ulli






Professional Senior Crap Manager & doing Livestrong
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webservice implementing Provider<Source>: no difference with service mode MESSAGE or PAYLOAD