Announcement Announcement Module
Collapse
No announcement yet.
Problem with Long Responses Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Long Responses

    I've authored a WS Client utilizing WebServiceTemplate. I'm currently have trouble and it only occurs when the web service response long.

    So I do something like this....
    Code:
      public void simpleSendAndRecieve() throws IOException {
         final String message = "my xml is normally here";
         StreamSource source = new StreamSource(new StringReader(message));
         StreamResult result = new StreamResult(System.out);
         webServiceTemplate.sendAndReceive(source,result);
      }
    Looking at the stack trace...

    When the StAXSOAPModelBuilder.createOMElement() attempts to run I get a
    ERROR: '[was class java.io.IOException] Attempted read on closed stream.'

    I set logging to all...and I can see that the entire message comes accross the wire before the connection is closed. The only thing I notice is that for these longer responses were the problem occurrs, the response is broken up a bit.

    i.e.
    Code:
    Wire.wire() << "0"
    Wire.wire() << "f"
    Wire.wire() << "e"
    Wire.wire() << "8"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Wire.wire() << "A HUGE CHUNK OF THE RESPONSE XML"
    Wire.wire() << "MORE OF THE SAME RESPONSE"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Wire.wire() << "0"
    Wire.wire() << "7"
    Wire.wire() << "8"
    Wire.wire() << "e"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Wire.wire() << "MORE OF THE SAME RESPONSE"
    Wire.wire() << "MORE OF THE SAME RESPONSE that finally finishes here"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Wire.wire() << "0"
    Wire.wire() << "0"
    Wire.wire() << "0"
    Wire.wire() << "0"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Wire.wire() << "[\r]"
    Wire.wire() << "[\n]"
    Your help is greatly appreciated. I'm currently using M3.

    Andrew

  • #2
    Arjen,

    Is this related to the SWS-150 issue that was closed in SpringWS 1.0?

    Thank you,

    Andrew

    Comment


    • #3
      Upgrading to Spring Web Services 1.0.1 resolved the issue.

      Comment

      Working...
      X