Search in sources :

Example 1 with CharacterType

use of org.apache.cxf.aegis.type.basic.CharacterType in project cxf by apache.

the class DefaultTypeMapping method createSoap11TypeMapping.

/**
 * Create a type mapping object with a stock set of mappings, including the SOAP 1.1 'encoded'
 * types.
 * @param defaultNillable whether elements are nillable by default.
 * @param enableMtomXmime whether to enable XMIME annotations with MTOM.
 * @param enableJDOM whether to add mappings for JDOM.
 * @return
 */
public static DefaultTypeMapping createSoap11TypeMapping(boolean defaultNillable, boolean enableMtomXmime, boolean enableJDOM) {
    // Create a AegisType Mapping for SOAP 1.1 Encoding
    DefaultTypeMapping soapTM = new DefaultTypeMapping(Soap11.SOAP_ENCODING_URI);
    fillStandardMappings(soapTM, defaultNillable, enableMtomXmime, enableJDOM);
    defaultRegister(soapTM, defaultNillable, boolean.class, Soap11.ENCODED_BOOLEAN, new BooleanType());
    defaultRegister(soapTM, defaultNillable, char.class, Soap11.ENCODED_CHAR, new CharacterType());
    defaultRegister(soapTM, defaultNillable, int.class, Soap11.ENCODED_INT, new IntType());
    defaultRegister(soapTM, defaultNillable, short.class, Soap11.ENCODED_SHORT, new ShortType());
    defaultRegister(soapTM, defaultNillable, double.class, Soap11.ENCODED_DOUBLE, new DoubleType());
    defaultRegister(soapTM, defaultNillable, float.class, Soap11.ENCODED_FLOAT, new FloatType());
    defaultRegister(soapTM, defaultNillable, long.class, Soap11.ENCODED_LONG, new LongType());
    defaultRegister(soapTM, defaultNillable, char.class, Soap11.ENCODED_CHAR, new CharacterType());
    defaultRegister(soapTM, defaultNillable, Character.class, Soap11.ENCODED_CHAR, new CharacterType());
    defaultRegister(soapTM, defaultNillable, String.class, Soap11.ENCODED_STRING, new StringType());
    defaultRegister(soapTM, defaultNillable, Boolean.class, Soap11.ENCODED_BOOLEAN, new BooleanType());
    defaultRegister(soapTM, defaultNillable, Integer.class, Soap11.ENCODED_INT, new IntType());
    defaultRegister(soapTM, defaultNillable, Short.class, Soap11.ENCODED_SHORT, new ShortType());
    defaultRegister(soapTM, defaultNillable, Double.class, Soap11.ENCODED_DOUBLE, new DoubleType());
    defaultRegister(soapTM, defaultNillable, Float.class, Soap11.ENCODED_FLOAT, new FloatType());
    defaultRegister(soapTM, defaultNillable, Long.class, Soap11.ENCODED_LONG, new LongType());
    defaultRegister(soapTM, defaultNillable, Date.class, Soap11.ENCODED_DATETIME, new DateTimeType());
    defaultRegister(soapTM, defaultNillable, java.sql.Date.class, Soap11.ENCODED_DATETIME, new SqlDateType());
    defaultRegister(soapTM, defaultNillable, Calendar.class, Soap11.ENCODED_DATETIME, new CalendarType());
    defaultRegister(soapTM, defaultNillable, byte[].class, Soap11.ENCODED_BASE64, new Base64Type());
    defaultRegister(soapTM, defaultNillable, BigDecimal.class, Soap11.ENCODED_DECIMAL, new BigDecimalType());
    defaultRegister(soapTM, defaultNillable, BigInteger.class, Soap11.ENCODED_INTEGER, new BigIntegerType());
    return soapTM;
}
Also used : LongType(org.apache.cxf.aegis.type.basic.LongType) StringType(org.apache.cxf.aegis.type.basic.StringType) CharacterAsStringType(org.apache.cxf.aegis.type.basic.CharacterAsStringType) ShortType(org.apache.cxf.aegis.type.basic.ShortType) BooleanType(org.apache.cxf.aegis.type.basic.BooleanType) CharacterType(org.apache.cxf.aegis.type.basic.CharacterType) Base64Type(org.apache.cxf.aegis.type.basic.Base64Type) IntType(org.apache.cxf.aegis.type.basic.IntType) FloatType(org.apache.cxf.aegis.type.basic.FloatType) DateTimeType(org.apache.cxf.aegis.type.basic.DateTimeType) SqlDateType(org.apache.cxf.aegis.type.basic.SqlDateType) BigIntegerType(org.apache.cxf.aegis.type.basic.BigIntegerType) DoubleType(org.apache.cxf.aegis.type.basic.DoubleType) BigDecimalType(org.apache.cxf.aegis.type.basic.BigDecimalType) CalendarType(org.apache.cxf.aegis.type.basic.CalendarType)

Aggregations

Base64Type (org.apache.cxf.aegis.type.basic.Base64Type)1 BigDecimalType (org.apache.cxf.aegis.type.basic.BigDecimalType)1 BigIntegerType (org.apache.cxf.aegis.type.basic.BigIntegerType)1 BooleanType (org.apache.cxf.aegis.type.basic.BooleanType)1 CalendarType (org.apache.cxf.aegis.type.basic.CalendarType)1 CharacterAsStringType (org.apache.cxf.aegis.type.basic.CharacterAsStringType)1 CharacterType (org.apache.cxf.aegis.type.basic.CharacterType)1 DateTimeType (org.apache.cxf.aegis.type.basic.DateTimeType)1 DoubleType (org.apache.cxf.aegis.type.basic.DoubleType)1 FloatType (org.apache.cxf.aegis.type.basic.FloatType)1 IntType (org.apache.cxf.aegis.type.basic.IntType)1 LongType (org.apache.cxf.aegis.type.basic.LongType)1 ShortType (org.apache.cxf.aegis.type.basic.ShortType)1 SqlDateType (org.apache.cxf.aegis.type.basic.SqlDateType)1 StringType (org.apache.cxf.aegis.type.basic.StringType)1