Differences between revisions 4 and 5
Revision 4 as of 2006-08-15 18:17:29
Size: 1651
Editor: BenJansen
Comment: Added note about "Resource has been deleted" error
Revision 5 as of 2009-09-20 22:47:35
Size: 1653
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
For this, download commons-http-client-3.0 and commons-codec 1.3 from the [http://jakarta.apache.org/commons jakarta site], add the jars to the client classpath, and modify the {{{client-config.wsdd}}} file to ensure that it uses the correct handler: For this, download commons-http-client-3.0 and commons-codec 1.3 from the [[http://jakarta.apache.org/commons|jakarta site]], add the jars to the client classpath, and modify the {{{client-config.wsdd}}} file to ensure that it uses the correct handler:

First Check

Ensure that mail.jar (Java Mail) and activation.jar (Java Activation Framework) are included in your Axis deployment. They are needed both on the server and client sides.

DIME attachment problems

The default client transport handler has problems sending and receiving attachments in DIME format. For large attachments (more than 1MB, or 8 chunks), an exception will be raised about corrupted stream data, or end of physical stream when more DIME chunks expected.

A workaround to this problem is to switch to the transport handler that uses commons-http-client.

For this, download commons-http-client-3.0 and commons-codec 1.3 from the jakarta site, add the jars to the client classpath, and modify the client-config.wsdd file to ensure that it uses the correct handler:

<deployment name="defaultClientConfig" ...>
  <transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
  ...
</deployment>

Disappearing Attachments (AKA java.io.IOException: Resource has been deleted.)

If you are getting a "Resource has been deleted" IOException when trying to access an attachment, make sure you have not told the request SOAPMessage to write out anywhere. For example:

// Build the SOAP message out of the HTTP request.
SOAPMessage request = getSoapRequest();
// Output message for debugging purposes or whatever.
request.writeTo( System.out );

If you later try to access one of the request's AttachmentParts and write out its contents, you'll get the "Resource has been deleted" exception.

FrontPage/Axis/AttachmentProblems (last edited 2009-09-20 22:47:35 by localhost)