Hi I am trying to evaluate a web service. I am using the Axis API to create the requests. I send requests with some attacks, and then want to validate the obtained response to the response schema. I don't have much idea as to how can I achieve this. Can some one help me to achieve this, or give me some pointers that would give me some idea to obtain this.
If you used the wsdl2java tool that comes with Axis2, the response message will be unmarshalled to the generated classes, and you will get an error if the reponse message does not correspond with the classes generated from the WSDL. So in this way you have a kind of implicit validation.
Try SOAPUI. It is quite a powerful open source testing tool for web services. You can construct test suites, do performance testing, and specify customized validation criteria.
Jens-Martin is correct. If you're using the client generated by Axis wsdl2java, all the validation you need is happening behind the scenes. There are two kinds of validation going on:
- SOAP has a schema definition, and the response must be a valid SOAP response or the client will throw an exception.
- The WSDL you used to generate the client described what goes in the SOAP envelope of the response. If the response you get doesn't match, the client will throw an exception.
If you really feel compelled to write your own XML parser/validator and SOAP handler, you're on your own.