Search in sources :

Example 16 with CorbaObjectHandler

use of org.apache.cxf.binding.corba.types.CorbaObjectHandler in project cxf by apache.

the class CorbaObjectWriter method writeSequence.

public void writeSequence(CorbaObjectHandler obj) throws CorbaBindingException {
    if (obj instanceof CorbaOctetSequenceHandler) {
        byte[] value = ((CorbaOctetSequenceHandler) obj).getValue();
        stream.write_ulong(value.length);
        stream.write_octet_array(value, 0, value.length);
    } else {
        CorbaSequenceHandler seqHandler = (CorbaSequenceHandler) obj;
        List<CorbaObjectHandler> seqElements = seqHandler.getElements();
        int length = seqElements.size();
        stream.write_ulong(length);
        for (int i = 0; i < length; ++i) {
            this.write(seqElements.get(i));
        }
    }
}
Also used : CorbaOctetSequenceHandler(org.apache.cxf.binding.corba.types.CorbaOctetSequenceHandler) CorbaSequenceHandler(org.apache.cxf.binding.corba.types.CorbaSequenceHandler) CorbaObjectHandler(org.apache.cxf.binding.corba.types.CorbaObjectHandler)

Aggregations

CorbaObjectHandler (org.apache.cxf.binding.corba.types.CorbaObjectHandler)16 QName (javax.xml.namespace.QName)10 CorbaStreamable (org.apache.cxf.binding.corba.CorbaStreamable)4 TypeCode (org.omg.CORBA.TypeCode)4 OutputStream (org.omg.CORBA.portable.OutputStream)4 CorbaBindingException (org.apache.cxf.binding.corba.CorbaBindingException)3 CorbaPrimitiveHandler (org.apache.cxf.binding.corba.types.CorbaPrimitiveHandler)3 CorbaSequenceHandler (org.apache.cxf.binding.corba.types.CorbaSequenceHandler)3 ModeType (org.apache.cxf.binding.corba.wsdl.ModeType)3 ParamType (org.apache.cxf.binding.corba.wsdl.ParamType)3 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)3 Test (org.junit.Test)3 Any (org.omg.CORBA.Any)3 InputStream (org.omg.CORBA.portable.InputStream)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 XMLStreamWriter (javax.xml.stream.XMLStreamWriter)2 CorbaFaultStreamWriter (org.apache.cxf.binding.corba.runtime.CorbaFaultStreamWriter)2 CorbaStreamWriter (org.apache.cxf.binding.corba.runtime.CorbaStreamWriter)2 CorbaArrayHandler (org.apache.cxf.binding.corba.types.CorbaArrayHandler)2