This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes Is there a size limit on sending data over a soap call Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Is there a size limit on sending data over a soap call" Watch "Is there a size limit on sending data over a soap call" New topic
Author

Is there a size limit on sending data over a soap call

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 521
I have a web service which I send files to, when I send a file of 5m or more, I get a javax.xml.soap.SOAPFaultException. I am deploying my webservice with Weblogic 8.1.

Monitoring the Client and Server memory usage, I notice that the Client JVM Memory heap spikes when the client serialises the java into XML, and then the Server JVM spikes when it attempts to serialises the XML back into Java.

Thanks for any help

Tony
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
Which specific error does the SOAP fault encapsulate?
[ June 06, 2006: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 521
Hi Ulf it returns 500 error code (Internal Server Error). Looking at the net it seems that it is better to pass files as attachments rather than in the message body.

Since I am passing a array of string, I will have to use a DataHandler.

Is it a case of in the calling client program, I transfer the Array of String into a DataSource, wrap it in a DataHandler, pass the DataHandler as a parameter and in the server extract the datahandler and the datasource.

I think in Weblogic if they see a parameter as a DataHandler it is treated automaticaly as a attachment and I do not have to add anything to the servicegen.

Thanks for any help

Tony
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
Looking at the net it seems that it is better to pass files as attachments rather than in the message body.

Absolutely correct. Text in the message body will be parsed as XML, taking much more time and memory.
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a size limit on sending data over a soap call
 
Similar Threads
how would you keep the single instance of an object over multiple JVMs
Help needed to understand JConsole output and JVM settings
Must I create new file when client invoke soap method?
Axis2 generating diff. java files in Jdk 1.5 and Jdk 1.6
Deigning the MultiServer Environment