Package org.apache.cxf.jaxrs

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl


    @Test
    public void testWadlQuery() {
        Message m = mockMessage("http://localhost:8080/bar", "/bar", "_wadl", "GET");
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(TestResource.class, TestResource.class, true, true);
        m.getExchange().put(Service.class, new JAXRSServiceImpl(Collections.singletonList(cri)));
        RequestPreprocessor sqh = new RequestPreprocessor();
        sqh.preprocess(m, new UriInfoImpl(m, null));
        Response r = m.getExchange().get(Response.class);
        assertNotNull(r);
        assertEquals(MediaType.APPLICATION_XML,
View Full Code Here


   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) throws Exception {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
        epr.setAddress(baseAddress);
View Full Code Here

    }
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) throws Exception {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
        epr.setAddress(baseAddress);
View Full Code Here

    }
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                ClassResourceInfo cri) throws Exception {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(Collections.singletonList(cri)));
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
        epr.setAddress(baseAddress);
View Full Code Here

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
       
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
View Full Code Here

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
       
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
View Full Code Here

     * Creates a WebClient instance
     * @return WebClient instance
     */
    public WebClient createWebClient() {
       
        Service service = new JAXRSServiceImpl(getAddress(), getServiceName());
        getServiceFactory().setService(service);
       
        try {
            Endpoint ep = createEndpoint();
            ClientState actualState = getActualState();
View Full Code Here

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) throws Exception {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
        epr.setAddress(baseAddress);
View Full Code Here

     * Creates a WebClient instance
     * @return WebClient instance
     */
    public WebClient createWebClient() {
       
        Service service = new JAXRSServiceImpl(getAddress(), getServiceName());
        getServiceFactory().setService(service);
       
        try {
            Endpoint ep = createEndpoint();
            ClientState actualState = getActualState();
View Full Code Here

    @Test
    public void testWadlQuery() {
        Message m = mockMessage("http://localhost:8080/bar", "/bar", "_wadl", "GET");
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(TestResource.class, TestResource.class, true, true);
        m.getExchange().put(Service.class, new JAXRSServiceImpl(Collections.singletonList(cri)));
        RequestPreprocessor sqh = new RequestPreprocessor();
        sqh.preprocess(m, new UriInfoImpl(m, null));
        Response r = m.getExchange().get(Response.class);
        assertNotNull(r);
        assertEquals(WadlGenerator.WADL_TYPE.toString(),
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.JAXRSServiceImpl

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.