Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8275327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:02:46+00:00 2026-06-08T08:02:46+00:00

I have WS where in the SOAP payload there is a xsd:base64Binary element. Initially

  • 0

I have WS where in the SOAP payload there is a xsd:base64Binary element.

Initially this was designed for max 1MB but the requirement changed and now it should accept 50 MB uploaded files converted to base64 🙁 In java this becomes HUGE in terms of memory.

My theoretical solution is to stream from one end to the other these ‘attachments’
(files are uploaded from the web app, then converted to base64 and a web service is called to store in some Adobe app) – very inefficient i say

I read about Stax but that is not for WebServices.

Is there a way to use streaming in combination with Webservices ?

( MTOM ,but did not find a sample with streaming)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:02:47+00:00Added an answer on June 8, 2026 at 8:02 am

    I think you could do this with a custom servlet and overriding the post method.

    Read enough of the request’s InputStream through Stax to find the element containing the base64, then pipe it to some sort of Base64InputStream until you reach the end of the element. Use Stax or JaxB to transform an object into a response and send it back.

    Whatever you do, don’t buffer up the entire request. Don’t use a typical soap framework like CXF or JAXWS without thinking about how it handles buffering. You’re going to hit your garbage collector so hard it’ll panic, run away, never call you again.

    EDIT: Garbage collection

    If you’re running a 4gb heap, and assuming you’re using HotSpot, make sure you’re using the latest Java from Oracle (7u5). Next, switch to a collector that’s meant to handle large heaps: either g1gc (-XX:+UseG1GC) or CMS (-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode)

    In addition, consider adding the following:

    -XX:+OptimizeStringConcat -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseLargePages -XX:+UseStringCache -XX:+UseCompressedOops

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an SOAP response that looks similar to this: <?xml version=1.0 encoding=UTF-8?> <soapenv:Envelope
I have a soap request returning a response like below: <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
I have this SOAP request that I use in php to get some information,
I have a SOAP request of this form: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:myqname=http://example.com/hello xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance> <soapenv:Header/> <soapenv:Body>
I have soap webservice built with soaplib, but if client sent chunked request it
I have a SOAP response that I'm processing in Java. It has a element
I have a need to have SOAP web service on my rails app. (this
I have a SOAP response whose var_dump looks like this: object(stdClass)[14] public 'GetClientsResult' =>
I have some SOAP webservices build with JAX-RPC. These work fine. But as soon
I have soap serialized part of xml file like this, Now i want some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.