XML To Java
XML to Java is a synchronous activity. Use this activity to create an instance of a Java object based on data from an XML document. The XML schema for providing the input to the Java object or Java schema specified on the General tab of this activity.
The specified Java class must meet the following requirements:
- The Java class must have a public default constructor (that is, a constructor with no arguments).
- The Java class must be eligible to be serialized (that is, the class must implement or be a subclass of a class that implements java.io.Serializable).
General
The General tab has the following fields.
Field | Module Property | Description |
---|---|---|
Name | No | The name to be displayed as the label for the resource. |
Class Name | No | The class name in the Java schema to use.
Use the Browse button to bring up the dialog to select the Java class. |
Description
Provide a short description for the XML to Java activity.
Input
The following is the input for the activity.
Input Item | Datatype | Description |
---|---|---|
XML Schema | varies | The XML schema you want to convert to a Java object. The content of this schema depends upon the Java class or Java schema defined in the
Class Name field on the
General tab.
The elements in the schema display in an alphabetical order. |
Output
The following is the output of the activity.
Output Item | Datatype | Description |
---|---|---|
referenced class | Java Object | A Java object that is created out of the XML schema. |
Fault
The Fault tab lists the possible exceptions generated by this activity.
Fault | Generated When.. |
---|---|
XMLToJavaConversionException
|
An error occurred when converting the XML schema to a Java object. |