File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Axis 1.4 Problem with DIME attachment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis 1.4 Problem with DIME attachment" Watch "Axis 1.4 Problem with DIME attachment" New topic

Axis 1.4 Problem with DIME attachment

Surbjeeet Dutta

Joined: Jul 28, 2011
Posts: 1
Dear Firiends,

I am facing a strange issue with my Java web service client. My findings are; whenever I send attachment more than 1 MB it give 400 Bad request (HTTP) error, small attachmets are working fine. The web service here i am using is .NET based and using a .NET client am able to attach more than 1 MB, but not from my Java client. Below is the snippet of the code to send attachment using Axis 1.4
This issue is coming production so i need to fix it urgently, looking forward for some useful information Thank

public java.lang.String hellowWorld(List files,java.lang.String nocxml) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
org.apache.axis.client.Call _call = createCall();
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setOperationName(new javax.xml.namespace.QName("", "hellowWorld"));
DataSource ds = null;
DataHandler dh = null;
if(files != null && files.size() > 0){

Iterator itrFiles = files.iterator();
int _i = 0;
File fileObj = (File);
ds = null;
dh = null;
File f =(File)files.get(_i);
System.out.print("file is there -----------------------");
ds = new FileDataSource(fileObj);
dh = new DataHandler(ds);
org.apache.axis.attachments.AttachmentPart ap = new org.apache.axis.attachments.AttachmentPart(dh);

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

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



Below is the error i am getting

faultCode: {}HTTP
faultString: (400)Bad Request
{}:return code: 400


(400)Bad Request
at org.apache.axis.transport.http.HTTPSender.readFromSocket(
at org.apache.axis.transport.http.HTTPSender.invoke(
at org.apache.axis.strategies.InvocationStrategy.visit(
at org.apache.axis.SimpleChain.doVisiting(
at org.apache.axis.SimpleChain.invoke(
at org.apache.axis.client.AxisClient.invoke(
at org.apache.axis.client.Call.invokeEngine(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(

Nimishaa Garg

Joined: Oct 19, 2011
Posts: 7
Hi Surbjeeet Dutta
were you able to find the resolution for this issue .
I am also getting the same error

rg.apache.axis.Message setup InvocationTargetException:
java.lang.reflect.InvocationTargetExceptionCaused by: DIME version received "7" greater than current supported
version "1".
at org.apache.axis.AxisFault.makeFault(
at org.apache.axis.attachments.AttachmentsImpl.<init>(
... 14 more
Caused by: DIME version received "7" greater than current supported version "1".
at org.apache.axis.attachments.DimeDelimitedInputStream.readHeader(
at org.apache.axis.attachments.DimeDelimitedInputStream.<init>(
at org.apache.axis.attachments.MultiPartDimeInputStream.<init>(
at org.apache.axis.attachments.AttachmentsImpl.<init>(

Plesae let me knwo If any 1 has idea about this issue
I agree. Here's the link:
subject: Axis 1.4 Problem with DIME attachment
It's not a secret anymore!