You need to sign in to do that
Don't have an account?

Why is a class WSDL file so large when passing in a list?
Hello - I have a very simple web service class that receives a Contact list. When I generate a WSDL file, it's too large to upload.
Is there a way to create a smaller WSDL file for a list?
However, if I pass in strings, the WSDL it's not large.
Is there a way to create a smaller WSDL file for a list?
webservice static string createContactRecord(List<Contact> contactArray){ List<Contact> insertContactList = new List<Contact>(); for(Contact ct : contactArray){ insertContactList.add(ct); } insert insertContactList; return 'Success'; }
However, if I pass in strings, the WSDL it's not large.
Webservice static string createContactRecord (String FirstName, String LastName, String Company){ Contact ct = new Contact(); ct.FirstName = FirstName; ct.LastName = LastName; ct.Company = Company; insert ct; return 'Success'; }
I wish there are simple tools can do it because my WSDL contains too many unused functions and schema of data structure.
If I can automate it, WSDL -> trimmed WSDL -> generate client stubs classes. Nothing unused will be generated, no misuse, no maintenances required, we will not touch on the generated code, and I can really focus on the code which in use. Smaller JAR, shorter XML parse time. If the WSDL gets updated, I will have only to rebuild client stubs classes and run the unit test.
I tried to keep off from human invoked. It takes time, easy to get mistake, and have to redo every time every little change on the original WSDL.
It might answer your query.
All Answers
I wish there are simple tools can do it because my WSDL contains too many unused functions and schema of data structure.
If I can automate it, WSDL -> trimmed WSDL -> generate client stubs classes. Nothing unused will be generated, no misuse, no maintenances required, we will not touch on the generated code, and I can really focus on the code which in use. Smaller JAR, shorter XML parse time. If the WSDL gets updated, I will have only to rebuild client stubs classes and run the unit test.
I tried to keep off from human invoked. It takes time, easy to get mistake, and have to redo every time every little change on the original WSDL.
It might answer your query.