Package org.apache.cxf.ws.addressing

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


        }
       
        // add Acknowledgements (to application messages or explicitly created Acknowledgement messages only)
        boolean isAck = constants.getSequenceAckAction().equals(action);
        if (isApplicationMessage || isAck) {
            AttributedURIType to = maps.getTo();
            assert null != to;
            addAcknowledgements(destination, rmpsOut, inSeqId, to);
            if (isPartialResponse && rmpsOut.getAcks() != null && rmpsOut.getAcks().size() > 0) {
                setAction(maps, constants.getSequenceAckAction());
                msg.remove(Message.EMPTY_PARTIAL_RESPONSE_MESSAGE);
View Full Code Here


        }
        return FaultMode.CHECKED_APPLICATION_FAULT != mode;
    }

    private static void setAction(AddressingProperties maps, String action) {
        AttributedURIType actionURI = new AttributedURIType();
        actionURI.setValue(action);
        maps.setAction(actionURI);
    }
View Full Code Here

        control.reset();
        EasyMock.expect(message.getExchange()).andReturn(exchange).anyTimes();
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        EasyMock.expect(maps.getNamespaceURI()).andReturn(Names200408.WSA_NAMESPACE_NAME).anyTimes();
        EasyMock.expect(message.get(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND)).andReturn(maps);
        AttributedURIType actionURI = control.createMock(AttributedURIType.class);
        EasyMock.expect(maps.getAction()).andReturn(actionURI).times(2);
        EasyMock.expect(actionURI.getValue()).andReturn("foo");
        EasyMock.expect(message.get(RMMessageConstants.RM_PROPERTIES_INBOUND)).andReturn(rmps);
        EasyMock.expect(exchange.getDestination()).andReturn(destination).anyTimes();
        EasyMock.expect(exchange.getOutMessage()).andReturn(null).anyTimes();
        EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes();
View Full Code Here

        EasyMock.expect(message.get(Message.REQUESTOR_ROLE)).andReturn(!serverSide);
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        EasyMock.expect(maps.getNamespaceURI()).andReturn(Names200408.WSA_NAMESPACE_NAME).anyTimes();
        EasyMock.expect(message.get(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND)).andReturn(maps);
       
        AttributedURIType actionURI = control.createMock(AttributedURIType.class);
        EasyMock.expect(maps.getAction()).andReturn(actionURI).times(2);
        EasyMock.expect(actionURI.getValue()).andReturn(action);
       
        EasyMock.expect(message.get(RMMessageConstants.ORIGINAL_REQUESTOR_ROLE)).andReturn(Boolean.FALSE);
        EasyMock.expect(message.put(Message.REQUESTOR_ROLE, Boolean.FALSE)).andReturn(null);
       
        org.apache.cxf.transport.Destination td =
View Full Code Here

        }
        private void updateOutputAction(String append) {
            AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(),
                                                               false, false);
            AddressingProperties pout = new AddressingProperties();
            AttributedURIType action = new AttributedURIType();
            action.setValue(p.getAction().getValue() + append);
            pout.exposeAs(p.getNamespaceURI());
            pout.setAction(action);
            ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true);

        }
View Full Code Here

        Identifier inSid = control.createMock(Identifier.class);       
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(null);
        AttributedURIType uri = control.createMock(AttributedURIType.class);
        EasyMock.expect(maps.getTo()).andReturn(uri);
        EasyMock.expect(uri.getValue()).andReturn("http://localhost:9001/TestPort");
        EndpointReferenceType epr = RMUtils.createNoneReference();
        EasyMock.expect(maps.getReplyTo()).andReturn(epr);
        RMEndpoint rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(source.getReliableEndpoint()).andReturn(rme).times(2);
        Proxy proxy = control.createMock(Proxy.class);
View Full Code Here

        control.verify();
    }

    private AddressingProperties createMAPs(String action, String to, String replyTo) {
        AddressingProperties maps = new AddressingProperties();
        AttributedURIType actionuri =  new AttributedURIType();
        actionuri.setValue(action);
        maps.setAction(actionuri);
        maps.setTo(RMUtils.createReference(to));
        EndpointReferenceType epr = RMUtils.createReference(replyTo);
        maps.setReplyTo(epr);
        return maps;
View Full Code Here

     * Get the address from the provided endpoint reference.
     * @param ref - the endpoint reference
     * @return String the address of the endpoint
     */
    public static String getAddress(EndpointReferenceType ref) {
        AttributedURIType a = ref.getAddress();
       
        if (null != a) {
            return a.getValue();
        }
        // should wsdl be parsed for an address now?
        return null;
    }
View Full Code Here

     * Set the address of the provided endpoint reference.
     * @param ref - the endpoint reference
     * @param address - the address
     */
    public static void setAddress(EndpointReferenceType ref, String address) {
        AttributedURIType a = WSA_OBJECT_FACTORY.createAttributedURIType();
        a.setValue(address);
        ref.setAddress(a);
    }
View Full Code Here

    @Test
    public void testAcknowledgeNotSupported() throws RMException {
        DestinationSequence ds = control.createMock(DestinationSequence.class);
        EndpointReferenceType acksToEPR = control.createMock(EndpointReferenceType.class);
        EasyMock.expect(ds.getAcksTo()).andReturn(acksToEPR).anyTimes();
        AttributedURIType acksToURI = control.createMock(AttributedURIType.class);
        EasyMock.expect(acksToEPR.getAddress()).andReturn(acksToURI).anyTimes();
        String acksToAddress = Names.WSA_ANONYMOUS_ADDRESS;
        EasyMock.expect(acksToURI.getValue()).andReturn(acksToAddress).anyTimes();
        control.replay();
        Proxy proxy = new Proxy(rme);
        proxy.acknowledge(ds);       
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.addressing.AttributedURIType

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.