This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes Maximum reqeust length exceeded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Maximum reqeust length exceeded" Watch "Maximum reqeust length exceeded" New topic
Author

Maximum reqeust length exceeded

Bonnie Kenison
Greenhorn

Joined: Jan 31, 2011
Posts: 7
My code is in Java. I am calling a 3rd party's webservice and getting an error that the size of the request is too large. I don't know if this error message is coming from my Java or from their software. Here is the stack trace:

javax.xml.ws.soap.SOAPFaultException: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.
at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)
at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:581)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:386)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:299)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy20.fileDocument(Unknown Source)

Am I safe in assuming that since once of the elements of the stack trace is "unbindResponseMessage", then the error message is being returned to me from their webservice? I just want to understand if I need to find a way to increase the request size on my side or on their side.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:299)


Seems to me that location just has to be on the client side so I don't think the request ever got sent.

Exactly where are you seeing this error message?

Bill

Bonnie Kenison
Greenhorn

Joined: Jan 31, 2011
Posts: 7
I am getting this exception when I try to invoke the method on the webservice:

FileIOSoap webService = proxy.getFileIOSoap();
FileDocumentResult fileDocResult = webService.fileDocument(userId, xmlOutputter.outputString(fileDocXML));


Where would the setting for the maximum request side reside on the client side?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
So how large is the file you are trying to send - fileDocXML?

If you are using the JBoss jaxws client tools, that documentation would appear to be the place to look for size limits and how to change them.

If this was my problem I would be using SOAPui or TCPMON to see what if any was actually being transmitted before the exception occurs.

Bill
Bonnie Kenison
Greenhorn

Joined: Jan 31, 2011
Posts: 7
I am sending a document that is approximately 4MB.

I have been looking for where to set this limit in the jboss jaxws, but I can't find anything. What I do find seems to reference .NET, which is making me question whether or not this exception is being sent from from their side.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
Well that is likely to be the source of your problem!

SOAP is a disaster for sending large data as part of the SOAP message because a SOAP message body has to be built as a DOM which takes huge memory and immense amounts of cpu time.

This problem was recognized early in the history of development of SOAP - thats why we have SAAJ. Soap API for Attachments in Java.

Any web service designed to take huge data files as part of a SOAP body is very poorly designed. If this was my problem I would check with the 3rd party service provider to see how huge data files are supposed to be handled.

Inherent problems like this are why RESTful services are so attractive.

Bill
 
GeeCON Prague 2014
 
subject: Maximum reqeust length exceeded