Package org.apache.cxf.factory_pattern

Examples of org.apache.cxf.factory_pattern.IsEvenResponse


        numService.addPort(portName, SoapBindingFactory.SOAP_11_BINDING, "http://foo");
        Number num = numService.getPort(portName, Number.class);

        setupContextWithEprAddress(epr, num);
       
        IsEvenResponse numResp = num.isEven();
        assertTrue("2 is even", Boolean.TRUE.equals(numResp.isEven()));

        // try again with the address from another epr
        w3cEpr = nfact.create("3");
        epr = ProviderImpl.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("3 is not even", Boolean.FALSE.equals(numResp.isEven()));
       
        // try again with the address from another epr
        w3cEpr = nfact.create("6");
        epr = ProviderImpl.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("6 is even", Boolean.TRUE.equals(numResp.isEven()));
    }
View Full Code Here


        InvocationHandler handler  = Proxy.getInvocationHandler(num);
        BindingProvider bp = (BindingProvider)handler;   
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "103");
           
        IsEvenResponse numResp = num.isEven();
        assertTrue("103 is not even", Boolean.FALSE.equals(numResp.isEven()));
    }
View Full Code Here

       
        return id;
    }

    private IsEvenResponse genResponse(boolean v) {
        IsEvenResponse resp = new ObjectFactory().createIsEvenResponse();
        resp.setEven(v);
        return resp;
    }
View Full Code Here

        numService.addPort(portName, SoapBindingFactory.SOAP_11_BINDING, "http://foo");
        Number num = (Number)numService.getPort(portName, Number.class);

        setupContextWithEprAddress(epr, num);
       
        IsEvenResponse numResp = num.isEven();
        assertTrue("2 is even", Boolean.TRUE.equals(numResp.isEven()));

        // try again with the address from another epr
        w3cEpr = nfact.create("3");
        epr = VersionTransformer.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("3 is not even", Boolean.FALSE.equals(numResp.isEven()));
       
        // try again with the address from another epr
        w3cEpr = nfact.create("6");
        epr = VersionTransformer.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("6 is even", Boolean.TRUE.equals(numResp.isEven()));
    }
View Full Code Here

        InvocationHandler handler  = Proxy.getInvocationHandler(num);
        BindingProvider bp = (BindingProvider)handler;   
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "103");
           
        IsEvenResponse numResp = num.isEven();
        assertTrue("103 is not even", Boolean.FALSE.equals(numResp.isEven()));
    }
View Full Code Here

        QName portName = new QName(serviceName.getNamespaceURI(), portString);               
        Number num =  (Number)numService.getPort(portName, Number.class);

        setupContextWithEprAddress(epr, num);
       
        IsEvenResponse numResp = num.isEven();
        assertTrue("2 is even", Boolean.TRUE.equals(numResp.isEven()));

        // try again with the address from another epr
        epr = nfact.create("3");
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("3 is not even", Boolean.FALSE.equals(numResp.isEven()));
       
        // try again with the address from another epr
        epr = nfact.create("6");
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("6 is even", Boolean.TRUE.equals(numResp.isEven()));
    }
View Full Code Here

        InvocationHandler handler  = Proxy.getInvocationHandler(num);
        BindingProvider bp = (BindingProvider)handler;   
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   NumberFactoryImpl.NUMBER_SERVANT_ADDRESS_ROOT + "103");
           
        IsEvenResponse numResp = num.isEven();
        assertTrue("103 is not even", Boolean.FALSE.equals(numResp.isEven()));
    }
View Full Code Here

       
        return id;
    }

    private IsEvenResponse genResponse(boolean v) {
        IsEvenResponse resp = new ObjectFactory().createIsEvenResponse();
        resp.setEven(v);
        return resp;
    }
View Full Code Here

        numService.addPort(portName, SoapBindingFactory.SOAP_11_BINDING, "http://foo");
        Number num = numService.getPort(portName, Number.class);

        setupContextWithEprAddress(epr, num);
       
        IsEvenResponse numResp = num.isEven();
        assertTrue("2 is even", Boolean.TRUE.equals(numResp.isEven()));

        // try again with the address from another epr
        w3cEpr = nfact.create("3");
        epr = ProviderImpl.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("3 is not even", Boolean.FALSE.equals(numResp.isEven()));
       
        // try again with the address from another epr
        w3cEpr = nfact.create("6");
        epr = ProviderImpl.convertToInternal(w3cEpr);
        setupContextWithEprAddress(epr, num);
        numResp = num.isEven();
        assertTrue("6 is even", Boolean.TRUE.equals(numResp.isEven()));
    }
View Full Code Here

        InvocationHandler handler  = Proxy.getInvocationHandler(num);
        BindingProvider bp = (BindingProvider)handler;   
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   NUMBER_SERVANT_ADDRESS_ROOT + "103");
           
        IsEvenResponse numResp = num.isEven();
        assertTrue("103 is not even", Boolean.FALSE.equals(numResp.isEven()));
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.factory_pattern.IsEvenResponse

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.