Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in upload file with 3MB file to Webservice

 
Rakesh Jhamb
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to figure out from where this exception is coming.

I have used JAX-WS .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic