Forum Discussion

SharadKoshal's avatar
New Contributor
8 years ago

Getting error message "unexpected end of file after null"


I am getting error "unexpected end of file after null"

What i did?

1)Created/Added new JDBC request (test connection is successfull)

3)added sql query- it is getting fired and retrieving response in xml

2)added a script assertion to the request.

3)trying to parse the request through xmlholder


on running the script getting error "unexpted end of file after null"


Following is the script

import com.eviware.soapui.impl.wadl.inference.schema.Context
def request = context.expand('${JDBC Request#Request}') request

def response = context.expand('${JDBC Request#Response}') response

def xml = new XmlHolder(response)
def _createdWhen = xml.getNodeValue('//Results/ResultSet/Row rowNumber[1]/CREATEDWHEN') "date is is --->" + _createdWhen



Can anyone help me out in solving error?

I am, new in  soapUI

I am using openSoapui version:5.2.1


Attached log file as well


Thanks in advance



Sharad koshal


2 Replies

    • SharadKoshal's avatar
      New Contributor



      Issue was in reading response and parsing it.

      What i did?

      def jdbcXMLRequest = context.expand('${JDBC Request#Request}')
      def jdbcXMLResponse = context.expand('${JDBC Request#ResponseAsXml}')
      def xml = new XmlHolder(jdbcXMLResponse)


      Read response as XML instead, then parsed it using XML Holder.

      Then Did following for getting specific node value

      def _XXX= xml.getNodeValue('//ResultSet/Row[1]/XXX') _XXX


      This worked for me.


      Thank you