3 Replies Latest reply: May 13, 2013 4:14 AM by gimbal2 RSS

    Massive payload coming as a JAXWS SOAP response

    800839
      Hi,

      I am working on JAXWS webservice which creates a SOAP request and response. There are cases the response which I get from a JAXWS is pretty heavy with a huge payload and it is taking lot of time to get the response where I am getting SocketTimeoutException quite regularly. Is there any possibility where we can improve the performance of the JAXWS by sending a payload data (response) in small chunks in an iterative manner rather than sending all of them at once? More over we are using the JAXB unmarshaller to parse the SOAP response that also takes lot of time? Could you please suggest how to resolve thgese problems? Whether REST WS helps in this scenario or is there any other alternative steps we can take it to make sure everything functions properly? Please clarify.

      Thanks.
        • 1. Re: Massive payload coming as a JAXWS SOAP response
          gimbal2
          You shouldn't get a socket timeout when there is lots of data, the data transfer represents activity. Are you sure it isn't the result of an unstable connection or some odd server setting which closes connections after being open for X minutes? If that is the case I would try to solve that, an unstable runtime environment is nearly impossible to support through clever coding. Imagine switching to a chunking strategy, you'd run into the problem where for example of 3 chunks only one of them fails so you are left with partially complete data only. The problem becomes more difficult to manage, not easier.
          • 2. Re: Massive payload coming as a JAXWS SOAP response
            800839
            What about using SAAJ API and send the heavy payload as an attachment by zipping it and then use the build in DOM parser to parse it? Whether that works?
            • 3. Re: Massive payload coming as a JAXWS SOAP response
              gimbal2
              I am not going to respond to you completely ignoring what I'm saying. If you want to find a work around in stead of looking for the source of your problem then fine - you're on your own. So try it!