Examples of AegisElementProvider


Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

        getBookAegis(endpointAddress, type, null);
    }
   
    private void getBookAegis(String endpointAddress, String type, String mHeader) throws Exception {
        WebClient client = WebClient.create(endpointAddress,
            Collections.singletonList(new AegisElementProvider()));
        if (mHeader != null) {
            client = client.header("X-HTTP-Method-Override", mHeader);
        }
        Book book = client.accept(type).get(Book.class);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

        getBookAegis(endpointAddress, type, null);
    }
   
    private void getBookAegis(String endpointAddress, String type, String mHeader) throws Exception {
        WebClient client = WebClient.create(endpointAddress,
            Collections.singletonList(new AegisElementProvider()));
        if (mHeader != null) {
            client = client.header("X-HTTP-Method-Override", mHeader);
        }
        Book book = client.accept(type).get(Book.class);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

   
    @Test
    public void testGetBookAegis() throws Exception {
        WebClient client = WebClient.create("http://localhost:"
                                            + PORT + "/databinding/aegis/bookstore/books/123",
                                            Collections.singletonList(new AegisElementProvider()));
        Book book = client.accept("application/xml").get(Book.class);
        assertEquals(123L, book.getId());
        assertEquals("CXF in Action", book.getName());
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

        getBookAegis(endpointAddress, type, null);
    }
   
    private void getBookAegis(String endpointAddress, String type, String mHeader) throws Exception {
        WebClient client = WebClient.create(endpointAddress,
            Collections.singletonList(new AegisElementProvider()));
        if (mHeader != null) {
            client = client.header("X-HTTP-Method-Override", mHeader);
        }
        Book book = client.accept(type).get(Book.class);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

        getBookAegis(endpointAddress, type, null);
    }
   
    private void getBookAegis(String endpointAddress, String type, String mHeader) throws Exception {
        WebClient client = WebClient.create(endpointAddress,
            Collections.singletonList(new AegisElementProvider()));
        if (mHeader != null) {
            client = client.header("X-HTTP-Method-Override", mHeader);
        }
        Book book = client.accept(type).get(Book.class);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

        assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
  }
 
  public void testServiceProviders() {
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_PROP_KEY, new Object[]{new AegisElementProvider()});
        props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(null, null, sd);
        assertEquals(1, providers.size());
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

    bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
    EasyMock.expectLastCall().andReturn(new ServiceReference[]{sref});
    sref.getProperty(Constants.RS_PROVIDER_EXPECTED_PROP_KEY);
    EasyMock.expectLastCall().andReturn(false);
    bc.getService(sref);
    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc, sref);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
       
        List<Object> providers = JaxRSUtils.getProviders(bc, null, sd);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

    bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
    EasyMock.expectLastCall().andReturn(new ServiceReference[]{sref});
    sref.getProperty(Constants.RS_PROVIDER_PROP_KEY);
    EasyMock.expectLastCall().andReturn(false);
    bc.getService(sref);
    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc);
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

    bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
    EasyMock.expectLastCall().andReturn(new ServiceReference[]{sref});
    sref.getProperty(Constants.RS_PROVIDER_PROP_KEY);
    EasyMock.expectLastCall().andReturn(true);
    bc.getService(sref);
    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc, sref);
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.AegisElementProvider

                                      BundleContext dswBC,
                                      ServiceEndpointDescription sd) {
   
    List<Object> providers = new ArrayList<Object>();
    if ("aegis".equals(sd.getProperty(org.apache.cxf.dosgi.dsw.Constants.RS_DATABINDING_PROP_KEY))) {
          providers.add(new AegisElementProvider());
        }
        Object serviceProviders =
          sd.getProperty(org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_PROP_KEY);
        if (serviceProviders != null) {
          if (serviceProviders.getClass().isArray()) {
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.