I have a WSDL file in an online URL. This file contains references to xsd schemas that have http in their URLs. But the actual files lie under the https protocol, so following the http link redirects to the https page. But the XML validation method does not follow the redirect and gives an error trying to read the redirection page as an XML.
I cannot change the WSDL.
Katalon Studio version
Standalone version 8.5.5
Steps to reproduce
Create a SOAP request based on an XML schema
Create a verification script that will validate the server response (or any xml) against a schema. The WSDL schema should contain XSD imports with links that will redirect to a different page
Fatal error: The element type “hr” must be terminated …
This is not the real issue. WSResponseManager is not capable to do anything meaningful for a HTML document.
The real issue is that Katalon is not doing “follow redirects” for you. So you should try to find how to let Katalon do “follow redirects”.
You should be able to create a SOAP request with com.kms.katalon.core.testobject.RequestObject.setFollowRedirect( true ) and setRedirectTimes( some integer larger than 0), shouldn’t you?
If you set the RequestObject with “follow redirects” option enabled, Katalon Studio may perform “follow redirects” when it received a reply “HTTP status=301 Moved Permanent”. (I have never tried it so i am not sure)
If Katalon Studio performs following redirects, eventually SOAP service would reply a valid XML SOAP response; then WSResponseManager would have a chance to validate the XML document. If Katalon Studio does not perform following redirects, no valid XML document would be passed to WSResponseManager.
testobject.RequestObject.setFollowRedirect doesn’t have a setFollowRedirect method or i misunderstand something. And judging from the method name it returns void, not a request object. So it would be a method to set a redirect parameter, not an object.
I tried creating a test object with findTestObject(‘ObjectName’), but it doesn’t have any redirect setting methods either.
Well, i did find a workaround by downloading the WSDL and changing the XSD links inside it (trying to refer to them locally doesn’t work either). And schema validation is optional in my case.
I would like to use Katalon since it makes test organization fairly easy. Something like Postman is not so great for that as every request in it is separate and can’t really be reused. And, uhh, SoapUI interface is pretty horrible.
But it does seem like i’ll have to deal with more issues in the future…