Voogd_Support
11 years agoNew Contributor
Request validation against WSDL
Hi,
We're using a large amount of supplied data for use in a dynamic testcase. This testcase submits several teststeps to a webservice, which performs calculations based on the supplied data.
The integrity of the supplied data is arbitrary, so we want to validate the supplied data against the WSDL. To prevent the actual time consuming calculation (including logging/stats etc), we'd want to prevent the calculations by a cancel() in a script assertion (see script below) and proceed to the next datasource row. We've been looking at this from various angles, but without any succes.
Is there any way to get this done?
Thanks!
Patrick Pietersz
[hr:2yg5bjct][/hr:2yg5bjct]
def project = messageExchange.modelItem.testStep.testCase.testSuite.project
def wsdlcontext = project.getInterfaceAt(2).getDefinitionContext()
def validator = new com.eviware.soapui.impl.wsdl.support.wsdl.WsdlValidator(wsdlcontext);
def errors = validator.assertRequest(messageExchange, false)
for ( error in errors ) log.info error
// In any case: cancel the request!
We're using a large amount of supplied data for use in a dynamic testcase. This testcase submits several teststeps to a webservice, which performs calculations based on the supplied data.
The integrity of the supplied data is arbitrary, so we want to validate the supplied data against the WSDL. To prevent the actual time consuming calculation (including logging/stats etc), we'd want to prevent the calculations by a cancel() in a script assertion (see script below) and proceed to the next datasource row. We've been looking at this from various angles, but without any succes.
Is there any way to get this done?
Thanks!
Patrick Pietersz
[hr:2yg5bjct][/hr:2yg5bjct]
def project = messageExchange.modelItem.testStep.testCase.testSuite.project
def wsdlcontext = project.getInterfaceAt(2).getDefinitionContext()
def validator = new com.eviware.soapui.impl.wsdl.support.wsdl.WsdlValidator(wsdlcontext);
def errors = validator.assertRequest(messageExchange, false)
for ( error in errors ) log.info error
// In any case: cancel the request!