HP, LoadRunner, Performance Testing, Testing, TestPlant, Tools, Web Service Testing

Role of CDATA in Web Services Performance Testing

Recently in one of the web services performance testing project, I have faced one strange issue. Whenever I hit the service I have got the Internal Server Error response from the server. Protocol is SOAP over HTTP with no SOAP Action.

What I got from the development team is end point URL, sample request and response XML, and the operation name. In this article, you are going to learn how I solved Internal Server Error in web services performance testing.

Tool I used for smoke testing is JMeter, SOAP UI, CA LISA and HP LoadRunner. Initially I tried in all the above said tools as I was getting Internal Server error. Later I started analyzing further. I took the endpoint and added ?wsdl at the end to get WSDL file. I added the WSDL in CA LISA, it threw an error xsd is missing. Then I got the xsd and associated it. But still I was getting Internal Server Error.

Later I tried in JMeter, SOAP UI, and HP LoadRunner. But no luck. Later I started checking all the tags in request XML. In one of the tag says that <xmlinput></xminput>, inside that tag there were few tags. Basically I was passing an xml inside an xml in the wrong format. Hence the internal server error.

How to solve Internal Server Error?

If you are passing xml tags inside request xml, you need to add it under CDATA (Character Data) so that the contents inside CDATA will not parsed as xml. Basically the contents/tags inside CDATA section will be ignored as xml. If there is no CDATA section, then the xml inside xml will be parsed by the service and hence internal server error.







If CDATA section is not working as expected, then you can convert the tags into UTF-8 or US-ASCII using this online tool http://coderstoolbox.net/string/#!encoding=xml&action=encode&charset=us_ascii

Convert XML tags to UFT-8/US-ASCII
Convert XML tags to UFT-8/US-ASCII





Once the xml tags converted into UTF-8 or U-ASCII the service will give you valid response.


If you are getting Internal Server Error, do not contact developer or raise a defect, check the input XML and check if any xml inside xml and convert the input xml into UTF-8 or US-ASCII characters and feed it. Your service should work fine. If you have any alternate method, please put it in the comments sections.

PS: CA LISA has built-in capability to convert the xml tags to UTF-8/US-ASCII.

Once a week we send a digest with the most popular articles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

New Year. New Hope. Learn TruWeb. 78% OFF for Limited Time of my Udemy course..BUY NOW