• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Axis 1.4 Problem with DIME attachment

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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("http://tempuri.org/testService", "hellowWorld"));
DataSource ds = null;
DataHandler dh = null;
if(files != null && files.size() > 0){

Iterator itrFiles = files.iterator();
int _i = 0;
File fileObj = (File)itrFiles.next();
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://xml.apache.org/axis/}HTTP
faultString: (400)Bad Request
{}:return code: 400


(400)Bad Request
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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: java.io.IOException: DIME version received "7" greater than current supported
version "1".
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.attachments.AttachmentsImpl.<init>(AttachmentsImpl.java:149)
... 14 more
Caused by: java.io.IOException: DIME version received "7" greater than current supported version "1".
at org.apache.axis.attachments.DimeDelimitedInputStream.readHeader(DimeDelimitedInputStream.java:329)
at org.apache.axis.attachments.DimeDelimitedInputStream.<init>(DimeDelimitedInputStream.java:123)
at org.apache.axis.attachments.MultiPartDimeInputStream.<init>(MultiPartDimeInputStream.java:60)
at org.apache.axis.attachments.AttachmentsImpl.<init>(AttachmentsImpl.java:146)

Plesae let me knwo If any 1 has idea about this issue
    Bookmark Topic Watch Topic
  • New Topic