Context

I have a SOAP web service which is served by a JBOSS EAP instance and is called via a SOAP UI client.

In the result returned by this web service there may be an XML string returned like this by the web service:

enter image description here

The same string will be rendered as follows in the SOAP UI client:

enter image description here

As you can observe, during the transport of this message some characters (specifically <) have been encoded to &lt;: this is normal, as the encoder wants to avoid that the string gets interpreted as markup when it's just an output to be returned as is.

Problem

What we have observed is that when the string is too long, the encoding goes just wrong. I've tried to analyze and understand and this is all I can get:

  • Towards the end of the string, some < characters are left as such and are not converted into &lt;
  • Very weirdly, an XML tag that is normally formed on server side:

    <calculationPeriod>
        ...some stuff
    </calculationPeriod>
    

    ... has its second c converted into < and that clearly breaks completely the XML:

    <cal<ulationPeriod>
        ...some stuff
    </calculationPeriod> 
    

My question

Honestly, I have no idea how to debug this issue furtherly. All I can notice is that:

  • When inside the web service (stack that I control), the response is normally formed and encoded in XML using the open tag <.
  • Once out in the SOAP UI client (all across the stack there are generic JBOSS calls and RMI invocations), the message gets corrupted like this.

It is important to remark that this only happens when the string is particularly long. I have one output with length 8192 characters (before encoding) that goes fine, while the other output having length 9567 characters (before encoding) goes wrong and is the subject of this question.

Apologises :)

I'm sorry not to be able to provide a reproductible use case, as well as to use a title which means nothing and everything in the question. I'm open to provide any additional information for those who may help and to rephrase the question once I get a clearer picture of what the problem is. I've of course looked a lot on the web but I can't find anything similar, probably I don't search with the right keywords.

0 Answers