This is working for normal running but when i put this code in a batch then it shows an error “Object must implement IConvertable”. Please anybody help me solve this issue asap.
Attached below is my code-:
select firstOnly integrationAPISetup;
#define.ContentType('application/json')
destinationUrl = integrationAPISetup.BaseURL + apiTable.APIPath;
response = new System.Net.HttpWebResponse();
clro = null;
requestJson = @integrationAPISetup.ConnectionString;
try
{
new InteropPermission(InteropKind::ClrInterop).assert();
httpHeader = new System.Net.WebHeaderCollection();
clro = System.Net.WebRequest::Create(destinationUrl);
request = clro;
utf8 = System.Text.Encoding::get_UTF8();
bytes = utf8.GetBytes(requestJson);
clro.set_Method("POST");
clro.set_Headers(httpHeader);
request.set_ContentType(#ContentType);
request.set_ContentLength(bytes.get_Length());
requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.get_Length());
response = request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new System.IO.StreamReader(responseStream);
responseJson = streamReader.ReadToEnd();
responseData = RetailCommonWebAPI::getMapFromJsonString(responseJson);
mapEnumerator = responseData.getEnumerator();
while ( mapEnumerator.moveNext())
{
}
// responseData = RetailCommonWebAPI::getMapFromJsonString(responseJson);
this is working for normal running but when i put this code in a batch then it shows an error “Object must implement IConvertable”