org.xins.client
Class XINSCallResultParser

java.lang.Object
  extended byorg.xins.client.XINSCallResultParser

public class XINSCallResultParser
extends Object

XINS call result parser. XML is parsed to produce a XINSCallResult object.

The root element in the XML must be of type result. Inside this element, param elements optionally define parameters and an optional data element defines a data section.

If the result element contains an errorcode or a code attribute, then the value of the attribute is interpreted as the error code. If both these attributes are set and conflicting, then this is considered a showstopper.

TODO: Describe rest of parse process.

Note: This parser is XML Namespaces-aware.

Since:
XINS 1.0.0
Version:
$Revision: 1.67 $ $Date: 2008/07/04 10:22:49 $
Author:
Anthony Goubard, Ernst de Haan

Constructor Summary
XINSCallResultParser()
          Constructs a new XINSCallResultParser.
 
Method Summary
 XINSCallResultData parse(byte[] xml)
          Parses the given XML string to create a XINSCallResultData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XINSCallResultParser

public XINSCallResultParser()
Constructs a new XINSCallResultParser.

Method Detail

parse

public XINSCallResultData parse(byte[] xml)
                         throws IllegalArgumentException,
                                ParseException
Parses the given XML string to create a XINSCallResultData object.

Parameters:
xml - the XML to be parsed, not null.
Returns:
the parsed result of the call, not null.
Throws:
IllegalArgumentException - if xml == null.
ParseException - if the specified string is not valid XML or if it is not a valid XINS API function call result.


See http://www.xins.org/.