Package org.apache.cxf.interceptor.transform

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


        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>();

        // If Book2 didn't have {http://www.example.org/books}Book
        // then we'd just do '"*" : "{http://www.example.org/books}*'
        // but given that we have TheBook being returned, we need
        map.put("TheBook", "{http://www.example.org/books}Book");
        map.put("id", "{http://www.example.org/books}id");
        in.setInTransformElements(map);
       
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(in);
        WebClient.getConfig(client).getOutInterceptors().add(out);
        Book2 book = client.accept("text/xml").post(new Book2(), Book2.class);
View Full Code Here


        // 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
        // qualified such that only the top-level getBookResponse is processed because of '*'.
        // Such a mapping would work nicely if we had say a package-info making both
        // Book id & name qualified; otherwise we need to choose what tag we need to qualify
       
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // works too if the schema validation is disabled
       
        mapIn.put("getBookResponse", "{http://jaxws.jaxrs.systest.cxf.apache.org/}getBookResponse");
        in.setInTransformElements(mapIn);
       
        Client cl = ClientProxy.getClient(store);
        ((HTTPConduit)cl.getConduit()).getClient().setReceiveTimeout(10000000);
        cl.getInInterceptors().add(in);
        cl.getOutInterceptors().add(out);
View Full Code Here

        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>();

        // If Book2 didn't have {http://www.example.org/books}Book
        // then we'd just do '"*" : "{http://www.example.org/books}*'
        // but given that we have TheBook being returned, we need
        map.put("TheBook", "{http://www.example.org/books}Book");
        map.put("id", "{http://www.example.org/books}id");
        in.setInTransformElements(map);
       
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(in);
        WebClient.getConfig(client).getOutInterceptors().add(out);
        Book2 book = client.accept("text/xml").post(new Book2(), Book2.class);
View Full Code Here

        // 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
        // qualified such that only the top-level getBookResponse is processed because of '*'.
        // Such a mapping would work nicely if we had say a package-info making both
        // Book id & name qualified; otherwise we need to choose what tag we need to qualify
       
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // works too if the schema validation is disabled
       
        mapIn.put("getBookResponse", "{http://jaxws.jaxrs.systest.cxf.apache.org/}getBookResponse");
        in.setInTransformElements(mapIn);
       
        Client cl = ClientProxy.getClient(store);
        ((HTTPConduit)cl.getConduit()).getClient().setReceiveTimeout(10000000);
        cl.getInInterceptors().add(in);
        cl.getOutInterceptors().add(out);
View Full Code Here

        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>();

        // If Book2 didn't have {http://www.example.org/books}Book
        // then we'd just do '"*" : "{http://www.example.org/books}*'
        // but given that we have TheBook being returned, we need
        map.put("TheBook", "{http://www.example.org/books}Book");
        map.put("id", "{http://www.example.org/books}id");
        in.setInTransformElements(map);
       
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(in);
        WebClient.getConfig(client).getOutInterceptors().add(out);
        Book2 book = client.accept("text/xml").post(new Book2(), Book2.class);
View Full Code Here

        // 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
        // qualified such that only the top-level getBookResponse is processed because of '*'.
        // Such a mapping would work nicely if we had say a package-info making both
        // Book id & name qualified; otherwise we need to choose what tag we need to qualify
       
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // works too if the schema validation is disabled
       
        mapIn.put("getBookResponse", "{http://jaxws.jaxrs.systest.cxf.apache.org/}getBookResponse");
        in.setInTransformElements(mapIn);
       
        Client cl = ClientProxy.getClient(store);
        ((HTTPConduit)cl.getConduit()).getClient().setReceiveTimeout(10000000);
        cl.getInInterceptors().add(in);
        cl.getOutInterceptors().add(out);
View Full Code Here

        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>();

        // If Book2 didn't have {http://www.example.org/books}Book
        // then we'd just do '"*" : "{http://www.example.org/books}*'
        // but given that we have TheBook being returned, we need
        map.put("TheBook", "{http://www.example.org/books}Book");
        map.put("id", "{http://www.example.org/books}id");
        in.setInTransformElements(map);
       
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(in);
        WebClient.getConfig(client).getOutInterceptors().add(out);
        Book2 book = client.accept("text/xml").post(new Book2(), Book2.class);
View Full Code Here

        // 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
        // qualified such that only the top-level getBookResponse is processed because of '*'.
        // Such a mapping would work nicely if we had say a package-info making both
        // Book id & name qualified; otherwise we need to choose what tag we need to qualify
       
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // works too if the schema validation is disabled
       
        mapIn.put("getBookResponse", "{http://jaxws.jaxrs.systest.cxf.apache.org/}getBookResponse");
        in.setInTransformElements(mapIn);
       
        Client cl = ClientProxy.getClient(store);
        ((HTTPConduit)cl.getConduit()).getClient().setReceiveTimeout(10000000);
        cl.getInInterceptors().add(in);
        cl.getOutInterceptors().add(out);
View Full Code Here

        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>();

        // If Book2 didn't have {http://www.example.org/books}Book
        // then we'd just do '"*" : "{http://www.example.org/books}*'
        // but given that we have TheBook being returned, we need
        map.put("TheBook", "{http://www.example.org/books}Book");
        map.put("id", "{http://www.example.org/books}id");
        in.setInTransformElements(map);
       
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(in);
        WebClient.getConfig(client).getOutInterceptors().add(out);
        Book2 book = client.accept("text/xml").post(new Book2(), Book2.class);
View Full Code Here

        // 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
        // qualified such that only the top-level getBookResponse is processed because of '*'.
        // Such a mapping would work nicely if we had say a package-info making both
        // Book id & name qualified; otherwise we need to choose what tag we need to qualify
       
        // mapIn.put("*", "{http://jaxws.jaxrs.systest.cxf.apache.org/}*");
        // works too if the schema validation is disabled
       
        mapIn.put("getBookResponse", "{http://jaxws.jaxrs.systest.cxf.apache.org/}getBookResponse");
        in.setInTransformElements(mapIn);
       
        Client cl = ClientProxy.getClient(store);
        ((HTTPConduit)cl.getConduit()).getClient().setReceiveTimeout(10000000);
        cl.getInInterceptors().add(in);
        cl.getOutInterceptors().add(out);
View Full Code Here

TOP

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

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.