Search in sources :

Example 1 with NestedComplexType

use of org.apache.cxf.performance.complex_type.types.NestedComplexType in project cxf by apache.

the class Client method initTestData.

public void initTestData() {
    NestedComplexType complexType = new NestedComplexType();
    complexType.setVarString("#12345ABc");
    complexType.setVarUByte(Short.MAX_VALUE);
    complexType.setVarUnsignedLong(new BigInteger("13691056728"));
    complexType.setVarFloat(Float.MAX_VALUE);
    complexType.setVarQName(new QName("return", "return"));
    try {
        complexType.setVarStruct(getSimpleStruct());
    } catch (DatatypeConfigurationException e) {
        e.printStackTrace();
    }
    complexType.setVarEnum(ColourEnum.RED);
    byte[] binary = new byte[1024];
    for (int idx = 0; idx < 4; idx++) {
        for (int jdx = 0; jdx < 256; jdx++) {
            binary[idx * 256 + jdx] = (byte) (jdx - 128);
        }
    }
    complexType.setVarBase64Binary(binary);
    complexType.setVarHexBinary(binary);
    for (int i = 0; i < packetSize; i++) {
        complexTypeSeq.getItem().add(complexType);
    }
}
Also used : DatatypeConfigurationException(javax.xml.datatype.DatatypeConfigurationException) QName(javax.xml.namespace.QName) NestedComplexType(org.apache.cxf.performance.complex_type.types.NestedComplexType) BigInteger(java.math.BigInteger)

Aggregations

BigInteger (java.math.BigInteger)1 DatatypeConfigurationException (javax.xml.datatype.DatatypeConfigurationException)1 QName (javax.xml.namespace.QName)1 NestedComplexType (org.apache.cxf.performance.complex_type.types.NestedComplexType)1