Search in sources :

Example 11 with CorbaStreamable

use of org.apache.cxf.binding.corba.CorbaStreamable in project cxf by apache.

the class CorbaStreamableTest method testGetStreamableAttributes.

@Test
public void testGetStreamableAttributes() {
    QName objName = new QName("object");
    QName objIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "float", CorbaConstants.NP_WSDL_CORBA);
    TypeCode objTypeCode = orb.get_primitive_tc(TCKind.tk_float);
    CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
    CorbaStreamable streamable = new CorbaStreamableImpl(obj, objName);
    TypeCode type = streamable._type();
    assertTrue(type.kind().value() == objTypeCode.kind().value());
    CorbaPrimitiveHandler storedObj = (CorbaPrimitiveHandler) streamable.getObject();
    assertNotNull(storedObj);
    int mode = streamable.getMode();
    assertTrue(mode == org.omg.CORBA.ARG_OUT.value);
    String name = streamable.getName();
    assertTrue(name.equals(objName.getLocalPart()));
}
Also used : CorbaPrimitiveHandler(org.apache.cxf.binding.corba.types.CorbaPrimitiveHandler) TypeCode(org.omg.CORBA.TypeCode) CorbaStreamable(org.apache.cxf.binding.corba.CorbaStreamable) QName(javax.xml.namespace.QName) Test(org.junit.Test)

Aggregations

CorbaStreamable (org.apache.cxf.binding.corba.CorbaStreamable)11 QName (javax.xml.namespace.QName)10 CorbaPrimitiveHandler (org.apache.cxf.binding.corba.types.CorbaPrimitiveHandler)5 Test (org.junit.Test)5 TypeCode (org.omg.CORBA.TypeCode)5 CorbaObjectHandler (org.apache.cxf.binding.corba.types.CorbaObjectHandler)4 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)4 OperationInfo (org.apache.cxf.service.model.OperationInfo)4 ParamType (org.apache.cxf.binding.corba.wsdl.ParamType)3 XMLStreamWriter (javax.xml.stream.XMLStreamWriter)2 CorbaBindingException (org.apache.cxf.binding.corba.CorbaBindingException)2 CorbaFaultStreamWriter (org.apache.cxf.binding.corba.runtime.CorbaFaultStreamWriter)2 CorbaStreamWriter (org.apache.cxf.binding.corba.runtime.CorbaStreamWriter)2 ArgType (org.apache.cxf.binding.corba.wsdl.ArgType)2 ModeType (org.apache.cxf.binding.corba.wsdl.ModeType)2 OperationType (org.apache.cxf.binding.corba.wsdl.OperationType)2 MessageInfo (org.apache.cxf.service.model.MessageInfo)2 MessagePartInfo (org.apache.cxf.service.model.MessagePartInfo)2 InputStream (org.omg.CORBA.portable.InputStream)2 OutputStream (org.omg.CORBA.portable.OutputStream)2