Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8281935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:12:17+00:00 2026-06-08T10:12:17+00:00

Apologies for posting a smiliar question to my earlier one Using Groovy Script in

  • 0

Apologies for posting a smiliar question to my earlier one Using Groovy Script in sopaUI – Copy the content of a XML Holder to Another (Trying to CLONE the SOAP request Test Step)

In my earlier question, I just realised that I had missed out mentioning my concern about CDATA …which I think could have mislead in others understadning what my actual concern was. my bad!!

reiterating wat I had done.

SoapRequest (Original)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:idm="http://vedaxml.com/vxml2/idmatrix-v2-0.xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <idm:request>
         <idm:dataset-searches>
            <idm:profile-name></idm:profile-name>
         </idm:dataset-searches>
         <idm:individual-name>
            <idm:family-name>ABC</idm:family-name>
            <idm:first-given-name>DEF</idm:first-given-name>
         </idm:individual-name>
         <idm:date-of-birth>1985-12-12</idm:date-of-birth>
      </idm:request>
   </soapenv:Body>
</soapenv:Envelope>

My Groovy Script is as below

def grUtils = new com.eviware.soapui.support.GroovyUtils(context)
def ReqHolder2 = grUtils.getXmlHolder("Modified#Request")

ReqHolder2.removeDomNodes("//idm:request")
ReqHolder2.updateProperty()

ReqHolder2 ["//soapenv:Body"] = context.expand( '${Original#Request#//idm:request}' )
ReqHolder2.updateProperty()

When I execute the above groovy script, the Modified request is updated with the content from the Original request but the updated content is within the CDATA and reference to the schema.

SoapRequest (Modified)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:idm="http://vedaxml.com/vxml2/idmatrix-v2-0.xsd">
   <soapenv:Header/>
   <soapenv:Body>***<![CDATA[<idm:request xmlns:idm="http://vedaxml.com/vxml2/idmatrix-v2-0.xsd">***
         <idm:dataset-searches>
            <idm:profile-name/>
         </idm:dataset-searches>
         <idm:individual-name>
            <idm:family-name>ABC</idm:family-name>
            <idm:first-given-name>DEF</idm:first-given-name>
         </idm:individual-name>
         <idm:date-of-birth>1985-12-12</idm:date-of-birth>
      </idm:request>**]]>**</soapenv:Body>
</soapenv:Envelope>

Could you please suggest how could I avoid updating the XML within CDATA. Rather update the XML properly. Kindly advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:12:19+00:00Added an answer on June 8, 2026 at 10:12 am

    Change your Modified Request to:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"   xmlns:idm="http://vedaxml.com/vxml2/idmatrix-v2-0.xsd">
       <soapenv:Header/>
       <soapenv:Body>${test123}</soapenv:Body>
    </soapenv:Envelope>
    

    And change your groovy to:

    def grUtils = new com.eviware.soapui.support.GroovyUtils(context)
    def ReqHolder2 = grUtils.getXmlHolder(context.expand( '${Original#Request#//idm:request}' ))
    context.setProperty("test123", ReqHolder2.getXml())
    
    testRunner.runTestStepByName( "Modified")
    
    log.info(grUtils.getXmlHolder(context.expand( '${Modified#Request}')).getPrettyXml())
    

    If you copy and paste the log into a text editor you will see:

    Wed Jul 25 13:11:20 MDT 2012:INFO:<soapenv:Envelope     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:idm="http://vedaxml.com/vxml2/idmatrix-v2-0.xsd">
       <soapenv:Header/>
       <soapenv:Body>
          <idm:request>
             <idm:dataset-searches>
                <idm:profile-name/>
             </idm:dataset-searches>
             <idm:individual-name>
                <idm:family-name>ABC</idm:family-name>
                <idm:first-given-name>DEF</idm:first-given-name>
             </idm:individual-name>
             <idm:date-of-birth>1985-12-12</idm:date-of-birth>
          </idm:request>
       </soapenv:Body>
    </soapenv:Envelope>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies for posting yet another Java jar question. I did have a look at
Apologies if this is a dumb question. In previous ASP.NET projects, I've been using
I am having dumb monday so my apologies for posting such a newbie-like question.
Apologies if this is the wrong overflow to be posting this question to. There
My apologies in advance for posting such a lengthy question. Believe it or not,
I apologize in advance for posting another IE opacity question, but I've read at
Apologies, It looks like my original question was not able to correctly explain what
Apologies for the poor question title. I have two tables, jobs and Persons-Jobs. Jobs
Apologies if this is too ignorant a question or has been asked before. A
Apologies if this question is a bit obscure, I've been banging my head against

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.