Package org.apache.cxf.interceptor.transform

Examples of org.apache.cxf.interceptor.transform.TransformOutInterceptor


        BookSoapService service =
            new BookSoapService(new URL(wsdlAddress),
                                new QName("http://books.com", "BookService"));
        BookStoreJaxrsJaxws store = service.getBookPort();
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        Map<String, String> mapOut = new HashMap<String, String>();
        // Book content (id, name) is unqualified, thus the following works
        // because JAXB will report
        // - {http://jaxws.jaxrs.systest.cxf.apache.org/}Book
        // - id
        // - name
        // and only the qualified top-level Book tag gets matched by the following
        // mapping
        mapOut.put("{http://jaxws.jaxrs.systest.cxf.apache.org/}*", "*");
        out.setOutTransformElements(mapOut);
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> mapIn = new HashMap<String, String>();
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // won't work for a case where a totally unqualified getBookResponse needs to be
View Full Code Here


    public void testPostBookTransform() throws Exception {
          
        String address = "http://localhost:" + PORT
                         + "/test/v1/rest-transform/bookstore/books";
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        out.setOutTransformElements(
            Collections.singletonMap("{http://www.example.org/books}*",
                                     "{http://www.example.org/super-books}*"));
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> map = new HashMap<String, String>();
View Full Code Here

    public void testPostBookTransform() throws Exception {
          
        String address = "http://localhost:" + PORT
                         + "/test/v1/rest-transform/bookstore/books";
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        out.setOutTransformElements(
            Collections.singletonMap("{http://www.example.org/books}*",
                                     "{http://www.example.org/super-books}*"));
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> map = new HashMap<String, String>();
View Full Code Here

        BookSoapService service =
            new BookSoapService(new URL(wsdlAddress),
                                new QName("http://books.com", "BookService"));
        BookStoreJaxrsJaxws store = service.getBookPort();
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        Map<String, String> mapOut = new HashMap<String, String>();
        // Book content (id, name) is unqualified, thus the following works
        // because JAXB will report
        // - {http://jaxws.jaxrs.systest.cxf.apache.org/}Book
        // - id
        // - name
        // and only the qualified top-level Book tag gets matched by the following
        // mapping
        mapOut.put("{http://jaxws.jaxrs.systest.cxf.apache.org/}*", "*");
        out.setOutTransformElements(mapOut);
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> mapIn = new HashMap<String, String>();
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // won't work for a case where a totally unqualified getBookResponse needs to be
View Full Code Here

    public void testPostBookTransform() throws Exception {
          
        String address = "http://localhost:" + PORT
                         + "/test/v1/rest-transform/bookstore/books";
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        out.setOutTransformElements(
            Collections.singletonMap("{http://www.example.org/books}*",
                                     "{http://www.example.org/super-books}*"));
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> map = new HashMap<String, String>();
View Full Code Here

        BookSoapService service =
            new BookSoapService(new URL(wsdlAddress),
                                new QName("http://books.com", "BookService"));
        BookStoreJaxrsJaxws store = service.getBookPort();
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        Map<String, String> mapOut = new HashMap<String, String>();
        // Book content (id, name) is unqualified, thus the following works
        // because JAXB will report
        // - {http://jaxws.jaxrs.systest.cxf.apache.org/}Book
        // - id
        // - name
        // and only the qualified top-level Book tag gets matched by the following
        // mapping
        mapOut.put("{http://jaxws.jaxrs.systest.cxf.apache.org/}*", "*");
        out.setOutTransformElements(mapOut);
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> mapIn = new HashMap<String, String>();
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // won't work for a case where a totally unqualified getBookResponse needs to be
View Full Code Here

        if (!(map instanceof Map)) {
            return;
        }
        @SuppressWarnings("unchecked")
        Map<String, String> outTransformMap = (Map<String, String>) map;
           TransformOutInterceptor simpleOut = new TransformOutInterceptor();
           simpleOut.setOutTransformElements(outTransformMap);
           simpleOut.handleMessage(message);
    }
View Full Code Here

        Map<String, String> newToOldTransformMap =
            Collections.singletonMap("{http://customer/v2}*", "{http://customer/v1}*");
        Map<String, String> oldToNewTransformMap =
            Collections.singletonMap("{http://customer/v1}*", "{http://customer/v2}*");
       
        TransformOutInterceptor outTransform =  new TransformOutInterceptor();
        outTransform.setOutTransformElements(newClient ? newToOldTransformMap
                                              : oldToNewTransformMap);
       
        if (newClient) {
            outTransform.setOutDropElements(
                Collections.singletonList("{http://customer/v2}briefDescription"));   
        }
       
        TransformInInterceptor inTransform =  new TransformInInterceptor();
        inTransform.setInTransformElements(newClient ? oldToNewTransformMap
View Full Code Here

        Map<String, String> newToOldTransformMap = new HashMap<String, String>();
        newToOldTransformMap.put("{http://customer/v2}*", "{http://customer/v1}*");
        Map<String, String> oldToNewTransformMap =
            Collections.singletonMap("{http://customer/v1}*", "{http://customer/v2}*");
       
        TransformOutInterceptor outTransform =  new TransformOutInterceptor();
        outTransform.setOutTransformElements(newClient ? newToOldTransformMap
                                              : oldToNewTransformMap);
       
        if (newClient) {
            newToOldTransformMap.put("{http://customer/v2}briefDescription", "");
            //outTransform.setOutDropElements(
View Full Code Here

    public void testPostBookTransform() throws Exception {
          
        String address = "http://localhost:" + PORT
                         + "/test/v1/rest-transform/bookstore/books";
       
        TransformOutInterceptor out =  new TransformOutInterceptor();
        out.setOutTransformElements(
            Collections.singletonMap("{http://www.example.org/books}*",
                                     "{http://www.example.org/super-books}*"));
       
        TransformInInterceptor in =  new TransformInInterceptor();
        Map<String, String> map = new HashMap<String, String>();
View Full Code Here

TOP

Related Classes of org.apache.cxf.interceptor.transform.TransformOutInterceptor

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.