Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..

cancel
Showing results for 
Search instead for 
Did you mean: 
No ratings
KB-Sync1
Archer Employee
Archer Employee

Article Number

000012781


Applies To


Product(s): Archer
Version(s): All Versions
Primary Deployment: On Premises/AWS Hosted/AWS SaaS

Description


When calling a Web Service API method using SOAP, the following occurs: The remote server returned an error: (400) Bad Request.

Cause


This typically occurs when calling the Web Service API method using SOAP and one of the method parameters requires an XML string. The following shows an invalid SOAP call for the UpdateRecord method because the fieldValues parameter is not correct. The XML string value needs to be enclosed using CDATA.
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://archer-tech.com/webservices/">
  <soapenv:Header />
  <soapenv:Body>
    <web:UpdateRecord>
      <web:sessionToken>0602B9C307ADF8082D4B31DEB490A063</web:sessionToken>
      <web:moduleId>397</web:moduleId>
      <web:contentId>205530</web:contentId>
      <web:fieldValues><fieldValues><Field id="13867" value="My updated value from API." /></fieldValues></web:fieldValues>
    </web:UpdateRecord>
  </soapenv:Body>
</soapenv:Envelope>

 

Resolution


The XML string value needs to be enclosed using CDATA.  The following is a valid SOAP call for the UpdateRecord method.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://archer-tech.com/webservices/">
  <soapenv:Header />
  <soapenv:Body>
    <web:UpdateRecord>
      <web:sessionToken>0602B9C307ADF8082D4B31DEB490A063</web:sessionToken>
      <web:moduleId>397</web:moduleId>
      <web:contentId>205530</web:contentId>
      <web:fieldValues><![CDATA[<fieldValues><Field id="13867" value="My updated value from API." /></fieldValues>]]></web:fieldValues>
    </web:UpdateRecord>
  </soapenv:Body>
</soapenv:Envelope>

Version history
Last update:
‎2024-09-21 06:40 AM
Updated by: