Announcement Announcement Module
No announcement yet.
WebServiceTemplate response very slow with a large string Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebServiceTemplate response very slow with a large string


    I'm using Spring-WS 1.5.4, using WebServiceGatewaySupport for a WS client app. I've had no issues getting lots of data around, except for this one case where the object being serialized just has one very big string in it. For some reason this is very slow getting out of line 554 (I put an arrow below) in ate:

                // if an interceptor has set a response, we don't send/receive
                if (!messageContext.hasResponse()) {
                    sendRequest(connection, messageContext.getRequest());
                    if (hasError(connection, messageContext.getRequest())) {
                        return handleError(connection, messageContext.getRequest());
                    WebServiceMessage response = connection.receive(getMessageFactory());
    ---->                messageContext.setResponse(response);
    I've hit the same call with simple WS client, and get the result very quickly, so it seems that dealing with this large String is causing something very ineffecient to happen. I'm also using Jaxb for marshalling, but I think that's downstream from this point. After getting past this line everything is quite fast.

    The soap message I'm sending accross is not huge, just shy of 600K (it's actually a set of search results in RSS format). It's taking about 1 1/2 minute to get past this line. With smaller payloads not as big an issue. But with bigger ones it seems to be exponentially slower.

    Tried to upload it, but even after zipping it I couldn't get it down below 97K (the limit on this board). I'm happy to email it if needed.

    I may need to deal with this one call at the XML level instead, but hoping there's a cleaner way.

  • #2
    Ok, I was using the SaajSoapMessageFactory message factory, which after some reading is not recommended for large messages because of it builds a whole DOM. Moved to AxiomSoapMessageFacotry and now have much better performance. Hopefully this will aid someone else in the same boat.