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
Ashmi PatelAshmi Patel 

i cant generate apex code from WSDL file

i cant generate apex code after parsing any of the WSDL file
Need Help
Tanuj TyagiTanuj Tyagi
Hi  Ashmi Patel ,
Please share the Error that you are getting .
Ashmi PatelAshmi Patel
Uploaded wsdl size exceeded the maximum upload limit: {0}
i m parsing enterprise WSDL
Nitish TalekarNitish Talekar
Hi Ashmi,

What is the size of WSDL file?
The WSDL document can be at most 1MB. When the document is parsed, each namespace becomes an Apex class.

For more details : Check 7 Easy Steps to Generate Apex Class From WSDL In Salesforce (http://howtodoitinsalesforce.blogspot.in/2016/12/7-easy-steps-to-generate-apex-class.html)

Please mark this as best answer if it works for you.

Thanks,
Nitish
Ashmi PatelAshmi Patel
bt how can i reduce WSDL file???
 
Nitish TalekarNitish Talekar
what is the your WSDL file size ?
Ashmi PatelAshmi Patel
1.5 MB
 
Nitish TalekarNitish Talekar
Hi Ashmi,

There is away. Not a pretty one, but it should work. Ask WSDL provider to split the WSDL file into 2 files. They have to split module into multiple modules. 

Thanks,
Nitish
Ashmi PatelAshmi Patel
bt i have to do for that???
 
Nitish TalekarNitish Talekar
Hi Ashmi,

You have a few options:

1. Manually extract the elements from the WSDL that you don't need and then send that through WSDL2Apex. It will generate less Apex code.
2. Use the Partner API rather than the Enterprise API. The WSDL is smaller as it doesn't have dedicated complex types for every object in your org.
3. Use the version of WSDL2Apex in the FuseIT SFDC Explorer (http://www.fuseit.com/explorer) (Disclaimer - this is a free tool). After you import the WSDL you will be given an option to select the web menthods you need access to. You can then opt to comment out or exclude and unnessacary parts of the code not required by the selected methods.

Please mark this as best answer if it works for you.

Thanks,
Nitish