Forum Discussion
Oct21
Occasional Contributor
nmrao Yes, it worked fine with static XML.
Please see the screenshot for error details.
Thanks
Oct21
nmrao
6 years agoChampion Level 3
Ok did you try the other reply?
- Oct216 years agoOccasional Contributor
Hi nmrao
I tried the updated reponse response, and this too throwing error. It is working fine with fixed xml.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def str = context.expand('{RegistrationRequest#Response}') def xml = new XmlSlurper().parseText(str) def getOrderRef = { element -> xml.'**'.find {it.name() == element}.@orderItemRef } def elements = ['Assessment', 'Report'] elements.each { log.info getOrderRef(it) }
See the screeshot for error.
Thanks,
Oct21
- nmrao6 years agoChampion Level 3Error is nothing to do with script. You need to check what response have you got.
- Oct216 years agoOccasional Contributor
This is the complete response xml. Can you please help me with this.
<?xml version="1.0" encoding="utf-8"?> <AcknowledgeCandidateRegistration majorVersionId="1" minorVersionId="0" xmlns="http://cebtalentcentral.com"> <ApplicationArea> <CreationDateTime>2019-03-27T12:36:41.200Z</CreationDateTime> </ApplicationArea> <Acknowledge> <OriginalApplicationArea> <CreationDateTime>2019-03-27T12:36:40.903Z</CreationDateTime> </OriginalApplicationArea> <ReceiptId>159803</ReceiptId> <Status>Completed</Status> <RejectCode>0</RejectCode> <RejectReason /> </Acknowledge> <DataArea> <AssessmentOrder> <Assessment packageTag="A_VAT_Induct" name="Verify - Inductive Reasoning (2007)" orderItemRef="2226954" language="MULTI" stage="1" jobLevel="Graduate/University" originalTimer="00:25:00" adjustedTimer="00:25:00" /> <Report packageTag="A_VAT_Induct" name="Verify - Inductive Reasoning (2007)" orderItemRef="1749160" language="en-US" comparisonGroup="" reportFormat="Pdf" reportMedia="Link" /> <AssessmentAccess hasAssessments="true"> <Assessment stage="1"> <AssessmentCommunication> <URI>https://integration-talentcentral-qa2.eu.shl.com/integration/ce/b402bc945d264937b9edd9e251597ee0/?rid=159803</URI> </AssessmentCommunication> </Assessment> </AssessmentAccess> </AssessmentOrder> </DataArea> </AcknowledgeCandidateRegistration>
Thanks,
Oct21
- nmrao6 years agoChampion Level 3Have you tried the script with above xml ?
When you get the error, what does it show in the raw response ?
Related Content
Recent Discussions
- 5 days agoemoya