Package org.apache.cxf.ws.addressing

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


        return (ContextUtils.isRequestor(message) && ContextUtils.isOutbound(message))
               || (!ContextUtils.isRequestor(message) && !ContextUtils.isOutbound(message));    
    }

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


               && Names.WSA_ANONYMOUS_ADDRESS.equals(maps.getTo().getValue());
    }
   
    private boolean isIncomingPartialResponse(SoapMessage message)
        throws SOAPException {
        AddressingProperties maps =
            (AddressingProperties)message.get(CLIENT_ADDRESSING_PROPERTIES_INBOUND);
        return !ContextUtils.isOutbound(message)
               && ContextUtils.isRequestor(message)
               && maps != null
               && Names.WSA_ANONYMOUS_ADDRESS.equals(maps.getTo().getValue());
    }
View Full Code Here

        }
    }
   
    public void testExplicitMAPsAddressTo() throws Exception {
        AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
        AddressingProperties maps = builder.newAddressingProperties();
        AttributedURIType to = new AttributedURIType();
        String delimiter = "/";
        String ns = "http://apache.org/hello_world_soap_http";
        String serviceName = "SOAPServiceWSSecurity";
        String endpointName = "TimestampSignEncrypt";
       
        to.setValue(ns + delimiter + serviceName + delimiter + endpointName + delimiter + JbiConstants.JBI_SUFFIX);
        EndpointReferenceType toRef = new EndpointReferenceType();
        toRef.setAddress(to);
        maps.setTo(toRef);
        //associate MAPs with request context
        Map<String, Object> requestContext =
            ((BindingProvider)greeter).getRequestContext();
        requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
        String greeting = greeter.greetMe("explicitly set to invoke antoher endpoint in another service");
View Full Code Here

    }
   
    public void testExplicitMAPs() throws Exception {
        try {
            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
            AddressingProperties maps = builder.newAddressingProperties();
            AttributedURIType action = new AttributedURIType();
            String delimiter = "/";
            String ns = "http://apache.org/hello_world_soap_http";
            String interfaceName = "Greeter";
            String operationName = "greetMeSometime";
            action.setValue(ns + delimiter + interfaceName + delimiter + operationName + delimiter + JbiConstants.JBI_SUFFIX);
            maps.setAction(action);
            //associate MAPs with request context
            Map<String, Object> requestContext =
                ((BindingProvider)greeter).getRequestContext();
            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
            String greeting = greeter.greetMe("explicitly set ot invoke greetMeSomeTime");
View Full Code Here

    }

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

        super(Phase.PREPARE_SEND);
        addBefore(MessageSenderInterceptor.class.getName());
    }

    public void handleMessage(Message message) throws Fault {
        AddressingProperties maps =
            RMContextUtils.retrieveMAPs(message, false, true);
        RMContextUtils.ensureExposedVersion(maps);
        String action = null;
        if (maps != null && null != maps.getAction()) {
            action = maps.getAction().getValue();
        }
        if (RMContextUtils.isRMProtocolMessage(action)) {
            return;
        }
        if (MessageUtils.isPartialResponse(message)) {
View Full Code Here

    }

    public void handleMessage(Message message) throws Fault {
        String action = (String)message.get(SoapBindingConstants.SOAP_ACTION);
        if (action == null) {
            AddressingProperties inProps = (AddressingProperties)message
                .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND);
            if (inProps != null && inProps.getAction() != null) {
                action = inProps.getAction().getValue();
            }
        }
        if ("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get".equals(action)
            || "http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request".equals(action)) {
            message.remove(AssertionInfoMap.class.getName());
View Full Code Here

        EasyMock.expect(exchange.getInMessage()).andReturn(null).anyTimes();
        EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes();
        Conduit conduit = control.createMock(Conduit.class);
        EasyMock.expect(exchange.getConduit(message)).andReturn(conduit).anyTimes();
        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);
        EasyMock.expect(rme.getProxy()).andReturn(proxy);
        CreateSequenceResponseType createResponse = control.createMock(CreateSequenceResponseType.class);
View Full Code Here

    private void serverResend(Message message) throws RMException {
       
        // get the message's to address
       
        AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false, true);
        AttributedURIType to = null;
        if (null != maps) {
            to = maps.getTo();
        }
        if (null == to) {
            LOG.log(Level.SEVERE, "NO_ADDRESS_FOR_RESEND_MSG");
            return;
        }
View Full Code Here

     */
    private AddressingProperties getMAPs(Message message,
                                             boolean isProviderContext,
                                             boolean isOutbound) {

        AddressingProperties maps = null;
        maps = ContextUtils.retrieveMAPs(message,
                                         isProviderContext,
                                         isOutbound);
        LOG.log(Level.FINE, "MAPs retrieved from message {0}", maps);

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.