Hi All,
I'm trying to add Attachment in a wsdl2java generated implementation
class.
The code is
public String execute() throws java.rmi.RemoteException
{
DataHandler dh = null;
try
{
dh = new DataHandler(new FileDataSource(fileName));
}
catch (Exception e)
{
System.out.println(e);
}
//Is this piece of code OK or do I need to set something
else.
org.apache.axis.Message resmessage =
MessageContext.getCurrentContext().getResponseMessage();
resmessage.addAttachmentPart(resmessage.createAttachmentPart(dh));
return "Test Response Message";
}
On the client side I get null pointer exception in the AXIS code.
This message is confidential and may also be legally privileged. If you are not
the intended recipient, please notify [EMAIL PROTECTED] immediately. You should
not copy it or use it for any purpose, nor disclose its contents to any other
person. The views and opinions expressed in this e-mail message are the
author's own and may not reflect the views and opinions of ADP.