Monday, April 27, 2009

SOAP Faults Vs Error codes

We were working on implementation of a web services layer (business services - SOAP ), this layer in turn will communicate with multiple web services which solves the same problem (e.g search).
While integrating multiple web services(SOAP, two options to communicate errors occur during the integration

1) SOAP Faults
- SOAP faults are used by some frameworks to represent business logic related error messages. This works as long as we do not have multiple SOAP services involved in a action.

2) Custom data structure / XML
- Define a XML response format for the web services API layer and return the respective the error code and error message defined.

We decided to use custom xml response structures to communicate any error occurred during processing /integration and let the SOAPFault communicates any actual soap faults.

Saturday, April 25, 2009

CVS - CVSNT - SVN Migration

We are working with CVSNT and decided to use SVN.

Migration from CVSNT to SVN or CVS is not possible.
From CVS to SVN, tool is available at http://cvs2svn.tigris.org/.

The converters from other repositories to SVN is listed at http://subversion.tigris.org/links.html#converters

Thursday, March 26, 2009

Parsing large XML document - STAX

We came across a scenario where the size of the XML content to be parsed/transformed varied between 1 MB to 10MB. We need to compute data from the available XML, which requires traversing the whole XML document. Till then we used XSLT, where transformation is given more importance and less importance to computing derived data from the XML.

I tried different options before settling down with STAX.

Santiago Pericas-Geertsen's discusses about DOM Vs JAXB in this blog.
http://weblogs.java.net/blog/spericas/archive/2005/12/dom_vs_jaxb_per.html

The following document discusses about DOM, SAX, STAX and compares different STAX implementation
http://java.sun.com/performance/reference/whitepapers/StAX-1_0.pdf