ILOG JRules User Guide > Integrating Application Data > Reference > Mapping Between Web Service Data and Dynamic Classes > Schema Type Mapping

SOAP message instances are partially described by an operation name and a list of parameter values. There are two types of data parameter: simple and complex.

Note
The use of WSDL files in the XOM is now deprecated. We recommend you use the JAX-WS API instead.

Simple Types

A simple type parameter is mapped on a primitive or Java object instance. This mapping is defined by the JAX-RPC type mapping registry, and the default type mapping policy. The JAX-RPC supported types are built-in types, including:

The following tables are a reproduction of the JAX-RPC mapping tables, which specifies the Java mapping for the built-in simple XML data types and the SOAP encoded simple types.

Table 9 Java Mapping for the Built-in Simple XML Data Types  
Simple Type 
Java Type 
xsd:string 
java.lang.String 
xsd:integer 
java.math.BigInteger 
xsd:int 
int 
xsd:long 
long 
xsd:short 
short 
xsd:decimal 
java.math.BigDecimal 
xsd:float 
float 
xsd:double 
double 
xsd:boolean 
boolean 
xsd:byte  
byte 
xsd:QName 
javax.xml.namespace.QName 
xsd:dateTime 
java.util.Calendar 
xsd:base64Binary 
byte[] 
xsd:hexBinary 
byte[] 

Table 10 Java Mapping for the SOAP Encoded XML Data Types 
SOAP Encoded 
Simple Type 
Java Type 
soapenc:string 
java.lang.String 
soapenc:boolean 
java.lang.Boolean 
soapenc:float  
java.lang.Float 
soapenc:double 
java.lang.Double 
soapenc:decimal 
java.math.BigDecimal 
soapenc:int 
java.lang.Integer 
soapenc:short 
java.lang.Short 
soapenc:byte 
java.lang.Byte 
soapenc:base64 
byte[] 

Complex Types

A complex type parameter is mapped on an IlrXmlObject instance. The XML attributes and elements of the complex type are mapped on Java fields of the instance. The mapping is very similar to the XML binding of XML schema complex types. (See the XML Binding User's Manual: Mapping Schema Components to Dynamic Classes.)

A XOM is generated from the XSD schema part of a WSDL document. The dynamic classes related to the XML complex type are then made available in the XOM, which is accessible to the business rules.

Holder Classes and Support for Output Parameters

The proper use of holder classes is described in section 4.3.5 of the JAX-RPC 1.0 specification. Go to http://java.sun.com/xml/downloads/jaxrpc.html to view a copy of the specification. Java holder classes enable methods to return multiple output values. If you want a Web service operation to return multiple values, define the data type of the return value to be a complex type, such as an object with multiple parts or an array. Alternatively, specify that one or more of the Web service operation parameters be out or in-out parameters.

The following example shows a holder object for the String class:

public class StringHolder {
   public String value;
   public StringHolder() {
      value = null;
   }
   public StringHolder(String v) {
      value = v;
   }
}

Given this class definition, you can write the following server code:

public int myMethod(StringHolder out) {
   out.value = "Some String";
   return 1;
}

Related Concepts

Web Service Binding
Web Service Mapping
Web Service Mapping Limitations

Related Reference

IlrXmlObject