Create Web Service Object in Script Mode


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/create_web_service_object_in_script_mode.html

The sample script does not work any more. In general it is not possible to create RequestObjects in script mode (also not possible using RestRequestObjectBuilder!). Error:

2019-08-06 11:14:52.495 WARN c.k.k.core.testobject.ObjectRepository - Test object with id ‘Object Repository/Create a new issue with script’ does not exist
2019-08-06 11:14:52.797 ERROR c.k.k.core.webservice.common.HarLogUtil - Cannot create HAR file

Please fix asap (Katalon 6.3)

Please try with the latest KS v6.3.0.rc7.

Thanks

can i set system date in a variable under verification tab in Object repository and pass that variable in Http json body? Do I still need to define it under Variables tab? Object repository doesn’t have script mode, that’s why I am confused

is not working like that.
you have to define the variable with a default value in object repository and set the system date in a testcase script, than call the request using variable binding

Please include a request in script mode for SOAP. IE setServiceType takes a literal string, which is REST in this example. Would it be SOAP for soap requests? Why is this string constant not in an enum or somewhere defined that I can see in the code? guessing is not fun. Also, your feedback link does not work.

nevermind i foudn it by searching on your github myself.

Line 387 it litereally is checking for random strings. this should be in the documentation so we don’t have to read source code tof igure it out.

Hi @clif.molina,
Thank you for your report. We will definitely consider about your suggestion, as well as introducing sample script for creating SOAP request in the near future.