Package org.objectweb.celtix.ws.addressing

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


     * rejected by the receiver-side WS-Addressing layer as a duplicate).
     *
     * @param context the message context
     */
    private void refreshMAPs(MessageContext context) {
        AddressingProperties maps =
            ContextUtils.retrieveMAPs(context, false, true);
        String uuid = ContextUtils.generateUUID();
        maps.setMessageID(ContextUtils.getAttributedURI(uuid));
    }
View Full Code Here


        if (null == rmps) {
            SOAPMessage message = (SOAPMessage)ctx.get(SOAP_MSG_KEY);
            rmps = getRMSoapHandler().unmarshalRMProperties(message);
            RMContextUtils.storeRMProperties(ctx, rmps, true);           
        }
        AddressingProperties maps = ContextUtils.retrieveMAPs(ctx, false, true);
        if (null == maps) {
            SOAPMessage message = (SOAPMessage)ctx.get(SOAP_MSG_KEY);
            try {
                maps = getWsaSOAPHandler().unmarshalMAPs(message);
                ContextUtils.storeMAPs(maps, ctx, true);
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().getTerminateSequenceAction());
        maps.setAction(actionURI);
        ContextUtils.storeMAPs(maps, getObjectMessageContext(), true, true, true, true);
       
        setMessageParameters(seq);
       
        setOneway(true);
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().getSequenceInfoAction());
        maps.setAction(actionURI);
        ContextUtils.storeMAPs(maps, getObjectMessageContext(), true, true, true, true)
       
        setOneway(true);
       
        // NOTE: Not storing a method in the context causes BindingContextUtils.isOnewayMethod
View Full Code Here

        RMPropertiesImpl rmps = new RMPropertiesImpl();       
        rmps.setAcksRequested(requested);
    }
   
    public void acknowledge(RMDestinationSequence seq) {
        AddressingProperties maps = ContextUtils.retrieveMAPs(getObjectMessageContext(), true, true);
        maps.getAction().setValue(RMUtils.getRMConstants().getSequenceAcknowledgmentAction());
        AttributedURIType toAddress = ContextUtils.WSA_OBJECT_FACTORY.createAttributedURIType();
        toAddress.setValue(seq.getAcksTo().getAddress().getValue());
        maps.setTo(toAddress);
        // rm properties will be created (and actual acknowledgments added)
        // by rm handler upon outbound processing of this message
    }
View Full Code Here

        // rm properties will be created (and actual acknowledgments added)
        // by rm handler upon outbound processing of this message
    }
   
    public void lastMessage(SourceSequence seq) {
        AddressingProperties maps = ContextUtils.retrieveMAPs(getObjectMessageContext(), true, true);
        maps.getAction().setValue(RMUtils.getRMConstants().getLastMessageAction());
        RMPropertiesImpl rmps = new RMPropertiesImpl();
        seq.nextAndLastMessageNumber();
        rmps.setSequence(seq);
        assert seq.isLastMessage();
        RMContextUtils.storeRMProperties(getObjectMessageContext(), rmps, true);
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().getCreateSequenceResponseAction());
        maps.setAction(actionURI);
        maps.setRelatesTo(ContextUtils.getRelatesTo(inMAPs.getMessageID().getValue()));
        ContextUtils.storeMAPs(maps, getObjectMessageContext(), true, true, true, true);
       
        setMessageParameters(csr);
       
        setOneway(true);
View Full Code Here

        System.out.println("Explicit MessageAddressingProperties propagation");
        System.out.println("------------------------------------------------");

        // get Message Addressing Properties instance
        AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
        AddressingProperties maps = builder.newAddressingProperties();

        // set MessageID property
        AttributedURIType messageID =
            WSA_OBJECT_FACTORY.createAttributedURIType();
        messageID.setValue("urn:uuid:12345");
        maps.setMessageID(messageID);

        // associate MAPs with request context
        Map<String, Object> requestContext =
            ((BindingProvider)port).getRequestContext();
        requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);

        System.out.println("Invoking sayHi...");
        String resp = port.sayHi();
        System.out.println("Server responded with: " + resp + "\n");

        // clear the message ID to ensure a duplicate is not sent on the
        // next invocation
        maps.setMessageID(null);

        // set the RelatesTo property to the initial message ID, so that
        // the series of invocations are explicitly related
        RelatesToType relatesTo = WSA_OBJECT_FACTORY.createRelatesToType();
        relatesTo.setValue(messageID.getValue());
        maps.setRelatesTo(relatesTo);

        System.out.println("Invoking greetMe...");
        resp = port.greetMe(USER_NAME);
        System.out.println("Server responded with: " + resp + "\n");
View Full Code Here

        }
        return null;
    }

    protected String getAction(LogicalMessageContext context) {
        AddressingProperties maps = ContextUtils.retrieveMAPs(context, false, false);
        if (null != maps && null != maps.getAction()) {
            return maps.getAction().getValue();
        }
        return null;
    }
View Full Code Here

    public void setUp() {
        builder = new AddressingBuilderImpl();
    }

    public void testGetAddressingProperties() throws Exception {
        AddressingProperties properties = builder.newAddressingProperties();
        assertNotNull("expected AddressingProperties ", properties);
        assertNotSame("unexpected same properties",
                      builder.newAddressingProperties(),
                      properties);
    }
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.