header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
December 01, 2008, 06:49:10 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
XmlHoder Null Pointer Exception
Welcome, Guest. Please login or register.
December 01, 2008, 06:49:10 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  XmlHoder Null Pointer Exception
« previous next »
Pages: [1] Print
Author Topic: XmlHoder Null Pointer Exception  (Read 291 times)
John R. Brewster
Newbie
*
Posts: 10


« on: August 18, 2008, 02:28:22 pm »

Greetings

I am running a GroovyScript that has the following code:

...

         def holder = groovyUtils.getXmlHolder( it.name+"#Response" );
         if (holder["//ns1:FunctionReturnCode"] == "SUCCESS") {
...

The issue is the #Response may or may not be there.  Therefore I am getting a NullPointerException.  This, for one, locks up my system for about 20 minutes while it does something ... However, I want to know how I can check for a valid response without getting a nullPointer?

Is there a check I can run.  I looked at the API for xmlHoder but I cannot find anything.

Thanks,
Jb
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,466


« Reply #1 on: August 18, 2008, 09:40:23 pm »

Hi John,

hmm.. you have a point :-) I'll add a "hasContent" property to the XmlHolder, until then you could try checking for the response with

Code:
if( context.expand( it.name + "#Response") == null )
   return

does that help?

regards,

/Ole
eviware.com
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header