Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.URIMappingInterceptor


    @Test
    public void testGetAddFromPath() throws Exception {
        message.put(Message.FIXED_PARAMETER_ORDER, Boolean.TRUE);
        message.put(Message.PATH_INFO, "/CalculatorService/SoapPort/add/arg0/1/arg1/0");
       
        URIMappingInterceptor interceptor = new URIMappingInterceptor();
        interceptor.handleMessage(message);
       
        assertNull(message.getContent(Exception.class));
       
        assertion();       
    }
View Full Code Here


    public void testGetAddFromQuery() throws Exception {
        message.put(Message.FIXED_PARAMETER_ORDER, Boolean.TRUE);
        message.put(Message.PATH_INFO, "/CalculatorService/SoapPort/add");
        message.put(Message.QUERY_STRING, "arg0=1&arg1=0");
       
        URIMappingInterceptor interceptor = new URIMappingInterceptor();
        interceptor.handleMessage(message);
       
        assertNull(message.getContent(Exception.class));
        assertion();
    }
View Full Code Here

    @Test
    public void testGetAddFromQueryOrdered() throws Exception {
        message.put(Message.PATH_INFO, "/CalculatorService/SoapPort/add");
        message.put(Message.QUERY_STRING, "arg1=0&arg0=1");
       
        URIMappingInterceptor interceptor = new URIMappingInterceptor();
        interceptor.handleMessage(message);
       
        assertNull(message.getContent(Exception.class));
        assertion();
    }
View Full Code Here

   
    @Test
    public void testGetAddFromPathOrdered() throws Exception {
        message.put(Message.PATH_INFO, "/CalculatorService/SoapPort/add/arg1/0/arg0/1");
       
        URIMappingInterceptor interceptor = new URIMappingInterceptor();
        interceptor.handleMessage(message);
       
        assertNull(message.getContent(Exception.class));
        assertion();
    }   
View Full Code Here

    protected void run() {
        Object implementor = new GreeterImpl();
        String address = "http://localhost:" + REG_PORT + "/XMLService/XMLPort";
        eps.add(Endpoint.publish(address, implementor));
       
        ((EndpointImpl)eps.get(0)).getService().getInInterceptors().add(new URIMappingInterceptor());

        Object implementor1 = new org.apache.hello_world_xml_http.wrapped.GreeterImpl();
        address = "http://localhost:" + WRAP_PORT + "/XMLService/XMLPort";
        eps.add(Endpoint.publish(address, implementor1));
View Full Code Here

    @Test
    public void testGetAddFromQueryOrderedFault() throws Exception {       
        message.put(Message.PATH_INFO, "/CalculatorService/SoapPort/add");
        message.put(Message.QUERY_STRING, "one=1&two=2");
       
        URIMappingInterceptor interceptor = new URIMappingInterceptor();
        try {
            interceptor.handleMessage(message);
        } catch (Exception e) {
            assertTrue(e instanceof Fault);
            assertEquals("Parameter should be ordered in the following sequence: [arg0, arg1]",
                         e.getMessage());
        }
View Full Code Here

        //endpoints.add(Endpoint.publish(DOCLIT_CODEFIRST_URL, implementor4));
       
        Object implementor7 = new DocLitBareCodeFirstServiceImpl();
        EndpointImpl ep = (EndpointImpl)Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
        ep.getServer().getEndpoint().getInInterceptors().add(new SAAJInInterceptor());
        ep.getServer().getEndpoint().getInInterceptors().add(new URIMappingInterceptor());
        endpoints.add(ep);

       
        Object implementor6 = new InterfaceInheritTestImpl();
        endpoints.add(Endpoint.publish(DOCLIT_CODEFIRST_BASE_URL, implementor6));
View Full Code Here

    public Binding createBinding(BindingInfo binding) {
        XMLBinding xb = new XMLBinding(binding);
       
        xb.getInInterceptors().add(new AttachmentInInterceptor());   
        xb.getInInterceptors().add(new StaxInInterceptor());
        xb.getInInterceptors().add(new URIMappingInterceptor());
        xb.getInInterceptors().add(new DocLiteralInInterceptor());
        xb.getInInterceptors().add(new XMLMessageInInterceptor());
       
        xb.getOutInterceptors().add(new AttachmentOutInterceptor());
        xb.getOutInterceptors().add(new StaxOutInterceptor());
View Full Code Here

            sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

            // REVISIT: The phase interceptor chain seems to freak out if this added
            // first. Not sure what the deal is at the moment, I suspect the
            // ordering algorithm needs to be improved
            sb.getInInterceptors().add(new URIMappingInterceptor());
        }

        if (version.getVersion() == 1.1) {
            sb.getInFaultInterceptors().add(new Soap11FaultInInterceptor());
            sb.getOutFaultInterceptors().add(new Soap11FaultOutInterceptor());
View Full Code Here

            sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

            // REVISIT: The phase interceptor chain seems to freak out if this added
            // first. Not sure what the deal is at the moment, I suspect the
            // ordering algorithm needs to be improved
            sb.getInInterceptors().add(new URIMappingInterceptor());
        }

        if (version.getVersion() == 1.1) {
            sb.getInFaultInterceptors().add(new Soap11FaultInInterceptor());
            sb.getOutFaultInterceptors().add(new Soap11FaultOutInterceptor());
View Full Code Here

TOP

Related Classes of org.apache.cxf.interceptor.URIMappingInterceptor

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.