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
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
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