function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnupamAnupam 

salesforce error when trying to open the metadata wsdl class

Hi 
  • I converted the metadata wsdl to apex class through wsdl to apex button and it created a class soapSforceCom200604Metadata in the system. But when i try to open it it gives me below error.
  • An internal server error has occurred
    An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

    Thank you again for your patience and assistance. And thanks for using salesforce.com! 
  •  
  • Thanks
  • Anupam

    Error ID: 1281456891-49957 (-1437854107)
SonamSonam (Salesforce Developers) 
The error I'm seeing in the app logs is:
core.apexpages.exceptions.MaxViewStateLimitException: Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 140.266KB

Found a similar case which was raised with the internal team and turns out that the WSDL file is quite large and results in a class that is too large to be displayed in a Visualforce page. 
As it can be seen in the result class (e.g. open it through developer console) the class is composed by a large set of other classes instead of being a single large object/class. 
What happens is that for each of these classes the system tries to save information from them into the View State in order to keep the state of the page.

Workaround: Try to reduce the size of WSDL or open the class in the developer console.