Package org.apache.cxf.jaxrs.provider.json

Examples of org.apache.cxf.jaxrs.provider.json.JSONProvider


                nstojns.put("urn:uddi-org:policy_v3", "urn:uddi-org:policy_v3");
                nstojns.put("urn:uddi-org:policy_instanceParms_v3", "urn:uddi-org:policy_instanceParms_v3");
                nstojns.put("http://www.w3.org/2000/09/xmldsig#", "http://www.w3.org/2000/09/xmldsig#");

                properties.put("namespaceMap", nstojns);
                JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
                jsonProvider.setNamespaceMap(nstojns);

                providers.add(jsonProvider);
                instance = JAXRSClientFactory.create(ENDPOINT_ADDRESS, UDDIInquiryJAXRS.class, providers);
        }
View Full Code Here


                nstojns.put("urn:uddi-org:policy_v3", "urn:uddi-org:policy_v3");
                nstojns.put("urn:uddi-org:policy_instanceParms_v3", "urn:uddi-org:policy_instanceParms_v3");
                nstojns.put("http://www.w3.org/2000/09/xmldsig#", "http://www.w3.org/2000/09/xmldsig#");

                properties.put("namespaceMap", nstojns);
                JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
                jsonProvider.setNamespaceMap(nstojns);

                providers.add(jsonProvider);
                sf.setProviders(providers);

                sf.setResourceProvider(UDDIInquiryJAXRS.class,
View Full Code Here

    public Set<Object> getSingletons() {
        Set<Object> singletons = new HashSet<Object>();
        singletons.add(new XopAttachmentServiceImpl());
        singletons.add(new MultipartsServiceImpl());
       
        JSONProvider provider = new JSONProvider();
        // equivalent to provider.setIgnoreNamespaces(true);
        provider.setOutTransformElements(
                Collections.singletonMap("{http://books}Book", "Book"));
       
        provider.setInTransformElements(
            Collections.singletonMap("Book", "{http://books}Book"));
       
        singletons.add(provider);
       
        return singletons;
View Full Code Here

    public void useAttachmentServiceWithWebClient() throws Exception {

        final String serviceURI = "http://localhost:" + port + "/services/attachments/multipart";
       
       
        JSONProvider provider = new JSONProvider();
        provider.setIgnoreNamespaces(true);
        provider.setInTransformElements(
            Collections.singletonMap("Book", "{http://books}Book"));
       
        WebClient client = WebClient.create(serviceURI,
                                     Collections.singletonList(provider));
       
View Full Code Here

    public void useAttachmentServiceWithProxy() throws Exception {

        final String serviceURI = "http://localhost:" + port + "/services/attachments";
       
       
        JSONProvider provider = new JSONProvider();
        provider.setIgnoreNamespaces(true);
        provider.setInTransformElements(
            Collections.singletonMap("Book", "{http://books}Book"));
       
        MultipartsService client = JAXRSClientFactory.create(serviceURI,
                                     MultipartsService.class,                                   
                                     Collections.singletonList(provider));
View Full Code Here

        final JAXBElementProvider jaxb = new JAXBElementProvider();
        final Map<String, Object> jaxbProperties = new HashMap<String, Object> ();
        jaxbProperties.put(Marshaller.JAXB_FRAGMENT, true);
        jaxb.setMarshallerProperties(jaxbProperties);

        final JSONProvider json = new JSONProvider();
        // TOMEE-514
        // json.setSerializeAsArray(true);

        return Arrays.asList((Object) jaxb, json);
    }
View Full Code Here

        final JAXBElementProvider jaxb = new JAXBElementProvider();
        final Map<String, Object> jaxbProperties = new HashMap<String, Object> ();
        jaxbProperties.put(Marshaller.JAXB_FRAGMENT, true);
        jaxb.setMarshallerProperties(jaxbProperties);

        final JSONProvider json = new JSONProvider();
        // TOMEE-514
        // json.setSerializeAsArray(true);

        return Arrays.asList((Object) jaxb, json);
    }
View Full Code Here

        final JAXBElementProvider jaxb = new JAXBElementProvider();
        final Map<String, Object> jaxbProperties = new HashMap<String, Object> ();
        jaxbProperties.put(Marshaller.JAXB_FRAGMENT, true);
        jaxb.setMarshallerProperties(jaxbProperties);

        final JSONProvider json = new JSONProvider();
        json.setSerializeAsArray(true);

        return Arrays.asList((Object) jaxb, json);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Set<Object> getSingletons() {

        JSONProvider provider = new JSONProvider();
        provider.setSerializeAsArray(true);
        provider.setConvention("badgerfish");

        Set<Object> singletons = new HashSet<Object>();
        singletons.add(new StockServiceResource());
        singletons.add(provider);
        return singletons;
View Full Code Here

        final JAXBElementProvider jaxb = new JAXBElementProvider();
        final Map<String, Object> jaxbProperties = new HashMap<String, Object> ();
        jaxbProperties.put(Marshaller.JAXB_FRAGMENT, true);
        jaxb.setMarshallerProperties(jaxbProperties);

        final JSONProvider json = new JSONProvider();
        // TOMEE-514
        // json.setSerializeAsArray(true);

        return Arrays.asList((Object) jaxb, json);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.provider.json.JSONProvider

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.