Hi,
I need to assign a value to an XML file before I can use the file as input for further processing. I tired to achieve this using Replace functionality. However, it works only for String Variables and in my case it is Integer. If I don’t convert my String to Integer and then Set the Value, My Response is going into error. I’m getting following error if I pass String directly
For input string: "“3"”
Tried using following Approach
I’m attaching XML and my Project File. Kindly go thro and the same and let me know where I’m going wrong. Thanks In Advance
Thank you for the prompt Reply… Since I’m new to forum, system is not allowing me to upload any file… Tried to upload the same in Gdrive and still system doesn’t allow.
Integer. An integer defined in XML. Note: An integer is a simple resource that is referenced using the value provided in the name attribute (not the name of the XML file). As such, you can combine integer resources with other simple resources in the one XML file, under one element
When we try to assign a String value, I don’t see any issues. But when I tried to convert the value to Integer and then assign, I’m facing the issue. In my case, I want to convert string to integer and then have to assign.
I’m using “Convert.ToInt32(Instance4)” to convert string to Integer. But system is throwing following error
Assign Activity is as below
To Variable Syntax That I’ve used in Assign Activity
If I try to pass the value as String and tried to invoke Webservice, I’m getting faultsring error "For Intput String “3588"” in response payload as shown below in UI Path
PS: I’ve captured both Request and Response Payload in above picture.
However, If I copy the Request Payload generated and invoke the webservice from SOAP UI, it works perfectly well. So I thought it couldbe because of data type issue.
Kindly let me know if I’m doing anything not correct