Tags

links:
http://en.wikipedia.org/wiki/SOAP_with_Attachments_API_for_Java
http://stackoverflow.com/questions/18911351/how-to-get-image-from-a-soap-web-service
http://stackoverflow.com/questions/20799487/how-can-i-parse-attachment-part-which-type-is-multipart-related-in-saaj-soap-m
http://java.boot.by/wsd-guide/ch02s04.html

summary:
– how saaj related to multipart? same?
– most soap implementations parse the whole message entirely, hence size matters
– 1 workaround is to send data as attachment meaning not part of the soap message
– or sending data simply binary in nature and nothing to do with soap protocol
– if indeed sending as part of soap, then commonly use base64 ecnoding

– code adding attachment
URL url = new URL(“http://foo.bar/img.jpg”);
DataHandler handler = new DataHandler(url);
AttachmentPart attachPart = message.createAttachmentPart(handler);
message.addAttachmentPart(attachPart);

Advertisements