it.imolinfo.jbi4cics.jbi.processor.wsdl11wrapper
Class WrapperUtil

java.lang.Object
  extended by it.imolinfo.jbi4cics.jbi.processor.wsdl11wrapper.WrapperUtil

public class WrapperUtil
extends java.lang.Object


Field Summary
static java.lang.String WRAPPER_ATTRIBUTE_NAME
           
static java.lang.String WRAPPER_ATTRIBUTE_TYPE
           
static java.lang.String WRAPPER_ATTRIBUTE_VERSION
           
static java.lang.String WRAPPER_ATTRIBUTE_VERSION_VALUE
           
static java.lang.String WRAPPER_DEFAULT_NAMESPACE
           
static java.lang.String WRAPPER_DEFAULT_NAMESPACE_PREFIX
          Constants to build wsdl 1.1 wrapper, e.g.
static java.lang.String WRAPPER_MESSAGE
           
static java.lang.String WRAPPER_PART
           
 
Constructor Summary
WrapperUtil()
          void constructor.
 
Method Summary
static org.w3c.dom.Element createJBIMessageWrapper(org.w3c.dom.Document normalDoc, javax.xml.namespace.QName type, java.lang.String name)
          Creates and returns a JBI message wrapper element.
static org.w3c.dom.Element createJBIWrappedPart(org.w3c.dom.Document normalDoc, org.w3c.dom.Node part)
          Creates and returns a JBI part wrapper element.
static org.w3c.dom.Element createJBIWrappedPart(org.w3c.dom.Document normalDoc, org.w3c.dom.NodeList part)
          Creates and returns a JBI part wrapper element.
static org.w3c.dom.Element importJBIWrappedPart(org.w3c.dom.Document normalDoc, org.w3c.dom.Node part)
          Creates and returns a JBI part wrapper element.
static org.w3c.dom.Element importJBIWrappedPart(org.w3c.dom.Document normalDoc, org.w3c.dom.NodeList part)
          Creates and returns a JBI part wrapper element.
static boolean isMessageWrapped(org.w3c.dom.Document doc)
           
static boolean isMessageWrapped(javax.xml.stream.XMLStreamReader docReader)
           
static javax.xml.transform.Source jbiMessageWrapper(java.lang.String msgContent, javax.xml.namespace.QName qName, java.lang.String name)
          Gets a JBI wrapper.
static java.lang.String toXml(org.w3c.dom.Node node, java.lang.String encoding, boolean omitXMLDeclaration)
          Converts the xml documet to a String.
static javax.xml.stream.XMLStreamReader unWrapMessage(javax.xml.stream.XMLStreamReader docReader)
          UnWraps a normalized WSDL 1.1 message TODO: Verify message parts: there must be a part element for each message part, "All logical parts of the message must appear here, in the same order as defined in the WSDL 1.1 message description referred to by the type attribute" (jbi specs - 5.5.1.1.4) TODO :CLEAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRAPPER_DEFAULT_NAMESPACE_PREFIX

public static final java.lang.String WRAPPER_DEFAULT_NAMESPACE_PREFIX
Constants to build wsdl 1.1 wrapper, e.g. along the lines of

See Also:
Constant Field Values

WRAPPER_DEFAULT_NAMESPACE

public static final java.lang.String WRAPPER_DEFAULT_NAMESPACE
See Also:
Constant Field Values

WRAPPER_MESSAGE

public static final java.lang.String WRAPPER_MESSAGE
See Also:
Constant Field Values

WRAPPER_ATTRIBUTE_VERSION

public static final java.lang.String WRAPPER_ATTRIBUTE_VERSION
See Also:
Constant Field Values

WRAPPER_ATTRIBUTE_VERSION_VALUE

public static final java.lang.String WRAPPER_ATTRIBUTE_VERSION_VALUE
See Also:
Constant Field Values

WRAPPER_ATTRIBUTE_TYPE

public static final java.lang.String WRAPPER_ATTRIBUTE_TYPE
See Also:
Constant Field Values

WRAPPER_ATTRIBUTE_NAME

public static final java.lang.String WRAPPER_ATTRIBUTE_NAME
See Also:
Constant Field Values

WRAPPER_PART

public static final java.lang.String WRAPPER_PART
See Also:
Constant Field Values
Constructor Detail

WrapperUtil

public WrapperUtil()
void constructor.

Method Detail

createJBIMessageWrapper

public static org.w3c.dom.Element createJBIMessageWrapper(org.w3c.dom.Document normalDoc,
                                                          javax.xml.namespace.QName type,
                                                          java.lang.String name)
