|
|||||||||||
| 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(java.lang.String prefix,
org.w3c.dom.NodeList list)
Prints the contents of the NodeList depending on the types
of the . |
org.w3c.dom.Node |
findBodyElement()
Finds the SOAP Body element. |
org.w3c.dom.Node |
findNamedElement(org.w3c.dom.NodeList list,
java.lang.String name)
Finds node element by given name. |
org.w3c.dom.Node |
getElement(org.w3c.dom.Node parent,
int index)
Returns Node object by given index. |
java.util.Vector<org.w3c.dom.Element> |
getElementList(org.w3c.dom.Node parent)
Return list containing all children of the parent node. |
org.w3c.dom.Node |
getFirstText(org.w3c.dom.Node parent)
Gets the text of the first child of a given Node. |
java.lang.String |
getVersion()
Version information. |
java.lang.String |
getXML(Entry e)
Returns string representation of Entry object as a XML
file. |
void |
initOutput()
Initializes the output Document |
void |
p(java.lang.String s)
Writes a message to the log. |
Entry |
parseRequest(java.lang.Object request)
Sets the current input stream and initializes the parser. |
org.w3c.dom.Node |
parseXML(java.lang.String xml)
Parses XML file to Document element. |
void |
printNode(java.lang.String prefix,
org.w3c.dom.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 java.lang.Exception
initOutput in class XMLParserjava.lang.Exception - If could not find output stream.
public Entry parseRequest(java.lang.Object request)
throws java.lang.Exception
request - the requested Reader.
java.lang.Exception - if I/O error occurs.
public org.w3c.dom.Node findNamedElement(org.w3c.dom.NodeList list,
java.lang.String name)
list - NodeList to search into.name - the name of the searched node.
Element node named name.public java.util.Vector<org.w3c.dom.Element> getElementList(org.w3c.dom.Node parent)
parent node.
parent - the parent Node.
Vector with all Element children
public org.w3c.dom.Node getElement(org.w3c.dom.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 org.w3c.dom.Node getFirstText(org.w3c.dom.Node parent)
Node.
parent - the parent Node
public void dumpNodes(java.lang.String prefix,
org.w3c.dom.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(java.lang.String prefix,
org.w3c.dom.Node n)
Node depending on its type.
prefix - prefix of the log message.n - the Node to be printed.public void p(java.lang.String s)
s - The log messageParserImpl.logmsg(String)
public Entry readEntry()
throws java.lang.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 XMLParserjava.lang.Exception - if the XML file is invalid or malformed SOAP XML document.public org.w3c.dom.Node findBodyElement()
public void writeEntry(Entry entry)
throws java.lang.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.
java.lang.Exception - if could not build the DOM tree or serialize the DOM element.DOMException
public org.w3c.dom.Node parseXML(java.lang.String xml)
throws java.lang.Exception
Document element.
xml - xml file to parse.
Document element.
java.lang.Exception - If any I/O or parse errors occur; if xml is
null
public java.lang.String getXML(Entry e)
throws java.lang.Exception
Entry object as a XML
file.
e - the Entry object
java.lang.Exception - if could not build the DOM tree or serialize the DOM element.public java.lang.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 | ||||||||||