Hi i have some problem to add an attachment with cxf:
*I have generate the cxf client:*
/org.apache.cxf.jaxws.JaxWsProxyFactoryBean proxyFactory = new
JaxWsProxyFactoryBean();
proxyFactory.setServiceClass(ProtPT.class);
proxyFactory.setAddress("http://xxxxxxx/services/xxxxxxxxxxxxx");
Map<String,Object> props = new HashMap<String, Object>();
props.put("mtom-enabled", Boolean.TRUE);
props.put("schema-validation-enabled", Boolean.FALSE);
proxyFactory.setProperties(props);
client = (ProtPT) proxyFactory.create();/
*now i would like to add an attachment; something like this:*
File file = new File(DOC);
FileDataSource ds = new FileDataSource(file);
List<Attachment> attachments = new ArrayList<Attachment>();
InternetHeaders headers = new InternetHeaders();
headers.addHeader("Content-Type", "application/pdf");
headers.addHeader("Content-ID", "doc.pdf");
headers.addHeader("Content-Transfer-Encoding", "base64");
headers.addHeader("Content-Disposition", "123456789034567834567");
*now how can add this attachment to the request?*
(the wsdl I use has no xsd:base64Binary element).
With axis I now that I can use the attachmentPart but how does it work with
cxf??
thanks
--
View this message in context:
http://cxf.547215.n5.nabble.com/add-attachment-to-a-cxf-client-tp4773822p4773822.html
Sent from the cxf-user mailing list archive at Nabble.com.