Product:
Search Type:

I send XML API packet to Plesk and get the error: "Parser error: Request is invalid"

Article ID: 2191 
Last Review: Apr,02 2008
APPLIES TO:
  • Plesk for Linux/Unix

CAUSE

Such error means that the packet contains errors or it's version is not compatible with current protocol version that is used by Plesk.



RESOLUTION

XML packet can be validated using 'xmllint' command that belongs to 'libxml2' package, run on Plesk server:

xmllint -schema $PRODUCT_ROOT_D/admin/htdocs/schemas/rpc/PROTOCOL_VERSION/agent_input.xsd FILE.xml


Where $PRODUCT_ROOT_D/admin/htdocs/schemas/rpc/PROTOCOL_VERSION/agent_input.xsd  is scheme file for the appropriate protocol version.

Also, for checking XML syntaxis and vier XML packet in comfortable format you can use:
# xmllint --format FILE.xml

Another way, you can enable error reporting on Plesk server where you are sending API request to. Set "display_errors = On" in "$PRODUCT_ROOT_D/admin/conf/php.ini" and restart Plesk CP. After that run API request again. More detailed error should be returned in API response and can be found in "$PRODUCT_ROOT_D//admin/logs/httpsd_error_log" on Plesk server.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields