problem in upload file with 3MB file to Webservice

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

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

posted Sep 18, 2009 03:57:47

0

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

posted Sep 18, 2009 04:00:52

0

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

posted Sep 18, 2009 04:26:32

0

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

posted Sep 18, 2009 04:30:14

0

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 ?