File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes problem in upload file with 3MB file to Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem in upload file with 3MB file to Webservice " Watch "problem in upload file with 3MB file to Webservice " New topic
Author

problem in upload file with 3MB file to Webservice

Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
My code is calling webservice and passing file to that webservice.
When i tried to upload file with 2.5 MB then my code is working fine and if I tried to upload more than 3MB then it gives
I have not set any configuration for file size in my code

ERROR - javax.xml.ws.soap.SOAPFaultException: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.


SCJP2, SCWCD
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
This limit might be imposed by the Application Server you are using (either by a default value OR by a setting).

For eg, in Tomcat, in server.xml you can control this via maxPostSize attribute in Connector element (in the eg. below i have limited max post size to 4 MB).


Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
Thanks for your reply.

For testing purpose I have tried it from plain java class without placing it on any server.
now also it is giving same error to me.
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
Rakesh Jhamb wrote:

For testing purpose I have tried it from plain java class without placing it on any server.
now also it is giving same error to me.


The change has to be done at server end, not at client end, please read my previous mail again. Surely webservice is hosted on some Application Server - you need to change it there.
Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
Webservice is in .net and i have checked web config file there is no such setting in that.
if same webservice called from .net client then it is uploading more than 3 MB perfectly fine.

I am calling it though java program then it is giving error.
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
ERROR - javax.xml.ws.soap.SOAPFaultException: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded



Where is the source of this exception? i.e is it being returned by Web-Service (from .net server) OR, is it being thrown from within your own java code (in which case you can trace the source of it). What java client are you using to invoke the web-service something like Apache Axis2 ?
Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
I am not able to figure out from where this exception is coming.

I have used JAX-WS .
 
Don't get me started about those stupid light bulbs.
 
subject: problem in upload file with 3MB file to Webservice
 
Similar Threads
Websphere getting slow
ejb environment
Calling a JAR file from JSP or from a PHP page or another option?
sending pdf or any attachment from a java webservice to java client using JAX-WS and SAAJ
Not able to convert large sized byte array to String