DKorkchi
15 years agoNew Contributor
[Res] SoapUIPro SOAP Response schema validation using API
I am running soapui project files through the API, like so:
WsdlProjectPro project
= (WsdlProjectPro) ProjectFactoryRegistry.getProjectFactory(WsdlProjectProFactory.WSDL_TYPE)
.createNew(filename);
for(int i=0;i<project.getTestSuiteCount();++i)
{
WsdlTestSuitePro testSuite = (WsdlTestSuitePro) project.getTestSuiteAt(i);
if(!testSuite.isDisabled())
{
runTestSuite(testSuite);
}
}
Everything runs okay, except all soap responses trigger a schema validation error, hence the error message:
Step Status,ReportTags,"TestStep [ReportTags] result status is FAILED; [[SOAP Response] org/xmlsoap/schemas/soap/envelope/EnvelopeDocument, [Schema Compliance] org/xmlsoap/schemas/soap/envelope/EnvelopeDocument] [discarded]"
I only get errors for soap requests. Requests like HTTP or steps like Scripts work fine and status says OK.
I have tested the project in the SoapUIPro gui, and everything runs fine, all soap requests return with status OK. I have even taken the responses from my program and pasted them into the SoapUIPro gui and validated them, and they validate.
I am also running the above code from inside a .aar deployed to Apache Axis2.
WsdlProjectPro project
= (WsdlProjectPro) ProjectFactoryRegistry.getProjectFactory(WsdlProjectProFactory.WSDL_TYPE)
.createNew(filename);
for(int i=0;i<project.getTestSuiteCount();++i)
{
WsdlTestSuitePro testSuite = (WsdlTestSuitePro) project.getTestSuiteAt(i);
if(!testSuite.isDisabled())
{
runTestSuite(testSuite);
}
}
Everything runs okay, except all soap responses trigger a schema validation error, hence the error message:
Step Status,ReportTags,"TestStep [ReportTags] result status is FAILED; [[SOAP Response] org/xmlsoap/schemas/soap/envelope/EnvelopeDocument, [Schema Compliance] org/xmlsoap/schemas/soap/envelope/EnvelopeDocument] [discarded]"
I only get errors for soap requests. Requests like HTTP or steps like Scripts work fine and status says OK.
I have tested the project in the SoapUIPro gui, and everything runs fine, all soap requests return with status OK. I have even taken the responses from my program and pasted them into the SoapUIPro gui and validated them, and they validate.
I am also running the above code from inside a .aar deployed to Apache Axis2.