Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Better SOAP Interfaces With Header Elements

By Benoit Marchal
2004-01-26


Intranet and Internet services

Who develops the clients and the servers is determined by whether they're being deployed on an intranet or on the Internet. On an intranet, the developers for the client and server are either on the same team or are on teams that are closely related. This translates into very strong ties between the client and server.

When it comes to the Internet, things are different. The client and server are often developed by different companies altogether. As a result, they won't have as many opportunities to synchronize their work. To make things worse, if the service is successful, multiple clients and servers will implement it.

As an example, consider the Google search engine (see Resources), a service that benefits many applications interfacing with it. For instance, I use an XML editor to write my articles. When I research a topic, I find it convenient to run searches directly from the editor. Likewise for e-mail -- it's common to search for a contact address on a corporate Web site. The search often starts with Google, so my address book also benefits from implementing the service. And what about a photo editor? It's common to search for background information on a subject or to search for new techniques, so the photo editor could interface with Google. That's three possible clients for the service already -- and Google is not the only search engine, so you could have more than one server implementation as well.

Since the client and server are developed independently, the definition of the service interface is very important. The service interface (not unlike an API) is the basis for cooperation between the two teams. It specifies the roles of the client and the server -- the methods and their parameters. The interface must be flexible, modular, and extensible.

To encourage modularity and extensibility, SOAP organizes its requests into two parts: the header and the body. The header is typically used for technical parameters of the request such as session management, authentication, and transaction, while the body contains the actual request.

Tutorial Pages:
» Header elements and the AXIS toolkit
» Intranet and Internet services
» Header elements in AXIS
» Conclusion
» Resources


First published by IBM developerWorks


 | Bookmark
Related Tutorials:
» Starting with XML
» Performing Client-Side XSL Transformations
» Create a Google Sitemap for your Web Site
» XML and Scripting Languages
» Parsing Comma-Separated Values
» XML Security Suite: Increasing the Security of E-Business