|
AdroitLogic UltraESB v1.7.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface XMLSupport
Mediation Support for DOM based mediation
| Method Summary | |
|---|---|
void |
addAttributeToElements(Message msg,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String qName,
java.lang.String nsUri,
java.lang.String value)
Add an attribute to one or more elements selected by an XPath expression e.g. |
void |
addElementsAsChild(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace)
Inserts Element as a child to the specified elements pointed by an xpath expression |
void |
addTextElementsAsChild(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
Inserts Text Element as a child to the specified elements pointed by an xpath expression |
void |
convertDOMToSoap11(Message m)
Converts a DOM message to SOAP 1.1 by wrapping the message in a SOAP envelope and body |
void |
convertDOMToSoap12(Message m)
Converts a DOM message to SOAP 1.2 by wrapping the message in a SOAP envelope and body |
void |
convertFromFI(Message m)
Convert the payload of the current message from a FastInfoset binary to an XML message (Note the XML payload is still kept as a RawFileMessage by default and maybe converted into a DOM message if required) |
void |
convertSoapToDOM(Message m)
Converts a SOAP message to DOM (POX) by stripping out the SOAP Envelope and Body and Header |
void |
convertToDOM(Message m)
Convert the current message into a DOMMessage |
void |
convertToFI(Message m)
Convert the XML message into a FastInfoset binary message |
java.lang.Object |
convertXMLToJAXBObject(Message msg,
java.lang.Class clazz)
Converts a XML payload into a JAXB Object. |
void |
convertXMLToJSONStream(Message m)
Convert the current XML message payload (which maybe available as any format such as raw file or DOM etc) into a file based JSON stream |
void |
convertXMLToJSONStream(Message m,
javax.xml.namespace.QName staringElement,
boolean retainNSPrefixes)
Convert the current XML message payload (which maybe available as any format such as raw file or DOM etc) into a file based JSON stream |
org.w3c.dom.Document |
createDOMDocument()
Create a new DOM Document object and return |
void |
deleteAttributes(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
Deletes the specified attribute/s e.g. |
void |
deleteElements(Message msg,
java.lang.String expression,
java.lang.String[][] ns)
Delete Elements pointed by an xpath expression |
org.w3c.dom.NodeList |
extractAsNodeListUsingXPath(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
Evaluate the given XPath expression against the XML payload, and return result as a NodeList This method converts the current payload into a DOMMessage |
java.lang.String |
extractAsStringUsingXPath(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
Evaluate the given XPath expression against the XML payload, and return result as a String This method converts the current payload into a DOMMessage |
boolean |
filter(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
Evaluate the given boolean XPath expression over the XML payload |
boolean |
filter(Message m,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String regex)
Evaluate the given XPath expression over the XML payload and compare the resulting String value with the regular expression for a match. |
java.lang.String |
getAttribute(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
Get attribute value e.g. |
org.w3c.dom.Document |
getPayloadAsDOM(Message m)
Returns payload of the message as a DOM Document |
java.lang.String |
getTextElement(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
Get text element value for given XPath |
void |
insertTextElementsAfter(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
Inserts an element/elements after the specified element pointed by the XPATH, to the current message. |
void |
insertTextElementsBefore(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
Inserts an element/elements before the specified element pointed by the XPATH, to the current message. |
void |
mergeXMLAttachmentsUnderElement(Message msg,
java.lang.String rootElemName)
Replace the current XML payload with a top level element as specified, and merge the payloads from the current body, and attachments underneath that |
void |
mergeXMLAttachmentsUnderElement(Message msg,
java.lang.String rootElemName,
java.lang.String rootNS)
Replace the current XML payload with a top level element as specified, and merge the payloads from the current body, and attachments underneath that |
boolean |
remove(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
Remove the XPath expression specified node from the XML payload. |
void |
replaceAttributes(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String value)
Replaces the specified attribute/s value |
void |
replaceTextElements(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String elementContent)
Replace Text Elements pointed by an xpath expression |
void |
retainElementAsPayload(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
Replace the current XML payload with the resulting element from the XPath expression result |
void |
serializeJAXBObjectAsXMLStream(Message msg,
java.lang.Object jaxb)
Serialize a JAXB Object as a XML Stream message |
void |
serializeJAXBObjectAsXMLStream(Message msg,
java.lang.Object jaxb,
java.lang.String rootElement,
java.lang.String uri)
Serialize a JAXB Object as a XML Stream message |
void |
setPayloadFromDOM(Message m,
org.w3c.dom.Document doc)
Set the payload of the message with the DOM Document |
void |
splitAndProcess(Message msg,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String sequenceName,
boolean ignoreErrors)
Split current message into multiple messages using the given XPath expression, and hand over each such message to the given sequence |
void |
transform(Message msg,
java.lang.String xsltFilename)
Transform the message payload by XSLT (without any parameters), assuming a non DOM result and assuming that the complete message payload will be used as the source of the transformation, and the result will replace the complete message payload |
void |
transform(Message msg,
java.lang.String xsltFilename,
java.lang.String exprn,
java.lang.String[][] ns)
Transform the message payload by XSLT (without any parameters), assuming a non DOM result |
void |
transform(Message msg,
java.lang.String xsltFilename,
java.lang.String exprn,
java.lang.String[][] ns,
boolean domResult,
java.util.Map parameters)
Transform the message payload by XSLT |
void |
validate(Message m,
java.lang.String schema)
Validate the current message against one single schema |
void |
validate(Message m,
java.lang.String[] schemas)
Validate the current message against one or more schemas |
void |
validate(Message m,
java.lang.String[] schemas,
java.lang.String exprn,
java.lang.String[][] ns)
Validate the current message - or an element of it selected via an XPath expression - against one or more schemas |
| Method Detail |
|---|
org.w3c.dom.Document createDOMDocument()
void setPayloadFromDOM(Message m,
org.w3c.dom.Document doc)
m - the current message whose payload will be set with the DOM messagedoc - the DOM document to be inserted as the payloadorg.w3c.dom.Document getPayloadAsDOM(Message m)
m - the current message to be passed
void convertToDOM(Message m)
m - the current message to be transformedvoid convertFromFI(Message m)
m - the current message to be transformedvoid convertToFI(Message m)
m - the current message to be transformedvoid convertDOMToSoap11(Message m)
m - the current message to be processedvoid convertDOMToSoap12(Message m)
m - the current message to be processedvoid convertSoapToDOM(Message m)
m - the current message containing a SOAP payload to convert to DOM/POX
void convertXMLToJSONStream(Message m,
javax.xml.namespace.QName staringElement,
boolean retainNSPrefixes)
m - the message to be convertedstaringElement - an optional starting element to begin conversion (e.g. first element of the SOAP body)retainNSPrefixes - retain the namespace prefixes into JSON names for elementsvoid convertXMLToJSONStream(Message m)
m - the message to be converted
void retainElementAsPayload(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
m - the current messageexprn - XPath expression selecting the node to retainns - optional namespaces array
void mergeXMLAttachmentsUnderElement(Message msg,
java.lang.String rootElemName)
msg - the message to transformrootElemName - the new root element created
void mergeXMLAttachmentsUnderElement(Message msg,
java.lang.String rootElemName,
java.lang.String rootNS)
msg - the message to transformrootElemName - the new root element createdrootNS - optional namespace for the root element, or null
void validate(Message m,
java.lang.String[] schemas,
java.lang.String exprn,
java.lang.String[][] ns)
m - the message holding the payload for validationschemas - an array of XSD filename to validate against.
Note: the validator is sensitive to the order in which the Schemas are given. Otherwise you may end up with
an error such as "SAXParseException: cvc-elt.1: Cannot find the declaration of element"exprn - an optional XPath expression selecting the node for validationns - an optional array of namespace prefixes and namespaces used within the XPath expression
void validate(Message m,
java.lang.String[] schemas)
m - the message holding the payload for validationschemas - an array of XSD filename to validate against
Note: the validator is sensitive to the order in which the Schemas are given. Otherwise you may end up with
an error such as "SAXParseException: cvc-elt.1: Cannot find the declaration of element"
void validate(Message m,
java.lang.String schema)
m - the message holding the payload for validationschema - a XSD filename to validate against
void transform(Message msg,
java.lang.String xsltFilename,
java.lang.String exprn,
java.lang.String[][] ns,
boolean domResult,
java.util.Map parameters)
msg - current messagexsltFilename - the XSLT filenameexprn - an optional XPath expression to select the source node for XSLT, and node to replace with the resultns - an optional array of namespace prefixes and namespace urlsdomResult - is the result desired as a DOM payload? (useful for further XML processing)parameters - any XSLT parameters to be passed to the transformation
void transform(Message msg,
java.lang.String xsltFilename,
java.lang.String exprn,
java.lang.String[][] ns)
msg - current messagexsltFilename - the XSLT filenameexprn - an optional XPath expression to select the source node for XSLT, and node to replace with the resultns - an optional array of namespace prefixes and namespace urls
void transform(Message msg,
java.lang.String xsltFilename)
msg - current messagexsltFilename - the XSLT filename
boolean filter(Message m,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String regex)
m - the current messageexprn - the XPath expression to evaluate against the message payloadns - an optional array of namespace prefixes and namespace urlsregex - an optional regular expression to evaluate the XPath results' String value against
boolean filter(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
m - the current messageexprn - the XPath expression to evaluate against the message payloadns - an optional array of namespace prefixes and namespace urls
void addAttributeToElements(Message msg,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String qName,
java.lang.String nsUri,
java.lang.String value)
msg - the message where the transformation is performedexprn - the xpath expression to select the elements where the attribute should be addedns - an optional array of namespace prefixes and namespaces used within the XPath expressionqName - the qualified name for the new attribute. To specify a custom prefix use it here (e.g. "myns:myqname")nsUri - the namespace URI for the new attribute, or null (to specify a custom prefix, see qName above)value - the new value of the attribute
java.lang.String getAttribute(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
msg - the message to read the attribute fromexprn - the xpath expression to the element where the attribute should be addedns - an optional array of namespace prefixes and namespaces used within the XPath expression
void deleteAttributes(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
msg - the current message containing the payloadexprn - the xpath expression to the attributes, which are to be deletedns - an optional array of namespace prefixes and namespaces used within the XPath expression
void replaceAttributes(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String value)
msg - the current message containing the payloadexpression - the xpath expression to the attribute, which is to be replacedns - an optional array of namespace prefixes and namespaces used within the XPath expressionvalue - the new value of the attribute
void addTextElementsAsChild(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
msg - the current message containing the payloadexpression - the xpath expression to the node/s, which will be the parent for the new node/sns - an optional array of namespace prefixes and namespaces used within the XPath expressionqualifiedTagName - the qualified name of the new element to be addednamespace - an optional String specifying the namespace url of the new elementelementContent - the text content of the new element
void addElementsAsChild(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace)
msg - the current message containing the payloadexpression - the xpath expression to the node/s, which will be the parent for the new node/sns - an optional array of namespace prefixes and namespaces used within the XPath expressionqualifiedTagName - the qualified name of the new element to be addednamespace - an optional String specifying the namespace url of the new element
java.lang.String getTextElement(Message msg,
java.lang.String exprn,
java.lang.String[][] ns)
msg - the message to read the attribute fromexprn - the xpath expression to the element where the text content should be readns - an optional array of namespace prefixes and namespaces used within the XPath expression
void replaceTextElements(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String elementContent)
msg - the current message containing the payloadexpression - the xpath expression to the text elements to be replacedns - an optional array of namespace prefixes and namespaces used within the XPath expressionelementContent - the text content of the new element/s
void deleteElements(Message msg,
java.lang.String expression,
java.lang.String[][] ns)
msg - the current message containing the payloadexpression - the xpath expression to the text elements to be replacedns - an optional array of namespace prefixes and namespaces used within the XPath expression
void insertTextElementsBefore(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
msg - the current message containing the payloadexpression - the xpath expression to the node, where the new element should be added beforens - an optional array of namespace prefixes and namespaces used within the XPath expressionqualifiedTagName - the qualified tag name of the new element to be addednamespace - namespace uri for the new tagelementContent - the content of the new element
void insertTextElementsAfter(Message msg,
java.lang.String expression,
java.lang.String[][] ns,
java.lang.String qualifiedTagName,
java.lang.String namespace,
java.lang.String elementContent)
msg - the current message containing the payloadexpression - the xpath expression to the node, where the new element should be added afterns - an optional array of namespace prefixes and namespaces used within the XPath expressionqualifiedTagName - the qualified tag name of the new element to be addednamespace - namespace uri for the new tagelementContent - the content of the new element
boolean remove(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
m - the current messageexprn - the XPath expression to evaluate against the message payloadns - an optional array of namespace prefixes and namespace urls
java.lang.String extractAsStringUsingXPath(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
m - the current messageexprn - the XPath expression to evaluate against the message payloadns - an optional array of namespace prefixes and namespace urls
org.w3c.dom.NodeList extractAsNodeListUsingXPath(Message m,
java.lang.String exprn,
java.lang.String[][] ns)
m - the current messageexprn - the XPath expression to evaluate against the message payloadns - an optional array of namespace prefixes and namespace urls
void splitAndProcess(Message msg,
java.lang.String exprn,
java.lang.String[][] ns,
java.lang.String sequenceName,
boolean ignoreErrors)
throws java.lang.Exception
msg - the current message to be split and processedexprn - the XPath expression to split the message atns - name spaces usedsequenceName - the sequence to invoke on each resulting messageignoreErrors - ignore any errors encountered during sequence execution
java.lang.Exception - if the invoked sequence throws an exception
java.lang.Object convertXMLToJAXBObject(Message msg,
java.lang.Class clazz)
msg - the current message to read the payload fromclazz - the JAXB class to convert the payload into
void serializeJAXBObjectAsXMLStream(Message msg,
java.lang.Object jaxb,
java.lang.String rootElement,
java.lang.String uri)
msg - the current message to write the Object into as a XML streamjaxb - the JAXB Object to serializerootElement - root element local name for serializationuri - namespace uri for the root element
void serializeJAXBObjectAsXMLStream(Message msg,
java.lang.Object jaxb)
msg - the current message to write the Object into as a SOAP 1.1 streamjaxb - the JAXB Object to serialize
|
Copyright (c) 2010-2012 AdroitLogic Private Ltd. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||