Forum Discussion

llamontagne's avatar
llamontagne
New Contributor
15 years ago

REST response error Unexpected element: CDATA when response is encrypted

I am using soapUI 3.0 to test a REST License service.    The license information that is returned from a REST (get) request is encrypted.    The “Accept” value is set to “text/xml”.  When I get the response back from the request, I get the following error:

ERROR [errorlog] org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
.
.
.
       ... 20 more
10:07:49,775 INFO  [AbstractHttpRequestDesktopPanel] Got response for [LicenseMa
nager.LicenseManager Request:RESERVE_LICENSE] in 106ms (394 bytes)


The actual encrypted response I receive when I view it in the xml response window looks like:

whd8vdE/39izVv1J5+rN0XjKSAasU8/pkKspQQymI+Fg4prexD8oZ5jNcXu2XIoicZ6oeiIEiEDO
iDTOq1p+QQzAVjLsFmOWN5BAHmANCdkJuva+OqLqfFdcT2FXBjb3cj0boDoMa+MXdZOBspXYSIiV
+rk+CQq88SdPoxTTUPgIhclNcogVDi0GUj3/Z2kkk1EDWij1dwASI/PaVD+GtGcIBd0Z9PyO2ZW2
3eDe4hQD6EXGl4ZOcoYA9u3uzQPvf6tcR1wFZjVW/ebQD10RtpP6CIpfXgm5A+18ZYQCul28VKLo
1rQ2xbIkKYj1zYPMsqUSblRWQNUIAY86pt1LpQqW767i0gM19K1LBVIV/iq9fkMatnvxwgm50bpI
gq47


Also, I would like to know how to capture this response using groovy.    In the past I’ve used groovy to retrieve a response from a soap request.  Would I do something similar to the following even though XML is not being returned from the request?

def holder = groovyUtils.getXmlHolder( "RESERVE_LICENSE#Response" )

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Well, it should be decrypted before it reaches editor. Unfortunately nothing can be done in core version. Why don't you try pro version(there is a trial). You could use listeners to decrypt message before it is shown in xml editors.

    robert