Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.webservice
Class LiteralXML

java.lang.Object
  extended by oracle.portal.provider.v2.webservice.LiteralXML
All Implemented Interfaces:
InitializableXMLObject

public class LiteralXML
extends java.lang.Object
implements InitializableXMLObject

A LiteralXML is used to describe the structure and bindings of a literal XML request to a web service. It implements the InitializableXMLObject interface, and is designed to be loaded from an XML definition file by a NodeHandler.

Because the XML description of a LiteralXML can contain nested XML elements, it is important that the class's own node handler, LiteralXML.Handler is used to process its XML description. This can be ensured by using the handler attribute. For example:

 <literal class="oracle.portal.provider.v2.webservice.LiteralXML"
   handler="oracle.portal.provider.v2.webservice.LiteralXML$Handler">
 
Within the above style of XML description, the <attribute> element can be used to describe an XML attribute whose name is specified by its name attribute. An <attribute> element can optionally contain text, corresponding to a constant value for the attribute.

Similarly, the <element> element can be used to describe an XML element whose name is specified by its name attribute. An <element> can optionally contain text, corresponding to constant textual content of the element, <attribute> elements, corresponding to attributes set on the element and further child <element>s corresponding to nested elements.

Both <element>s and <attribute>s can be 'bound' to dynamic content described by a bind attribute. A bind attribute should consist of a type name and a parameter name separated by a '/' character. The allowed bind type names and their meanings are listed below:

When the bind attribute is set, the default, mandatory and prompt attributes can also be used to set the corresponding property on the WebServiceRenderer.ParameterBinding they describe.


Nested Class Summary
static class LiteralXML.Handler
          LiteralXML.Handler is the NodeHandler that should be used to process XML descriptions of a LiteralXML object.
 
Constructor Summary
LiteralXML()
           
 
Method Summary
 org.w3c.dom.NodeList generateElements(WebServiceRenderRequest wrr)
          'Instantiates' the XML description by translating <element>s into 'real' elements, <attribute>s into 'real' attributes, and expanding out bindings.
 org.w3c.dom.NodeList getNodeList()
          Gets the list of top level elements in the literal XML description.
 void postInitialize()
          Performs the extra steps required to initialize and validate a LiteralXML object once its properties have been set with the appropriate accessor methods.
 void preInitialize(java.lang.Object parent)
          Performs the steps required to initialize a LiteralXML object after it has been constructed.
 void setNodeList(org.w3c.dom.NodeList nodeList)
          Sets the list of top level elements in the literal XML description.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralXML

public LiteralXML()
Method Detail

preInitialize

public void preInitialize(java.lang.Object parent)
                   throws NodeHandlerException
Performs the steps required to initialize a LiteralXML object after it has been constructed.

Specified by:
preInitialize in interface InitializableXMLObject
Parameters:
parent - the object that will become this object's parent
Throws:
NodeHandlerException - if an error occurs while initializing this object

postInitialize

public void postInitialize()
                    throws NodeHandlerException
Performs the extra steps required to initialize and validate a LiteralXML object once its properties have been set with the appropriate accessor methods.

Specified by:
postInitialize in interface InitializableXMLObject
Throws:
NodeHandlerException - if not all properties have been set correctly

setNodeList

public final void setNodeList(org.w3c.dom.NodeList nodeList)
Sets the list of top level elements in the literal XML description.

Parameters:
nodeList - list of top level elements in the literal XML description

getNodeList

public final org.w3c.dom.NodeList getNodeList()
Gets the list of top level elements in the literal XML description.

Returns:
list of top level elements in the literal XML description

generateElements

public org.w3c.dom.NodeList generateElements(WebServiceRenderRequest wrr)
                                      throws PortletException
'Instantiates' the XML description by translating <element>s into 'real' elements, <attribute>s into 'real' attributes, and expanding out bindings.

Throws:
PortletException

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.