Package org.apache.cxf.ws.addressing

Examples of org.apache.cxf.ws.addressing.AddressingProperties


        if (null == rme) {
            rme = createReliableEndpoint(endpoint);
            org.apache.cxf.transport.Destination destination = message.getExchange().getDestination();
            EndpointReferenceType replyTo = null;
            if (null != destination) {
                AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false, false);
                replyTo = maps.getReplyTo();
            }
            Endpoint ei = message.getExchange().get(Endpoint.class);
            org.apache.cxf.transport.Destination dest
                = ei == null ? null : ei.getEndpointInfo()
                    .getProperty(MAPAggregator.DECOUPLED_DESTINATION,
View Full Code Here


     * @return namespace URI
     */
    public String getAddressingNamespace(Message message) {
        String addrUri = (String)message.getContextualProperty(WSRM_WSA_VERSION_PROPERTY);
        if (addrUri == null) {
            AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false);
            if (maps != null) {
                addrUri = maps.getNamespaceURI();
            }
            if (addrUri == null) {
                addrUri = getConfiguredProtocol().getWSANamespace();
            }
        }
View Full Code Here

            EndpointReferenceType to = null;
            boolean isServer = RMContextUtils.isServerSide(message);
            EndpointReferenceType acksTo = null;
            RelatesToType relatesTo = null;
            if (isServer) {
                AddressingProperties inMaps = RMContextUtils.retrieveMAPs(message, false, false);
                inMaps.exposeAs(getConfiguredProtocol().getWSANamespace());
                acksTo = RMUtils.createReference(inMaps.getTo().getValue());
                to = inMaps.getReplyTo();
                source.getReliableEndpoint().getServant().setUnattachedIdentifier(inSeqId);
                relatesTo = (new org.apache.cxf.ws.addressing.ObjectFactory()).createRelatesToType();
                Destination destination = getDestination(message);
                DestinationSequence inSeq = inSeqId == null ? null : destination.getSequence(inSeqId);
                relatesTo.setValue(inSeq != null ? inSeq.getCorrelationID() : null);
View Full Code Here

                rmps.setCloseSequence(close);
            }
            RMContextUtils.storeRMProperties(message, rmps, true);               
            if (null == conduit) {
                String to = m.getTo();
                AddressingProperties maps = new AddressingPropertiesImpl();
                maps.setTo(RMUtils.createReference(to));
                RMContextUtils.storeMAPs(maps, message, true, false);
            }
                                   
            message.put(RMMessageConstants.SAVED_CONTENT, m.getCachedOutputStream());
            RMContextUtils.setProtocolVariation(message, ss.getProtocol());
View Full Code Here

    }
   
    // Interceptor interface
   
    public void handle(Message message) throws SequenceFault, RMException {
        final AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false);
        //if wsrmp:RMAssertion and addressing is optional
        if (maps == null && isRMPolicyEnabled(message)) {
            return;
        }
        LOG.entering(getClass().getName(), "handleMessage");
View Full Code Here

     *
     * @param message the messsage message
     */
    public void handleFault(SoapMessage message) {
        if (!message.getExchange().isOneWay()) {
            AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, true, false);
            if (ContextUtils.isRequestor(message)
                && maps != null) {
                //fault occurred trying to send the message, remove it
                uncorrelatedExchanges.remove(maps.getMessageID().getValue());
            } else if (!ContextUtils.isRequestor(message)
                && maps == null
                && !message.containsKey(MAPAggregator.class.getName())) {
                //fault occurred while processing the incoming message, but possibly
                //before the MAPAggregator was called.   We need to see if we can
View Full Code Here

    private void mediate(SoapMessage message) {
        if (!MessageUtils.getContextualBoolean(message, MAPAggregator.ADDRESSING_DISABLED, false)) {
            if (ContextUtils.isOutbound(message)) {
                encode(message, ContextUtils.retrieveMAPs(message, false, true));
            } else if (null == ContextUtils.retrieveMAPs(message, false, false, false)) {           
                AddressingProperties maps = decode(message);
                ContextUtils.storeMAPs(maps, message, false);
                markPartialResponse(message, maps);
                restoreExchange(message, maps);
               
                if (maps != null
                    && !MessageUtils.isRequestor(message)
                    && message.getExchange().getBindingOperationInfo() == null
                    && !MessageUtils.isOutbound(message)
                    && maps.getAction() != null) {
                    //try and use the Action from the maps to find the operation
                    String action = maps.getAction().getValue();
                    if (action != null) {
                        SoapActionInInterceptor.getAndSetOperation(message, action);
                    }
                }
            }
View Full Code Here

                } else if (!MessageUtils.getContextualBoolean(message,
                                          "org.apache.cxf.ws.addressing.MAPAggregator.addressingDisabled",
                                          false)) {
                    //see if it can directly be correlated with the out message:
                    Message outmsg = message.getExchange().getOutMessage();
                    AddressingProperties outp = outmsg != null
                        ? ContextUtils.retrieveMAPs(outmsg, false, true, false) : null;
                    if (outp == null
                        || !outp.getMessageID().getValue().equals(maps.getRelatesTo().getValue())) {
                        LOG.log(Level.WARNING, "CORRELATION_FAILURE_MSG");
                        message.getInterceptorChain().abort();
                    }
                }
            }
View Full Code Here

            nextInterval = baseRetransmissionInterval * backoff;
            RetryPolicyType rmrp = null != manager.getSourcePolicy()
                ? manager.getSourcePolicy().getRetryPolicy() : null;
            maxRetries = null != rmrp ? rmrp.getMaxRetries() : -1;
           
            AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false, true);
            AttributedURIType to = null;
            if (null != maps) {
                to = maps.getTo();
            }
            if (to != null
                && RMUtils.getAddressingConstants().getAnonymousURI().equals(to.getValue())) {
                LOG.log(Level.INFO, "Cannot resend to anonymous target.  Not scheduling a resend.");
                return;
View Full Code Here

    }
   
    @Test
    public void testStoreMAPs() {
        Message msg = control.createMock(Message.class);
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        EasyMock.expect(msg.put(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND, maps)).andReturn(null);
        control.replay();
        RMContextUtils.storeMAPs(maps, msg, true, true);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.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.