Thursday, April 22, 2010

Optimize SOAP Messages

As we all know SOAP content is nothing but a XML.Though XML is descriptive, sometimes it might be typically larger due to the volume of tags. So given the case,if you have any performance problems in using SOAP XML's, consider using Message Transmission Optimization Mechanism (MTOM), which builds on XML-binary Optimized Packaging (XOP). XOP provides a more efficient serialization of XML by using MIME encoding. MTOM uses XOP to encode portions of SOAP messages,while still presenting an XML Infoset to the SOAP application.

Another, more recent alternative is to use XFire. XFire is an open source,standards-compliant SOAP framework that uses the latest technologies, including a StAX parser, to boost SOA messaging performance. As i spoke about StAX,i will give a brief intro about that here…

StAX:Streaming API for XML:
StAX
is a parser API that falls between the tree-navigation DOM and push event-based SAX interfaces. It works serially on an XML document as SAX does, but it allows tokens to be pulled by the application.
Again, unless your performance is unacceptable, you should be fine with regular XML SOAP messages. However, if you are providing services to a large community of clients, you may need to boost your performance using one of the above mentioned alternatives.

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory