Forum Discussion
SUCCESS! Kudos to PaulMS! Yes you are correct! This solves the problem!
screenshot attached.
Sorry it took me so long to get back to this post, but I've been busy with other work projects.
for this error:
Wed Mar 21 15:50:21 PDT 2018:ERROR:An error occurred [startup failed:
Script1.groovy: 1: unexpected char: '#' @ line 1, column 64.
{GetContractVersionListRequest#Response}
^
here is the code that gets the error:
def response = context.expand( ā${GetContractVersionListRequest#Response}ā )
new File( āC:/Groovy/ā + ā_response.txtā ).write( response )
here is the code that works successfully:
def response = context.expand( '${GetContractVersionListRequest#Response}' )
new File( "C:/Groovy/" + "_response.txt" ).write( response )
notice above the difference between ā and '
notice above the difference between ā and "
Difficult to tell the difference from the above 2 lines huh?
Paste the above 2 lines into your favorite text editor, zoom in, then you will see the difference that causes the above referenced error.
You could also paste directly into the soapUI groovy script editor and maybe see the difference.
Nevertheless, while in the soapUI groovy script editor, and backspacing over what I had pasted in from a website example solved the problem and the script wrote to file & directory specified.