Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-09-28 01:55 PM
I'm trying to update a single record via powershell but getting: "Server was unable to process request. ---> Input string was not in a correct format."
XML
<UpdateRecord><Field id="15858" type="4" value="Locked"/></UpdateRecord>
Powershell
$XML = "<UpdateRecord><Field id=`"$($FieldID)`" type=`"4`" value=`"Locked`"/></UpdateRecord>";
$ArcherRecordWSDL.UpdateRecord($ArcherSession,$ModuleID,$ArcherRecordID,$XML);
Request
POST /ws/record.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://archer-tech.com/webservices/UpdateRecord"
Host: grcb.archer.rsa.com
Content-Length: 550
Connection: close
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><UpdateRecord xmlns="http://archer-tech.com/webservices/"><sessionToken>{Intentionally Removed}</sessionToken><moduleId>424</moduleId><contentId>379015</contentId><fieldValues><UpdateRecord><Field id="15858" type="4" value="Locked"/></UpdateRecord></fieldValues></UpdateRecord></soap:Body></soap:Envelope>
Response
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/xml; charset=utf-8
X-FRAME-OPTIONS: SAMEORIGIN
Set-Cookie: dtCookie=1$15506CFE24F85CFF3E79214E871B7C5C;Secure; Path=/; Domain=.rsa.com
Date: Fri, 28 Sep 2018 17:31:39 GMT
Content-Length: 429
Connection: close
Strict-Transport-Security: max-age=15552000
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Server was unable to process request. ---> Input string was not in a correct format.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
I'm currently using BurpSuite to troubleshoot and make changes outside powershell. Anyone have any idea why this is not working?
2020-06-24 10:02 PM
Hi Jeff,
I have modified the above xml to include Text, Text Area, Date, Self Cross Reference field. The records are creating as expected. Below is the modified xml:
$xml = '<fieldValues><Field id="27526" name="TestApp Name" value="Created by PowerShell"/>
<Field id="27527" name="TestApp Description" value="Description Created by PowerShell"/>
<Field id="27528" name="TestApp Date" value="06/24/2020"/>
<Field id="27530" name="Related TestApp" value="312112"/></fieldValues>'
Can you please suggest to add value list field in above xml.
I have tried adding below line but no luck.
<Field id="27529" name="TestApp Criticality" value="High"/></fieldValues>'
2020-07-10 11:53 AM
For Values List fields, the Id for the Value needs to be used. Check out XML Formatting Guidelines for Field Input.
2020-07-14 01:37 AM
Thanks Jeff, This helped me.