Gopalan Suresh Raj's Web Cornucopia
An Oasis for the parched Enterprise Services Engineer/Developer

    SOA Tips-Do not mix style/use in the same service


    The ‘style’ attribute determines the way in which the SOAP Body is constructed. If the value of the style attribute is RPC then the messages exchanged contain operation name and  parameters type values, and if the value of the style attribute is document, the messages exchanged contain business document(s). The ‘use’ attribute determines whether the message parts are encoded with some custom encoding rules in which case the value is ‘encoded’, or whether the message elements conform to a well defined XML Schema in which case, the value happens to be ‘literal’. For more details, you can refer to an earlier blog entry of mine entitled WSDL & SOAP: Binding Style to use - Document or RPC? 

    In the same service either expose all your operations with document/literal or as RPC/literal. Do not mix the style/use alternatives in the same WebService. It will make it difficult for the consumers of your service. Prefer exposing document style with literal use which ensures WS-I compliance and interoperability and comes with a host of other advantages which I will blog about in a future tip.

    Author Bibliography

    Gopalan Suresh Raj is a Senior Analyst, Software Architect, and Developer with expertise in multi-tiered systems development, enterprise service architectures, and distributed computing. He is also an active author, including contributions to Professional JMS Programming, Wrox Press, 2001, Enterprise Java Computing-Applications and Architecture, Cambridge University Press, 1999, and The Awesome Power of JavaBeans, Manning Publications Co., 1998. He has submitted papers at international fora, and his work has been published in numerous technical journals. Visit him at his Web Cornucopia© site ( or mail him at