Creates and returns a JBI message wrapper element. Does NOT add the created element to the normalDoc - nor does it popluate the wrapper element with a payload

Parameters:
normalDoc - The target document of the normalization
type - qualified message name defined in the portmap definition for a given message
name - optional name attribute defined in the portmap definition for a given message
Returns:
the jbi message wrapper element

createJBIWrappedPart

public static org.w3c.dom.Element createJBIWrappedPart(org.w3c.dom.Document normalDoc,
                                                       org.w3c.dom.Node part)
Creates and returns a JBI part wrapper element. Does NOT add the created element to the normalDoc.

Parameters:
normalDoc - The target document of the normalization
part - the part payload which must be created by normalDoc
Returns:
wrapperElem The craeted JBI wrapped part

createJBIWrappedPart

public static org.w3c.dom.Element createJBIWrappedPart(org.w3c.dom.Document normalDoc,
                                                       org.w3c.dom.NodeList part)
Creates and returns a JBI part wrapper element. Does NOT add the created element to the normalDoc.

Parameters:
normalDoc - The target document of the normalization
part - the part payload which must be created by normalDoc
Returns:
wrapperElem the created JBI wrapped part

importJBIWrappedPart

public static org.w3c.dom.Element importJBIWrappedPart(org.w3c.dom.Document normalDoc,
                                                       org.w3c.dom.Node part)
Creates and returns a JBI part wrapper element. Does NOT add the created element to the normalDoc.

Parameters:
normalDoc - The target document of the normalization
part - the part payload which need not be created by normalDoc
Returns:
wrapperElem the created JBI wrapped part

importJBIWrappedPart

public static org.w3c.dom.Element importJBIWrappedPart(org.w3c.dom.Document normalDoc,
                                                       org.w3c.dom.NodeList part)
Creates and returns a JBI part wrapper element. Does NOT add the created element to the normalDoc.

Parameters:
normalDoc - The target document of the normalization
part - the part payload which need not be created by normalDoc
Returns:
wrapperElem the created JBI wrapped part

isMessageWrapped

public static boolean isMessageWrapped(org.w3c.dom.Document doc)
Parameters:
doc - the message to determine whether it has a normalized WSDL 1.1 wrapper
Returns:
true if the message passed in has a WSDL 1.1 wrapper element, false if it does not

jbiMessageWrapper

public static javax.xml.transform.Source jbiMessageWrapper(java.lang.String msgContent,
                                                           javax.xml.namespace.QName qName,
                                                           java.lang.String name)
                                                    throws WrapperProcessingException
Gets a JBI wrapper. See JBI specs, 5.5.1.1.4 TODO :CLEAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Parameters:
msgContent - the content message
qName - the message namespace
name - the message name
Returns:
ret the created JBI wrapped message
Throws:
WrapperProcessingException - the wrapper processing exception

toXml

public static java.lang.String toXml(org.w3c.dom.Node node,
                                     java.lang.String encoding,
                                     boolean omitXMLDeclaration)
                              throws WrapperProcessingException
Converts the xml documet to a String. Useful for logging.

Parameters:
node - The node
encoding - The encoding
omitXMLDeclaration - The omit XML declaration
Returns:
ret the created string to Xml
Throws:
WrapperProcessingException - The wrapper processing exception

isMessageWrapped

public static boolean isMessageWrapped(javax.xml.stream.XMLStreamReader docReader)
                                throws WrapperProcessingException
Parameters:
docReader - the message to determine whether it has a normalized WSDL 1.1 wrapper
Returns:
true if the message passed in has a WSDL 1.1 wrapper element, false if it does not
Throws:
WrapperProcessingException - The wrapper processing exception

unWrapMessage

public static javax.xml.stream.XMLStreamReader unWrapMessage(javax.xml.stream.XMLStreamReader docReader)
                                                      throws WrapperProcessingException
UnWraps a normalized WSDL 1.1 message TODO: Verify message parts: there must be a part element for each message part, "All logical parts of the message must appear here, in the same order as defined in the WSDL 1.1 message description referred to by the type attribute" (jbi specs - 5.5.1.1.4) TODO :CLEAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Parameters:
docReader - the message to determine whether it has a wrapper
Returns:
true if the message passed in has a WSDL 1.1 wrapper element, false if it does not
Throws:
WrapperProcessingException - The warepper process exception


Copyright © 2005-2008 Imola Informatica. All Rights Reserved.