Set Profile variable on Object Repository

Hello,

Is it possible to set variable on Profiles to be used as SOAP address in a Object Repository?

Here is the Profile and the Variable that I’ve created:

And here is the SOAP Object Repository:

When I try to run in that way, the result is this:

(Stack trace: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at ‘${Version}’.: java.io.FileNotFoundException: This file was not found: file:/C:/Users/a248180/Desktop/Katalon_Studio_Windows_64-5.7.1/${Version}

at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

at com.kms.katalon.core.webservice.common.SoapClient.parseWsdl(SoapClient.java:84)

at com.kms.katalon.core.webservice.common.SoapClient.send(SoapClient.java:143)

at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:39)

at com.kms.katalon.composer.webservice.parts.SoapServicePart$4.run(SoapServicePart.java:230)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Caused by: java.io.FileNotFoundException: This file was not found: file:/C:/Users/a248180/Desktop/Katalon_Studio_Windows_64-5.7.1/${Version}

at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)

… 6 more

(caused by: (Stack trace: java.io.FileNotFoundException: This file was not found: file:/C:/Users/a248180/Desktop/Katalon_Studio_Windows_64-5.7.1/${Version}

at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)

at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

at com.kms.katalon.core.webservice.common.SoapClient.parseWsdl(SoapClient.java:84)

at com.kms.katalon.core.webservice.common.SoapClient.send(SoapClient.java:143)

at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:39)

at com.kms.katalon.composer.webservice.parts.SoapServicePart$4.run(SoapServicePart.java:230)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

)))

SOAP.jpg

profile.jpg

you cannot set that directly.
1. set profile var: eg: profileVER
2. set variables in call : soapVER
3. when calling WS use findTetObject(‘to’,[(‘soapVER’): GlobalVariable.profileVER])

Hello,

Where exactly should I put the item 3?

In meanwhile, I’ve try to call the global variable in that way:

And the global variable on Profiles is set like this:

When I run the SOAP request, I got this:

Shouldn’t it work?

image.png

global_var.png

error_soap.png

something like this:

CaptureKAT0003.PNG

and of course you will not beable to run this SOAP from his definition

Hi, I guess we are almost there, now I’m facing this error:

Test Cases/New Test Case FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to send request (Root cause: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at ‘${Version2}’.: java.io.FileNotFoundException: This file was not found: file:/C:/Users/a248180/Katalon Studio/NAMS2/${Version2})
(…)

This is the test case:

This is the SOAP:

And this is the Profile:

testcase.png

soap2.png

profile2.jpg

soap3.png

crap!..
try to set some default value … dont know…
i think we are doing all as in documentation. please check too:
https://docs.katalon.com/display/KD/Parameterize+a+Web+Service+Object

Hi there,
I’ve implemented it for a REST-Request as described above and it worked like a charm.
In the variables section of the test object I’ve set the default value with a global variable. So its also possible to submit the REST request from his definition.
Even without a default value its working in the TC script

Hello guys,

I’ve success only running it through a Test Suite Collection:

If I try to run the test case alone, I got this:

WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at ‘http://segotn13670.vcn.ds.volvo.net/${Version2}/WCFService/ESWService.svc?wsdl’.: java.io.FileNotFoundException: This file was not found: http://segotn13670.vcn.ds.volvo.net/${Version2}/WCFService/ESWService.svc?wsdl)

If I try to submit the SOAP from his instance:

Anyother ideia?

Untitled.png

Untitled2.png

Untitled3.png

Marlon,

If I try to run the test case alone, I got this:

Which Profile did you applied to the test case: default, NAMS.LATEST, NAMS.LATEST.BUILD?

I suppose you applied the “default” profile, and it does not contain “VersionSoap” variable.

1 Like

Hello,
Yes, I did not select the Profile on the “Select execution profile”. Now it is working fine =]
Thank you guys!