Package org.apache.cxf.factory_pattern

Examples of org.apache.cxf.factory_pattern.NumberFactory.create()


            fail("there should be a fault on val 999");
        } catch (Exception expected) {
            assertTrue("match on exception message", expected.getMessage().indexOf("999") != -1);
        }
       
        ref = factory.create("37");
        assertNotNull("reference", ref);
        num =  (Number)serviceImpl.getPort(ref, Number.class);
        assertTrue("37 is not even", !num.isEven().isEven());
    }
}
View Full Code Here


   
        NumberFactoryService service = new NumberFactoryService();
        NumberFactory nfact = service.getNumberFactoryPort();
        updateAddressPort(nfact, PORT);
       
        W3CEndpointReference w3cEpr = nfact.create("2");       
        assertNotNull("reference", w3cEpr);
       
        // use the epr info only
        // no wsdl so default generated soap/http binding will be used
        // address url must come from the calling context
View Full Code Here

       
        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()));
       
View Full Code Here

        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

        NumberFactoryService service = new NumberFactoryService();
        NumberFactory factory = service.getNumberFactoryPort();
        updateAddressPort(factory, PORT);

       
        W3CEndpointReference w3cEpr = factory.create("20");
        EndpointReferenceType numberTwoRef = ProviderImpl.convertToInternal(w3cEpr);
        assertNotNull("reference", numberTwoRef);
       
        // use getPort with epr api on service
        NumberService numService = new NumberService();
View Full Code Here

        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        Number num =  serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
        w3cEpr = factory.create("23");
        EndpointReferenceType numberTwentyThreeRef = ProviderImpl.convertToInternal(w3cEpr);
        num =  serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
    }
   
View Full Code Here

        updateAddressPort(factory, PORT);
       
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        W3CEndpointReference numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
View Full Code Here

        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        W3CEndpointReference numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
    }
   
    @Test
View Full Code Here

        updateAddressPort(factory, PORT);
       
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        W3CEndpointReference numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
View Full Code Here

        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        close(num);
       
        W3CEndpointReference numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
       
        close(num);
        close(factory);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.