You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Fabien Grellier <fa...@laposte.net> on 2002/10/28 14:44:04 UTC

Attachments sample

Hi all,

I have a problem excuting and modyfing the attachment sample, given with
axis.
I First installed it, and worked properly.
Then, in order to better understand the code, I tried to modify my sources,
compiled, and put my .class in the right directory.
I start/stop resin, and when I try to test the attachment sample, I get an
500 Internal server error.

To make my application work, I have to delete te webapp axis, and to copy it
again. Then, my sample work, with my code.
So each time I modify the sources and copy them into the destination
directory, i get a 500 internal error.

I use Resin 2.1.4, with jdk 1.3. Do you have any idea of what is the problem
? Did anyone already had this problem ?

I have a second problem. I am trying to open my attachment on the server
part.
So, I have the following code :
    public DataHandler echo( DataHandler dh) throws
java.io.IOException,javax.xml.soap.SOAPException {
        System.err.println("In echo");
        else System.err.println("Received
\""+dh.getContent().getClass().getName()+"\".");
}

The class which is shown by dh.getClass() is :
"org.apache.axis.attachments.ManagedMemoryDataSource$Instream".

What is that ? I cannot get anythong in the documentation about this
$instream, and when trying to cast it to ManagedMemoryDataSource, I get a
ClassCast Exception....

How can I get the content of my dataHandler ??

Thank you by advance,

Fab