/** * Writes and reads the XOP attachment using a CXF JAX-RS Proxy * The proxy automatically sets the "mtom-enabled" property by checking * the CXF EndpointProperty set on the XopAttachment interface. * * @throws Exception */ public void useXopAttachmentServiceWithProxy() throws Exception { final String serviceURI = "http://localhost:" + port + "/services/attachments"; XopAttachmentService proxy = JAXRSClientFactory.create(serviceURI, XopAttachmentService.class); XopBean xop = createXopBean(); System.out.println(); System.out.println("Posting a XOP attachment with a proxy"); XopBean xopResponse = proxy.echoXopAttachment(xop); verifyXopResponse(xop, xopResponse); }
client.type("multipart/related").accept("multipart/related"); XopBean xop = createXopBean();