Hello all,

I have setup a c++ webservice in which I obtain a WSDL and run it through WSDL2Java to generate the necessary stub files for dealing with DIME attachments. I have found that when I try
to receive the attachment back, at run time I get

"Error: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentPart"

with the line
"return (Data) _resp"  Data was my class that was created from the WSDL2Java

try {java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Double(a)});

       if (_resp instanceof java.rmi.RemoteException) {
           throw (java.rmi.RemoteException)_resp;
       }
       else {
           extractAttachments(_call);
           try {
               return (Data) _resp;
           } catch (java.lang.Exception _exception) {
return (Data) org.apache.axis.utils.JavaUtils.convert(_resp, Data.class);
           }
       }
 } catch (org.apache.axis.AxisFault axisFaultException) {
 throw axisFaultException;
}


I was curious to know if anyone else ever received this error?

I am using the Axis1.3F and the activation.jar and mail.jar from javamail version 1_4.
Perhaps someone can suggestion
another activation.jar that I should try with? I have tried with various versions of Axis so I am thinking it has something to do with the Attachment part of it. I have gotten to work by extracting the _resp by casting it to org.apache.axis.attachments.AttachmentPart and getting at the data that way, but I want
to understand why the generated code doesn't work at runtime.

I appreciate any feedback.

thanks

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to