Symptoms

API reqeust 'pem.activateSubscription' fails with the error returned:

<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>-1</int></value></member><member><name>faultString</name><value><string>javax.ejb.EJBException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer</string></value></member></struct></value></fault></methodResponse>

Cause

The error means that one of the values in the body of XML request has not integer data type as is supposed to.

Resolution

Refer to API Guide to find which type should a values have and set it accordingly.

Example:

Incorrectly defined limit (16):

                      <member>
                    <name>resource_limit</name>
                    <value>
                      <string>16</string>
                    </value>
                  </member>

should be defined with integer data type as per the guide:

                  <member>
                    <name>resource_limit</name>
                    <value>
                      <int>16</int>
                    </value>
                  </member>

Internal content