Package org.apache.cxf.message

Examples of org.apache.cxf.message.Message


       
    public void testInvoke() throws Exception {
        CorbaDSIServant dsiServant = new CorbaDSIServant();       
        IMocksControl control = EasyMock.createNiceControl();
        ServerRequest request = EasyMock.createMock(ServerRequest.class);
        Message msg = EasyMock.createMock(Message.class);            
        String opName = "greetMe";
        EasyMock.expect(request.operation()).andReturn(opName);                       
        MessageObserver incomingObserver = new TestObserver();              
        dsiServant.setObserver(incomingObserver);
       
View Full Code Here


       BindingInfo bindingInfo = destination.getBindingInfo();
       assertTrue("BindingInfo should not be null", bindingInfo != null);      
       EndpointInfo endpointInfo = destination.getEndPointInfo();
       assertTrue("EndpointInfo should not be null", endpointInfo != null);
      
       Message m = new MessageImpl();
       CorbaServerConduit serverConduit = (CorbaServerConduit)destination.getBackChannel(m, m, rtype);
       assertTrue("CorbaServerConduit should not be null", serverConduit != null);            
   }
View Full Code Here

        setupServiceInfo("http://yoko.apache.org/simple",
                         "/wsdl/simpleIdl.wsdl", "SimpleCORBAService",
                         "SimpleCORBAPort");
        CorbaDestination destination = new CorbaDestination(endpointInfo, orbConfig);
        CorbaServerConduit conduit = new CorbaServerConduit(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);
        destination.shutdown();
    }
View Full Code Here

        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
               
        EasyMock.expect(exchange.isOneWay()).andReturn(false);       
        EasyMock.expect(msg.getExchange()).andReturn(exchange);       
        Message message = new MessageImpl();
        CorbaMessage corbaMessage = new CorbaMessage(message);
        corbaMessage.setList(nvlist);
       
        EasyMock.expect(exchange.getInMessage()).andReturn(corbaMessage);               
        EasyMock.expect(msg.getStreamableException()).andReturn(null);
View Full Code Here

    protected void tearDown() throws Exception {       
    }
   
   
    public void testIsRequestor() throws Exception {
        Message message = new MessageImpl();
        message.put("org.apache.cxf.client", "org.apache.cxf.client");
        assertEquals(ContextUtils.isRequestor(message), true);              
    }
View Full Code Here

        message.put("org.apache.cxf.client", "org.apache.cxf.client");
        assertEquals(ContextUtils.isRequestor(message), true);              
    }

    public void testIsOutbound() throws Exception {
        Message message = new MessageImpl();
        Exchange exchange = new ExchangeImpl();
        exchange.setOutMessage(message);
        message.setExchange(exchange);
       
        assertEquals(ContextUtils.isOutbound(message), true);
    }
View Full Code Here

            new TestJettyDestination(transportFactory.getBus(),
                                     transportFactory.getRegistry(),
                                     ei,
                                     factory);
        testDestination.finalizeConfig();
        Message mi = testDestination.retrieveFromContinuation(httpRequest);
        assertNull("Continuations must be ignored", mi);
    }
View Full Code Here

        replyTo = getEPR(NOWHERE + "response/foo");
        setUpDoService(false, true, true, 202);
        destination.doService(request, response);
        setUpInMessage();
       
        Message partialResponse = setUpOutMessage();
        partialResponse.put(Message.PARTIAL_RESPONSE_MESSAGE, Boolean.TRUE);
        Conduit partialBackChannel =
            destination.getBackChannel(inMessage, partialResponse, replyTo);
        partialBackChannel.prepare(partialResponse);
        verifyBackChannelSend(partialBackChannel, partialResponse, 202);
View Full Code Here

    private void setUpInMessage() {
        inMessage.setExchange(new ExchangeImpl());
    }
   
    private Message setUpOutMessage() {
        Message outMsg = new MessageImpl();
        outMsg.putAll(inMessage);
        outMsg.setExchange(new ExchangeImpl());
        outMsg.put(Message.PROTOCOL_HEADERS,
                   new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER));
        return outMsg;
    }
View Full Code Here

       
    }
   
    @Test
    public void testPrimitiveStatementSearchBean() {
        Message m = new MessageImpl();
        m.put(Message.QUERY_STRING, "_s=name==CXF");
        SearchContext context = new SearchContextImpl(m);
        SearchCondition<SearchBean> sc = context.getCondition(SearchBean.class);
        assertNotNull(sc);
       
        PrimitiveStatement ps = sc.getStatement();
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.