Forum Discussion

jasa's avatar
jasa
Occasional Contributor
15 years ago

Schema Compliance and WADL - Nullpointer

I created a test case for my rest service using a WADL descriptor file. I also added a 'schema compliance' step to validate the response.
This compliance check is giving me a nullpointer:

   java.lang.NullPointerException
    at com.eviware.soapui.impl.wadl.WadlDefinitionContext.createDefinitionLoader(WadlDefinitionContext.java:52)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.getDefinitionLoader(AbstractDefinitionContext.java:198)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:218)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140)
    at java.lang.Thread.run(Unknown Source)

What could be the cause of this error? I am using SoapUI 3.5.1 (same error is also occuring on older versions).
I reference a schema using local path notation (ex: c:\schemas\abc.xsd)

thanks,
Jan

5 Replies

  • eyes123's avatar
    eyes123
    New Contributor
    Did you ever work out why this was happening as I'm having the same issue. Any response from the guys at eviware would be appreciated...

    I can either set the schema validation to the XSD which is included in the WADL (in which case I get the null pointer exception) or I set the validation to the WADL itself and EVERYTHING validates sucessfully.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    regarding this; the Schema Compliance assertion can validate either against a WSDL (if its a SOAP Request) or a WADL (if its a REST or HTTP Request), specifying anything else (ie an xsd) will currently not work (but should be handled better than a NPE). If you think soapUI is not validating correctly against your WADL then please include the WADL and a sample response so we can try to work that out.

    Supporting xsds in the Schema Compliance assertion is in our backlog, sorry for the lacking documentation in this regards!

    regards,

    /Ole
    eviware.com
  • I am experiencing the same issue, but I am validating against a WSDL. The settings Cache the WSDL, and when I retry the test it passes with no changes anywhere.

    I tried upping the memory as per this post: http://www.soapui.org/Working-with-soap ... usage.html

    but i still get the problem. The strange thing is, this issue happens intermittently, and it happens more frequently when using testrunner.bat than when running the test manually in the UI. When i see the issue, re-running the test will usually result in a successful result and the test will pass. Is there anything i can do to make the outcome more consistent?
  • Hi,

    this seems to be the same bug as the one described here in the forum, which is filed as SOBL-694 in SmartBear's backlog.
    I've found the bug that is causing the NullPointerException and fixed it on github. The pull requests can be found here but it has not been integrated by SmartBear yet. (So, if you are really in a hurry - like me - you could consider checking out from my fork until the bug is fixed on the official repository.)

    Regards
    Tilman