Package javax.xml.ws.handler

Examples of javax.xml.ws.handler.LogicalMessageContext


        control.verify();
        aggregator.close(context);
    }

    public void testResponderOutboundFault() throws Exception {
        LogicalMessageContext context = setUpContext(false, true, false);
        boolean proceed = aggregator.handleFault(context);
        assertTrue("expected dispatch to proceed", proceed);
        control.verify();
        aggregator.close(context);
    }
View Full Code Here


        control.verify();
        aggregator.close(context);
    }

    public void testRequestorInbound() throws Exception {
        LogicalMessageContext context = setUpContext(true, true, false);
        boolean proceed = aggregator.handleMessage(context);
        assertTrue("expected dispatch to proceed", proceed);
        control.verify();
        aggregator.close(context);
    }
View Full Code Here

        control.verify();
        aggregator.close(context);
    }

    public void testRequestorInboundFault() throws Exception {
        LogicalMessageContext context = setUpContext(true, true, false);
        boolean proceed = aggregator.handleFault(context);
        assertTrue("expected dispatch to proceed", proceed);
        control.verify();
        aggregator.close(context);
    }
View Full Code Here

                                               boolean mapsInContext,
                                               boolean decoupled,
                                               boolean zeroLengthAction)
        throws Exception {

        LogicalMessageContext context =
            control.createMock(LogicalMessageContext.class);
        context.get(MESSAGE_OUTBOUND_PROPERTY);
        EasyMock.expectLastCall().andReturn(Boolean.valueOf(outbound));
        context.get(REQUESTOR_ROLE_PROPERTY);
        EasyMock.expectLastCall().andReturn(Boolean.valueOf(requestor));
        if (outbound && requestor) {
            setUpUsingAddressing(context, usingAddressing);
            if (usingAddressing) {
                setUpRequestor(context,
View Full Code Here

   @Override
   protected boolean handleInbound(final MessageContext msgContext)
   {
      log.info("handleInbound()");

      LogicalMessageContext lmc = (LogicalMessageContext)msgContext;
      LogicalMessage message = lmc.getMessage();

      Object payload = message.getPayload();

      if (payload instanceof DOMSource == false)
      {
View Full Code Here

     * A test that mimics the inbound flow through a handler chain.
     */
    public void testInboundFaultFlow() throws Exception {
        MessageContext mc = createSampleFaultMessageContext();
       
        LogicalMessageContext lmc = MessageContextFactory.createLogicalMessageContext(mc);
        LogicalMessage lm = lmc.getMessage();
        Source payload = lm.getPayload();
        assertTrue("The returned payload (Source) was null", payload != null);
       
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        StreamResult result = new StreamResult(baos);
View Full Code Here

        SOAPMessage sm = smc.getMessage();
        assertTrue("The returned SOAPMessage was null", sm != null);
        assertTrue("The SOAPMessage did not contain a SOAPBody", sm.getSOAPBody() != null);
        assertTrue("The SOAPBody did not contain a SOAPFault", sm.getSOAPBody().getFault() != null);
       
        LogicalMessageContext lmc = MessageContextFactory.createLogicalMessageContext(mc);
        LogicalMessage lm = lmc.getMessage();
        Source payload = lm.getPayload();
        assertTrue("The returned payload (Source) was null", payload != null);
       
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        StreamResult result = new StreamResult(baos);
View Full Code Here

    /**
     * Test the javax.xml.transform.Source based APIs on the LogicalMessage interface.
     * @throws Exception
     */
    public void testGetPayloadAsSource() throws Exception {
        LogicalMessageContext lmc = createSampleContext();
       
        LogicalMessage msg = lmc.getMessage();
        assertTrue("The returned LogicalMessage was null", msg != null);
       
        Source payload = msg.getPayload();
        assertTrue("The returned payload (Source) was null", payload != null);
       
View Full Code Here

    /**
     * Tests the setting of the payload and make sure we don't cache improperly.
     * @throws Exception
     */
    public void testGetAndSetPayloadAsSource() throws Exception {
        LogicalMessageContext lmc = createSampleContext();
       
        LogicalMessage msg = lmc.getMessage();
        assertTrue("The returned LogicalMessage was null", msg != null);
       
        Source payload = msg.getPayload();
        assertTrue("The returned payload (Source) was null", payload != null);
       
View Full Code Here

    /**
     * Test to make sure we can get the payload multiple times from the same LogicalMessage.
     * @throws Exception
     */
    public void testGetMultiplePayloadsAsSource() throws Exception {
        LogicalMessageContext lmc = createSampleContext();

        LogicalMessage msg = lmc.getMessage();
        assertTrue("The returned LogicalMessage was null", msg != null);

        int loopCount = 3;
        for (int i = 0; i < loopCount; ++i) {
            Source payload = msg.getPayload();
View Full Code Here

TOP

Related Classes of javax.xml.ws.handler.LogicalMessageContext

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.