Ask a Question

ReadyAPI - inserting entire xml body in to SOAP post

New Contributor

ReadyAPI - inserting entire xml body in to SOAP post



I've just started using SOAP UI / ReadyAPI and have a question.


I've written an excel app to help me generate lots of different test xmls for a project (it current produces 90 different types)


These xml can then be submitted manually to a test website.  I have a wsdl avialable to submit the xml via a post...


However to use post, I need a standard header/Footer for each file (that are not requried for the manual load).


What I'm struggling with, is how do I insert the entire xml file in to the body of the post, so it looks like



Contents of file



I can get it work if Insert the header and footer directly in to the xml files and then just parse the directory, but I would rather not update the xml file each time to include the header and footer as it then stops them working via the manul load.


I know it must be something simple, but I've spent hours on this and keep going round in circles 😞


thanks in advance,


Community Hero

Hi @Dofus01 


Do I understand correctly - you have a spreadsheet that generates various schema valid and (maybe) some invalid XML instances and you publish these to a web service but for some tests you want to add a header and footer into them....?  


Is that correct?


Quick question - you have a .wsdl - right - so it's SOAP - so - if the spreadsheet generates the XML's rather than you having a bunch of XML files in a directory somewhere (picking them up with the Datasource step) how are you passing these XML's to your SOAP Request steps in your tests?


Do your SOAP request steps include the SOAP envelope?

OR do the XMLs you generate include the SOAP envelope?


What is the header and footer? I wouldn't expect anything to go into the request external to the SOAP envelope


I just want to make sure I understand your issues before before going off on a tangent and providing a possible answer to a question you haven't actually asked! (I get easily confused! ;))


At first I read your post like you had a request and you needed to insert some weird header and footer into the XML request - but I'm changing my mind as I sit here - when you refer to a header and footer - are you actually talking about the SOAP envelope and your XML instance populates the <SOAPBody> container tag (and the parent tag of your XML instance is defined by the <operation name> tag in your .wsdl.


So - I've totally changed my mind on what you;re looking for - so if you could come back and clarify - that would be great!








if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
New Contributor

Hi Rich,


Thanks for the reply, it's much appreciated.  After a good nights sleep I managed to work out I was being a berk and was missing the obvious.


I'll post what I was missing tomorrow, when i'm back home and can get on my laptop.




SmartBear Alumni (Retired)

Hi all,


Thank you for the reply, @richie.


@Dofus01, so what was the thing you were missing? Smiley Happy

Olga Terentieva
SmartBear Assistant Community Manager

Showing results for 
Search instead for 
Did you mean: