aspose file tools*
The moose likes Web Services and the fly likes soap payload max size and http post Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "soap payload max size and http post " Watch "soap payload max size and http post " New topic
Author

soap payload max size and http post

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
All,

I understand soap over http mode uses http post under the covers and I read http post has a max size of 2 mb data.
Does this mean the max size of a soap payload inline not considering MIME attachments is 2 mb.

I am currently evaluating a scenario where in we need to bundle a lot of xml data in the SOAP request payloads.

Let me know your thoughts.

Regards,
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
Embedding massive amounts of xml inside a SOAP body is a disaster for performance both on the server and client side. Reason being that the server has to build this huge DOM in memory and the client has to parse it.

(History of SOAP mode) One of the major objections SUN had to the original SOAP concept was in fact exactly that disaster. It wasn't until SOAP attachments SAAJ was defined that SUN got on the SOAP bandwagon (/History of SOAP mode)

Time for you to step back and rethink your architecture.

Bill


Java Resources at www.wbrogden.com
manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Thanks Bill.

So I can use SAAJ to pass a document containing xml payloads in the attachment (does not have to be Soap tagged but pure xml structure payload).
and then also construct the SOAP response to include a xml document based response as attachment using SAAJ.

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1164
William Brogden wrote: It wasn't until SOAP attachments SAAJ was defined that SUN got on the SOAP bandwagon

Thank you Bill - but how does SAAJ solve this issue?

Regards,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
The thing is - a SOAP message has to be completely parsed before it can be understood by either the server or the client - very time consuming.

The attached data with SAAJ does not have to be parsed at all, just handed on to wherever it is going.

See this Wikipedia article.

When SOAP was just getting started, I saw lots of developers totally shocked by how long it took for their service to run - turned out they were trying to send big messages as part of the SOAP body.

Bill
manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Sorry for my novice SAAJ questions but I did not get a clear understanding on the material available online for SAAJ. Most of them talk about how the client can attach a document using SAAJ but did not see specifics on how the server side Web service should process a SAAJ attachment to service a request.

In my case we already have a web service implementation in place. I understand there should not be any changes required to the signature of the current web service but a SAAJ attachment can be included seamlessly and on the server side have extra code to intercept and process the SAAJ attachment.

I would appreciate if someone could share pointers on the SAAJ server side processing part.


Thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: soap payload max size and http post
 
Similar Threads
XoH vs Soap Web Services
Total memory won't reduce after freeing memory allocated for String?
SOAP intermediaries
Can I use Web Services for synchronized communication?
Unable to create Axis 2 WEb services in Eclipse using Tomcat