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