|
Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.6.3) E15033-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.wli.sb.sources.JavaXmlSource
public class JavaXmlSource
A JavaXmlSource represents the payload carried by the services that supports java objects as the arguments. It is comprised of a XML representation defining the shape of message body in the pipeline and a map containing java objects against the unique keys.
In the XML representation, java object arguments are substituted by <ctx:java-content ref='jcid:xyz' xmlns:ctx="http://www.bea.com/wli/sb/context" /> elements, having the value of the ref attribute equal to a key in the JavaObjects map that indexes the replaced java object.
Map contains the objects to be registered in pipeline java object repository against the unique ids as present in the XML representation
Example:
Let’s assume, we have an inbound jejb transport endpoint based on method myMethod(String, int, com.acme.SomeXMLObject, com.acme.SomePOJO). The proxy service configuration specifies the names “my-method” for the operation, and arg0, arg1, arg2 and arg3 for the arguments. When a transport invocation occurs and a JavaXmlSource is composed by the inbound endpoint, the XML representation will have the following contents:
<tes:my-method xmlns:tes=”default/someURI">   <arg0>Some string</arg0>   <arg1>88</arg1>   <arg2><inlined xml object contents .../></arg2>   <arg3><con:java-content ref=”key1” xmlns:con="http://www.bea.com/wli/sb/context”/></arg3> </tes:my-method>
In this example, the java objects map will contain:
key1 --> the java object passed as the fourth 'SomePOJO' argument.
Field Summary |
---|
Fields inherited from interface com.bea.wli.sb.sources.Source |
---|
DEFAULT_CHARACTER_SET_ENCODING |
Constructor Summary | |
---|---|
JavaXmlSource(XmlObjectSource xmlSource, java.util.Map<java.lang.String,java.lang.Object> pojoMap) Creates an instance of JavaXmlSource given a XML representation defining the shape of message body in the pipeline and a map containing java objects against the unique keys. |
Method Summary | |
---|---|
java.io.InputStream |
getInputStream(TransformOptions options) Returns an input stream that contains the XML representation, defining the shape of the message body. |
java.util.Map<java.lang.String,java.lang.Object> |
getPojoMap() Returns the map containing the objects stored against the unique ids as present in the XML representation. |
XmlObjectSource |
getXmlSource() Returns the XmlObjectSource containing the XML representation of the payload. |
void |
writeTo(java.io.OutputStream os, TransformOptions options) Writes the XmlObjectSource contents to a byte-based stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaXmlSource(XmlObjectSource xmlSource, java.util.Map<java.lang.String,java.lang.Object> pojoMap)
xmlSource
- xml representation defining the shape of message bodypojoMap
- the sequence of objects to be registered in pipeline java object repository against the unique ids as present in the XML representationMethod Detail |
---|
public java.io.InputStream getInputStream(TransformOptions options) throws java.io.IOException, TransformException
getInputStream
in interface Source
options
- Options used to affect the serializationjava.io.IOException
TransformException
public void writeTo(java.io.OutputStream os, TransformOptions options) throws java.io.IOException, TransformException
writeTo
in interface Source
os
- the OutputStream to which serialized content will be writtenoptions
- TransformOptions used to affect the serializationjava.io.IOException
TransformException
public XmlObjectSource getXmlSource()
public java.util.Map<java.lang.String,java.lang.Object> getPojoMap()
|
Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.6.3) E15033-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |