Forum Discussion

noller20's avatar
noller20
New Contributor
11 years ago

Very large SOAP request

I'm testing out a service using a very large SOAP request.

I already have the XML of the SOAP request that I would like to use. The problem is that when I try to paste this XML into soapUI is that soapUI just stalls. It will eat all of one CPU core and never finish what it is doing.

I believe the problem is due to the size of the XML: soapUI will try to parse this large XML in order to pretty print it (or something) and this just doesn't work well. Nothing strange in that really. Many XML browsers are (for reasons unknown to me) unable to display XML large than a few hundred k's. The XML I'm using cannot be browsed by Firefox for example. (I've tried many XML browsers and you'll be surprised how many of them have problems with this: the one I've finally settled on is - surprisingly for me - Microsoft's XML Notepad).


The thing is : I do not need to look at the XML from within soapUI. I do not need soapUI to display to me the XML of the request.
I need a way to tell soapUI that for a particular named SOAP request it should load the XML to use for the request from a file and not try to interpret it nor parse it nor display it. Just fire it into the service when I ask it to.

And to make things worse: The XML that comes back (response) is also rather large, some 50 Mbytes of text. I would assume that if I solve the first problem (the request) then soapUI would probably stall on the reply as well. Again the same goes here: I do not need to physically inspect the returned XML. Anyway: let's tackle the large request problem first and then we can deal with the large reply problem later.

Can this be done? If not do you know of an alternative method of working with soapUI in the situation where the SOAP request is very large ?

Thx.

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Can you check java heap min and max size in the soapui.bat, and try increasing it?
  • noller20's avatar
    noller20
    New Contributor
    nmrao wrote:
    Can you check java heap min and max size in the soapui.bat, and try increasing it?


    Done that. It is not where the problem is. The problem is that soapUI will spend CPU cycles on trying to interpret the XML document and never finish this task.
  • nmrao's avatar
    nmrao
    Champion Level 3
    Ok. Having stuck with the current issue in the tool, and looking for any other way to proceed testing your service ? Note that you may have to handle setting endpoint, soapAction and if there is ws security etc on our own.

    You may use a java soap client, for details:
    http://harryjoy.com/2011/10/20/soap-client-in-java/
  • noller20's avatar
    noller20
    New Contributor
    Thanks for suggestion. I know how to write a custom Java client to fire my SOAP request into the Web Service. Heck, I could do that from a script.
    But that kind of invalidates the whole point of using soapUI, doesn't it ?
    I would like to integrate my "large test" together with all the other tests I have in soapUI. If I can only use soapUI for small requests and have to use another tool for large requests then it will probably be better for me not to use soapUI at all. That would be a shame. It is a really good tool.

    Let's recap:
    All I really want is to take some XML (headers and all) and fire it into the Web Service without soapUI freezing on me.

    My next test is to try and trick soapUI into doing what I want: soapUI saves project files in XML files (one big file per project) and inside that the contents of each request is defined in a CDATA enclosure. I'll try to use some kind of text editor to stick my XML in there, save the file and then try to load that project from within soapUI without opening the request itself so that soapUI doesn't have to display it in the editor .. which I'm sure would make it freeze.

    But am I really the only one that are trying to use soapUI for something other than the normal kiddy stuff, i.e. request of 20 bytes ("What is current weekday?") and response of 20 bytes ("Today is Monday") ?. Real world is somewhat more complex than that.
  • noller20's avatar
    noller20
    New Contributor
    Just wanted to report that I've had a fair amount of success with the method described in the last post.

    Here's what I did.

    (suppose project is named "MyProject")

    1. From within soapUI in MyProject I created a new Test Step inside my test. I named the new Test Step : "LargeRequest". The only thing I put inside the request was the text "BlaBlaBla". I then closed soapUI again.
    2. I then I copied soapUI project file from MyProject.xml to MyProject.txt. (I do this solely to avoid that my text editor, I use Notepad++, will try to interpret the file as XML, which it freezes on because of the size).
    3. I then use my favorite text editor, in this case Notepad ++, to open file MyProject.txt. I then find the text "BlaBlaBla" and on that spot in the file I insert the contents of my large XML request (which I have in a another file). The request needs to be in a CDATA enclosure:
    <![CDATA[your-custom-xml-here]]>
    I then save the file and rename it back to MyProject.xml.
    4. Now I open soapUI again. As it turns out I can actually open the Test Request "LargeRequest" in the soapUI editor without problems and I can put assertions on it.

    Bingo!

    If you don't use the above method then the only method to get XML into a request is to paste it from the clipboard. My guess is that it is at this point where soapUI freezes. Pasting into the editor was how I started out and that is what made soapUI freeze.

    I'm still struggling to get soapUI not to freeze when it receives the response. The response is roughly 50 Mbytes due to the verbosity of XML. It isn't really a lot of real data, it is just that XML is so incredible verbose. I'll let you know how I get along.
  • nmrao's avatar
    nmrao
    Champion Level 3
    What you said is a valid point. It does make sense to work with a single tool rather than following multiple approaches.