|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.parser.ParserImpl
com.ibm.di.parser.XMLParser
com.ibm.di.parser.SOAPParser
public class SOAPParser
The SOAP Parser reads and writes SOAP XML documents. The Parser converts SOAP XML documents to or from entry objects in a simple, straightforward fashion.
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.parser.XMLParser |
|---|
children, curindex, db, entrytag, inputDoc, outputDoc, toplevel, toplevelInput, useCData, valuetag |
| Fields inherited from class com.ibm.di.parser.ParserImpl |
|---|
_debug, myConfiguration |
| Constructor Summary | |
|---|---|
SOAPParser()
Creates SOAPParser. |
|
| Method Summary | |
|---|---|
void |
dumpNodes(String prefix,
NodeList list)
Prints the contents of the NodeList depending on the types
of the . |
Node |
findBodyElement()
Finds the SOAP Body element. |
Node |
findNamedElement(NodeList list,
String name)
Finds node element by given name. |
Node |
getElement(Node parent,
int index)
Returns Node object by given index. |
Vector<Element> |
getElementList(Node parent)
Return list containing all children of the parent node. |
Node |
getFirstText(Node parent)
Gets the text of the first child of a given Node. |
String |
getVersion()
Version information. |
String |
getXML(Entry e)
Returns string representation of Entry object as a XML
file. |
void |
initOutput()
Initializes the output Document |
void |
p(String s)
Writes a message to the log. |
Entry |
parseRequest(Object request)
Sets the current input stream and initializes the parser. |
Node |
parseXML(String xml)
Parses XML file to Document element. |
void |
printNode(String prefix,
Node n)
Prints the contents of the Node depending on its type. |
Entry |
readEntry()
Reads SOAP XML documents. |
void |
writeEntry(Entry entry)
Writes SOAP XML document. |
| Methods inherited from class com.ibm.di.parser.XMLParser |
|---|
closeParser, error, fatalError, flush, getOmitXMLDeclaration, initInput, initParser, registerScriptBeans, setOmitXMLDeclaration, warning |
| Methods inherited from class com.ibm.di.parser.ParserImpl |
|---|
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, querySchema, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SOAPParser()
| Method Detail |
|---|
public void initOutput()
throws Exception
initOutput in class XMLParserException - If could not find output stream.
public Entry parseRequest(Object request)
throws Exception
request - the requested Reader.
Exception - if I/O error occurs.
public Node findNamedElement(NodeList list,
String name)
list - NodeList to search into.name - the name of the searched node.
Element node named name.public Vector<Element> getElementList(Node parent)
parent node.
parent - the parent Node.
Vector with all Element children
public Node getElement(Node parent,
int index)
Node object by given index.
parent - the parent Node.index - the index of the desired Node.
Node object at index position.public Node getFirstText(Node parent)
Node.
parent - the parent Node
public void dumpNodes(String prefix,
NodeList list)
NodeList depending on the types
of the .
prefix - prefix of the log message.list - the NodeList object to be printed.printNode(String, Node)
public void printNode(String prefix,
Node n)
Node depending on its type.
prefix - prefix of the log message.n - the Node to be printed.public void p(String s)
s - The log messageParserImpl.logmsg(String)
public Entry readEntry()
throws Exception
SOAP_CALL is set
to reflect the first tag following the SOAP-ENV:Body tag.
Each tag under the SOAP_CALL tag translates to an attribute in the entry
object.
readEntry in interface ParserInterfacereadEntry in class XMLParserException - if the XML file is invalid or malformed SOAP XML document.public Node findBodyElement()
public void writeEntry(Entry entry)
throws Exception
entry to build the document. The SOAP_CALL
attribute is expected to contain the value for the SOAP call. For all
others attribute in the entry, a tag with that name and
value is created.
writeEntry in interface ParserInterfacewriteEntry in class XMLParserentry - the entry containing the attributes to write.
Exception - if could not build the DOM tree or serialize the DOM element.DOMException
public Node parseXML(String xml)
throws Exception
Document element.
xml - xml file to parse.
Document element.
Exception - If any I/O or parse errors occur; if xml is
null
public String getXML(Entry e)
throws Exception
Entry object as a XML
file.
e - the Entry object
Exception - if could not build the DOM tree or serialize the DOM element.public String getVersion()
getVersion in interface VersionInfoInterfacegetVersion in class XMLParser
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||