Package org.apache.cxf.message

Examples of org.apache.cxf.message.Message


    @SuppressWarnings("unchecked")
    public synchronized boolean doIntercept(Message message) {
        updateIterator();
        pausedMessage = message;

        Message oldMessage = CURRENT_MESSAGE.get();
        try {
            CURRENT_MESSAGE.set(message);
            while (state == State.EXECUTING && iterator.hasNext()) {
                try {
                    Interceptor currentInterceptor = iterator.next();
View Full Code Here


        assertNotNull(out);
        List<Interceptor> infault = binding.getFaultInInterceptors();
        assertNotNull(infault);
        List<Interceptor> outfault = binding.getFaultOutInterceptors();
        assertNotNull(outfault);
        Message message = binding.createMessage();
        message.put(ORB.class, orb);
        assertNotNull(message);
        ORB corbaORB = message.get(ORB.class);
        assertNotNull(corbaORB);       
        MessageImpl mesage = new MessageImpl();
        mesage.put(ORB.class, orb);
        Message msg = binding.createMessage(mesage);       
        assertNotNull(msg);               
        ORB corbaOrb = msg.get(ORB.class);
        assertNotNull(corbaOrb);
        /*List<Interceptor> infault = binding.getInFaultInterceptors();
        assertEquals(1, infault.size());
        List<Interceptor> outfault = binding.getOutFaultInterceptors();
        assertEquals(1, fault.size());*/   
View Full Code Here

                         "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
                         "SimpleCORBAPort");

        CorbaDestination destination = new CorbaDestination(endpointInfo, orbConfig);
        CorbaConduit conduit = new CorbaConduit(endpointInfo, destination.getAddress(), orbConfig);
        Message message = new MessageImpl();
        try {
            conduit.send(message);
        } catch (Exception ex) {
            ex.printStackTrace();           
        }
        OutputStream os = message.getContent(OutputStream.class);
        assertTrue("OutputStream should not be null", os != null);       
        ORB orb = (ORB)message.get("orb");
        assertTrue("Orb should not be null", orb != null);
        Object obj = message.get("endpoint");
        assertTrue("EndpointReferenceType should not be null", obj != null)
    }
View Full Code Here

        CorbaStreamable arg = new CorbaStreamable(obj1, objName);       
        arguments[0] = arg;
        arguments[0].setMode(org.omg.CORBA.ARG_OUT.value);
       
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        NVList list = (NVList)conduit.getArguments(message);
        assertNotNull("list should not be null", list != null);
       
        message.setStreamableArguments(arguments);
View Full Code Here

        TypeCode objTypeCode = orb.get_primitive_tc(TCKind.tk_short);
        CorbaPrimitiveHandler obj1 = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
        CorbaStreamable arg = new CorbaStreamable(obj1, objName);       
       
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        NamedValue ret = (NamedValue)conduit.getReturn(message);
        assertNotNull("Return should not be null", ret != null);
        assertEquals("name should be equal", ret.name(), "return");
       
View Full Code Here

        assertEquals("name should be equal", ret2.name(), "returnName");              
    }
   
    public void testBuildExceptionListEmpty() throws Exception {
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        OperationType opType = new OperationType();
        opType.setName("review_data");
        ExceptionList exList = conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
View Full Code Here

        assertEquals("The list should be empty", exList.count(), 0);       
    }
   
    public void testBuildExceptionListWithExceptions() throws Exception {       
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();              
        TestUtils testUtils = new TestUtils();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        EndpointInfo endpointInfo = destination.getEndPointInfo();
View Full Code Here

        assertNotNull("Member type is not null", exList.item(0).member_type(0) != null);               
    }
           
    public void testInvoke() throws Exception {
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        //CorbaMessage message = new CorbaMessage(msg);
        CorbaMessage message= control.createMock(CorbaMessage.class);
        /*String opName = "GreetMe";
        NVList nvlist = (NVList)orb.create_list(0);
       
View Full Code Here

    }
   
    public void testprepareDIIArgsList() throws Exception {                       
        CorbaInInterceptor inInterceptor = new CorbaInInterceptor();
        CorbaStaxObject corbaStaxObject = new CorbaStaxObject();
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        ServiceInfo service = destination.getBindingInfo().getService();       
        List<TypeMappingType> corbaTypes = service.getDescription().getExtensors(TypeMappingType.class);
View Full Code Here

        assertEquals("Item flags should be 1", nvlist.item(0).flags(), 1);    
    }
    
    public void testprepareArgs() throws Exception {
        CorbaInInterceptor inInterceptor = new CorbaInInterceptor()
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);       
        List<ParamType> paramTypes  = new ArrayList<ParamType>(1);
        ParamType param = new ParamType();
        QName type = new QName("", "structure", "");
        param.setName("param1");
View Full Code Here

TOP

Related Classes of org.apache.cxf.message.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.