Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.Endpoint


        //
        // Create a SAML2 Bearer Assertion and add it to the TokenStore so that the
        // IssuedTokenInterceptorProvider does not invoke on the STS
        //
        Client client = ClientProxy.getClient(transportSaml2Port);
        Endpoint ep = client.getEndpoint();
        String id = "1234";
        ep.getEndpointInfo().setProperty(TokenStore.class.getName(), new MemoryTokenStore());
        ep.getEndpointInfo().setProperty(SecurityConstants.TOKEN_ID, id);
        TokenStore store = (TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());

        SAMLParms samlParms = new SAMLParms();
        samlParms.setCallbackHandler(new Saml2CallbackHandler());
        AssertionWrapper assertion = new AssertionWrapper(samlParms);
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
View Full Code Here


        Message m = new MessageImpl();
        m.put(Message.CONTENT_TYPE, "text/xml");
        Exchange ex = new ExchangeImpl();
        ex.setInMessage(m);
        m.setExchange(ex);
        Endpoint e = EasyMock.createMock(Endpoint.class);
        e.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        e.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        e.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        e.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(2);
        e.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        EasyMock.replay(e);
        ex.put(Endpoint.class, e);
       
        MetadataMap<String, String> values = new MetadataMap<String, String>();
View Full Code Here

        Message m = new MessageImpl();
        m.put(Message.CONTENT_TYPE, "text/xml");
        Exchange ex = new ExchangeImpl();
        ex.setInMessage(m);
        m.setExchange(ex);
        Endpoint e = EasyMock.createMock(Endpoint.class);
        e.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        e.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        e.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        e.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(3);
        e.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        EasyMock.replay(e);
        ex.put(Endpoint.class, e);
       
        MetadataMap<String, String> values = new MetadataMap<String, String>();
View Full Code Here

        Message m = new MessageImpl();
        m.put(Message.CONTENT_TYPE, contentType);
        Exchange ex = new ExchangeImpl();
        ex.setInMessage(m);
        m.setExchange(ex);
        Endpoint e = EasyMock.createMock(Endpoint.class);
        e.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        e.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        e.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        e.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(2);
        e.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        EasyMock.replay(e);
        ex.put(Endpoint.class, e);
       
        MetadataMap<String, String> values = new MetadataMap<String, String>();
View Full Code Here

        Message m = new MessageImpl();
        m.put(Message.CONTENT_TYPE, contentType);
        Exchange ex = new ExchangeImpl();
        ex.setInMessage(m);
        m.setExchange(ex);
        Endpoint e = EasyMock.createMock(Endpoint.class);
        e.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        e.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        e.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        e.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(2);
        e.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        EasyMock.replay(e);
        ex.put(Endpoint.class, e);
       
        MetadataMap<String, String> values = new MetadataMap<String, String>();
View Full Code Here

        Message m = new MessageImpl();
        m.put(Message.CONTENT_TYPE, "text/xml");
        Exchange ex = new ExchangeImpl();
        ex.setInMessage(m);
        m.setExchange(ex);
        Endpoint e = EasyMock.createMock(Endpoint.class);
        e.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        e.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        e.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        e.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(ProviderFactory.getInstance()).times(3);
        e.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        EasyMock.replay(e);
        ex.put(Endpoint.class, e);
       
        MetadataMap<String, String> values = new MetadataMap<String, String>();
View Full Code Here

        Message m = new MessageImpl();
        m.put("org.apache.cxf.http.case_insensitive_queries", false);
        Exchange e = new ExchangeImpl();
        m.setExchange(e);
        e.setInMessage(m);
        Endpoint endpoint = EasyMock.createMock(Endpoint.class);
        endpoint.getEndpointInfo();
        EasyMock.expectLastCall().andReturn(null).anyTimes();
        endpoint.get("org.apache.cxf.jaxrs.comparator");
        EasyMock.expectLastCall().andReturn(null);
        endpoint.size();
        EasyMock.expectLastCall().andReturn(0).anyTimes();
        endpoint.isEmpty();
        EasyMock.expectLastCall().andReturn(true).anyTimes();
        endpoint.get(ProviderFactory.class.getName());
        EasyMock.expectLastCall().andReturn(factory).anyTimes();
        EasyMock.replay(endpoint);
        e.put(Endpoint.class, endpoint);
        return m;
    }
View Full Code Here

            message.setContent(List.class, params);
        }
    }

    private BindingOperationInfo findAnyOp(Exchange exchange) {
        Endpoint ep = exchange.get(Endpoint.class);
        BindingInfo service = ep.getEndpointInfo().getBinding();
       
        for (BindingOperationInfo b : service.getOperations()) {
            if (b.getInput() != null && !b.getInput().getMessageInfo().getMessageParts().isEmpty()) {
                MessagePartInfo inf = b.getInput().getMessageInfo().getMessagePart(0);
                if (XMLSchemaQNames.XSD_ANY.equals(inf.getTypeQName())) {
View Full Code Here

        }
       
        if (endpointReference != null) {
            ei.setAddress(endpointReference);
        }
        Endpoint ep = service.getEndpoints().get(ei.getName());
       
        if (ep == null) {
            ep = serviceFactory.createEndpoint(ei);
            ((EndpointImpl)ep).initializeActiveFeatures(getFeatures());
        } else {
            serviceFactory.setEndpointName(ei.getName());
            if (ep.getActiveFeatures() == null) {
                ((EndpointImpl)ep).initializeActiveFeatures(getFeatures());
            }
        }
       
        if (properties != null) {
            ep.putAll(properties);
        }
       
        service.getEndpoints().put(ep.getEndpointInfo().getName(), ep);
       
        if (getInInterceptors() != null) {
            ep.getInInterceptors().addAll(getInInterceptors());
            ep.getInInterceptors().add(WSDLGetInterceptor.INSTANCE);
        }
        if (getOutInterceptors() != null) {
            ep.getOutInterceptors().addAll(getOutInterceptors());
        }
        if (getInFaultInterceptors() != null) {
            ep.getInFaultInterceptors().addAll(getInFaultInterceptors());
        }
        if (getOutFaultInterceptors() != null) {
            ep.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
        }
        serviceFactory.sendEvent(FactoryBeanListener.Event.ENDPOINT_SELECTED, ei, ep,
                                 serviceFactory.getServiceClass(), getServiceClass());
        return ep;
    }
View Full Code Here

    public void handleMessage(Message message) throws Fault {
        Exchange ex = message.getExchange();
        Set<Endpoint> endpoints = CastUtils.cast((Set<?>)ex.get(MultipleEndpointObserver.ENDPOINTS));

        Endpoint ep = selectEndpoint(message, endpoints);

        if (ep == null) {
            return;
        }

        ex.put(Endpoint.class, ep);
        ex.put(Binding.class, ep.getBinding());
        ex.put(Service.class, ep.getService());

        InterceptorChain chain = message.getInterceptorChain();
        chain.add(ep.getInInterceptors());
        chain.add(ep.getBinding().getInInterceptors());
        chain.add(ep.getService().getInInterceptors());

        chain.setFaultObserver(ep.getOutFaultObserver());
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.endpoint.Endpoint

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.