Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

XML, Straight Up: Document-Style SOAP

Although the RPC pattern is a common use case for SOAP, there are no restrictions on the contents of the SOAP body. Typically, sending nonencoded XML content in the body is known as document-style SOAP, since it centers around the message as an XML document rather than an abstract data model that happens to be encoded into XML.

Keep in mind that even if you don't explicitly use the SOAP RPC conventions as described, you can still map your document-style XML to and from procedure calls (or use whatever programming paradigm you like, since SOAP is about the structure of messages on the wire). Various toolkits, including .NET and Axis, have been doing this for some time now. When you publish a Visual Basic or C# class as a .NET Web service, the default behavior is to use document-style SOAP to expose the methods. The messages still look similar to the RPC style, but they don't use the SOAP encoding. The only problem with this approach is that there are no standard encodings for things like arrays or structures, and you lose the referential integrity of objects that are referenced multiple times.

  • + Share This
  • 🔖 Save To Your Account