Package org.objectweb.celtix.ws.addressing

Examples of org.objectweb.celtix.ws.addressing.AddressingProperties


     *
     * @param context
     */
    private void storeBindingInfo(MessageContext context) {
        assert !ContextUtils.isOutbound(context);
        AddressingProperties maps = ContextUtils.retrieveMAPs(context, false, false);
        AttributedURIType actionURI = null == maps ? null : maps.getAction();
        String action = null == actionURI ? null : actionURI.getValue();
        DataBindingCallback callback = null;
        String operationName = null;
        boolean rmProtocolMessage = true;

View Full Code Here


        assertNull(s.getCurrent(sid));
    }
   
    public void testAddUnacknowledged() {
        ObjectMessageContext ctx = new ObjectMessageContextImpl();
        AddressingProperties maps = new AddressingPropertiesImpl();
        ctx.put(CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, maps);
        RMPropertiesImpl rmps = new RMPropertiesImpl();
        SequenceType seq = control.createMock(SequenceType.class);
        Identifier sid = control.createMock(Identifier.class);
        rmps.setSequence(seq);
View Full Code Here

    public void testExplicitMAPs() throws Exception {
        try {
            Map<String, Object> requestContext =
                ((BindingProvider)greeter).getRequestContext();
            AddressingProperties maps = new AddressingPropertiesImpl();
            AttributedURIType id =
                ContextUtils.getAttributedURI("urn:uuid:12345");
            maps.setMessageID(id);
            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
            String greeting = greeter.greetMe("explicit1");
            assertEquals("unexpected response received from service",
                         "Hello explicit1",
                         greeting);
            checkVerification();

            // the previous addition to the request context impacts
            // on all subsequent invocations on this proxy => a duplicate
            // message ID fault is expected
            try {
                greeter.greetMe("explicit2");
                fail("expected ProtocolException on duplicate message ID");
            } catch (ProtocolException pe) {
                assertTrue("expected duplicate message ID failure",
                           "Duplicate Message ID urn:uuid:12345".equals(pe.getMessage()));
                checkVerification();
            }

            // clearing the message ID ensure a duplicate is not sent
            maps.setMessageID(null);
            maps.setRelatesTo(ContextUtils.getRelatesTo(id.getValue()));
            greeting = greeter.greetMe("explicit3");
            assertEquals("unexpected response received from service",
                         "Hello explicit3",
                         greeting);
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

        }
        return isAddressing;
    }
   
    private boolean isOutgoingPartialResponse(SOAPMessageContext context) {
        AddressingProperties maps =
            (AddressingProperties)context.get(SERVER_ADDRESSING_PROPERTIES_OUTBOUND);
        return ContextUtils.isOutbound(context)
               && ContextUtils.isRequestor(context)
               && Names.WSA_ANONYMOUS_ADDRESS.equals(maps.getTo().getValue());
    }
View Full Code Here

        return res;
    }

    private void verifyMAPs() {
        String property = SERVER_ADDRESSING_PROPERTIES_INBOUND;
        AddressingProperties maps = (AddressingProperties)
            context.getMessageContext().get(property);
        verificationCache.put(MAPTest.verifyMAPs(maps, this));
    }
View Full Code Here

     * @exception SOAPFaultException if decoded MAPs are invalid
     */
    private AddressingProperties decode(SOAPMessageContext context) {
        // REVISIT generate MessageAddressingHeaderRequired fault if an
        // expected header is missing
        AddressingProperties maps = null;
        boolean isRequestor = ContextUtils.isRequestor(context);
        SOAPMessage message = context.getMessage();
        maps = unmarshalMAPs(message);
        if (isRequestor && null != maps.getRelatesTo()) {
            ContextUtils.storeCorrelationID(maps.getRelatesTo(),
                                            false,
                                            context);
        }
        return maps;
    }
View Full Code Here

        return "Bonjour";
    }

    private void verifyMAPs() {
        String property = SERVER_ADDRESSING_PROPERTIES_INBOUND;
        AddressingProperties maps = (AddressingProperties)
            context.getMessageContext().get(property);
        verificationCache.put(MAPTest.verifyMAPs(maps, this));
    }
View Full Code Here

    public void testExplicitMAPs() throws Exception {
        try {
            Map<String, Object> requestContext =
                ((BindingProvider)greeter).getRequestContext();
            AddressingProperties maps = new AddressingPropertiesImpl();
            AttributedURIType id =
                ContextUtils.getAttributedURI("urn:uuid:12345");
            maps.setMessageID(id);
            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
            String greeting = greeter.greetMe("explicit1");
            assertEquals("unexpected response received from service",
                         "Hello explicit1",
                         greeting);
            checkVerification();

            // the previous addition to the request context impacts
            // on all subsequent invocations on this proxy => a duplicate
            // message ID fault is expected
            try {
                greeter.greetMe("explicit2");
                fail("expected ProtocolException on duplicate message ID");
            } catch (ProtocolException pe) {
                assertTrue("expected duplicate message ID failure",
                           "Duplicate Message ID urn:uuid:12345".equals(pe.getMessage()));
                checkVerification();
            }

            // clearing the message ID ensure a duplicate is not sent
            maps.setMessageID(null);
            maps.setRelatesTo(ContextUtils.getRelatesTo(id.getValue()));
            greeting = greeter.greetMe("explicit3");
            assertEquals("unexpected response received from service",
                         "Hello explicit3",
                         greeting);
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

        ContextUtils.storeUsingAddressing(true, getObjectMessageContext());

        getObjectMessageContext().setRequestorRole(true);
       
        AddressingProperties maps = new AddressingPropertiesImpl();
        AttributedURIType actionURI = ContextUtils.WSA_OBJECT_FACTORY.createAttributedURIType();
        actionURI.setValue(RMUtils.getRMConstants().getCreateSequenceAction());
        maps.setAction(actionURI);
        maps.setRelatesTo(relatesTo);
        ContextUtils.storeMAPs(maps, getObjectMessageContext(), true, true, true, true);
           
        setMessageParameters(source, acksTo);
       
        // this request is sent as the initial request in a pair of
View Full Code Here

                DataBindingCallback responseCallback =
                    BindingContextUtils.retrieveDataBindingCallback(responseContext);
                response.processLogical(responseCallback);
            }
        } else {
            AddressingProperties maps =
                ContextUtils.retrieveMAPs(request.getObjectMessageContext(), true, true);
            String action = maps.getAction() != null
                            ? maps.getAction().getValue()
                            : "empty";
            Message msg = new Message("NO_BINDING_FOR_OUT_OF_BAND_MSG", LOG, action);
            LOG.severe(msg.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.ws.addressing.AddressingProperties

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.