Article Number | 000012781 |
Applies To | RSA Product Set: Archer RSA Version/Condition: All |
Issue | 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>
|
Legacy Article ID | a64323 |