hi,
i have a question about modifying XML as well...
that's some response:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<getDestinationCriteriaResponse xmlns="urn:iskratel-si:itnbsp-1-0">
<node node="42308" destinationId="2" xmlns="">
<param value="1" key="criteriaType1st"/>
<param value="1" key="criteriaType2nd"/>
<param value="1" key="destinationType"/>
<param value="1" key="carrierReq"/>
<param value="333" key="waitAnswerTime"/>
</node>
</getDestinationCriteriaResponse>
</soapenv:Body>
</soapenv:Envelope>
from this response i would like to take whole <node>...</node> and paste it into another request.
here is what i do:
String response_to_paste = context.expand( '${getDestinationCriteria - prepair#Response#declare namespace ns1=\'urn:iskratel-si:itnbsp-1-0\'; //ns1:getDestinationCriteriaResponse[1]/node[1]}' )
this gives me:
<node node="42308" destinationId="2">
<param value="1" key="criteriaType1st"/>
<param value="1" key="criteriaType2nd"/>
<param value="1" key="destinationType"/>
<param value="1" key="carrierReq"/>
<param value="333" key="waitAnswerTime"/>
</node>
than i choose another request where i want to paste response_to_paste.
def holder1 = groovyUtils.getXmlHolder( "modifyDestinationCriteria - repair#Request" )
i remove <node>...</node> from this request to make space for new one.
holder1.remove("//urn:modifyDestinationCriteriaRequest[1]/node[1]")
if i choose put or setNodeValue it puts my extracted response_to_paste into request, ok...
holder1.put( "//urn:modifyDestinationCriteriaRequest[1]", response)
holder1.updateProperty()
...but, what it makes is:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:iskratel-si:itnbsp-1-0">
<soap:Header/>
<soap:Body>
<urn:modifyDestinationCriteriaRequest><![CDATA[<node node="42308" destinationId="2">
<param value="1" key="criteriaType1st"/>
<param value="1" key="criteriaType2nd"/>
<param value="1" key="destinationType"/>
<param value="1" key="carrierReq"/>
<param value="333" key="waitAnswerTime"/>
</node>]]></urn:modifyDestinationCriteriaRequest>
</soap:Body>
</soap:Envelope>
CDATA!!!
what shall i use to get rid of this?

tnx,
beno