Need some help, i am trying to attach a file in a JAXRPC client using a
swaRef. However, only the swaRef gets set in the SOAP message
but no attachment is set. Here is the snippet of the code:
"...
String imageName = "duke.jpg";
java.awt.Image newPhoto = getImage(imageName);
AttachmentPart att =
MessageFactory.newInstance().createMessage().createAttachmentPart();
att.setContentId("<" + imageName + ">");
att.setContent(newPhoto,"image/jpeg");
ArrayList list = new ArrayList();
list.add(att);
stub._setProperty(StubPropertyConstants.SET_ATTACHMENT_PROPERTY,
list);
java.net.URI uriName = new java.net.URI("cid:" + imageName);
String resultResponse = stub.submitActionXF(uriName);
..."
AM i missing something here, since there is no message context to deal in
the clients, i have
set the "SET_ATTACHMENT_PROPERTY" and added the Collection of attachments
in the setProperty method.
Anything else ...
Thanks,
Mohit