Hi
I am trying to send a DIME attachment from .Net Client(C#) to Java(Axis Web Service).
I am getting the following error message:
"An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
"An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: java.lang.NullPointerException"
Could you tell me what could be the reason for this.
I have attached below all the necessary information:
===========================================================
.Net Code is as follows:
//Create a proxy class for the web service
//Convert the file to a Memory Stream
FileInfo fi = new FileInfo(FileName);
FileStream fs = fi.OpenRead();
byte [] bytes = new byte[fs.Length];
int numRead = fs.Read(bytes, 0, (int)fs.Length);
fs.Close();
MemoryStream ms = new MemoryStream(bytes);
//Create and Add the Attachment to the SOAPContext
DimeAttachment dimeAttach = new DimeAttachment("text/plain",TypeFormat.MediaType,ms);
ws.RequestSoapContext.Attachments.Add(dimeAttach);
//Call the Web service method
===========================================================
===========================================================
The TCPMONITOR exceptions is as follows:
.NET CODE SNIPPET
===========================================================
JAVA WEB SERVICE CODE:
JAVA WEB SERVICE CODE:
My java web service code is as follows:
// Getting the messageContext instance
MessageContext messageContext = MessageContext.getCurrentContext();
Message msg = messageContext.getRequestMessage();
Attachments attachments = msg.getAttachmentsImpl();
===========================================================
My WSDL as follows:
MessageContext messageContext = MessageContext.getCurrentContext();
Message msg = messageContext.getRequestMessage();
Attachments attachments = msg.getAttachmentsImpl();
===========================================================
My WSDL as follows:
===========================================================
Could you please throw some light on this?
Replies
Know the answer? Post it — somebody with the same question will find it here.