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
krupananda reddykrupananda reddy 

Parsing wsdl in developer org to generate apex class!

I have generated Enterprise wsdl from one of my Developer org and tried generating apex class from that wsdl by logging into other develope org.

Its not showing any error while parsing but generating the following error when i click on generate.

Unsupported schema type: {http://www.w3.org/2001/XMLSchema}anyType

Did anybody come across this? If so please help it out .
Fabien TaillonFabien Taillon
Unfortunately anyType isn't supported by the wsdl2apex functionnality :
The Salesforce datatype anyType is not supported in WSDLs used to generate Apex code that is saved using API version 15.0 and later

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm

SaketJoshiSaketJoshi
Open the file in notepad++ and replace all occurences of "anyType" to "String"
Raja ReddyRaja Reddy
<code>
    <element name="NewValue" nillable="true" minOccurs="0" type="xsd:anyType"/>
    <element name="OldValue" nillable="true" minOccurs="0" type="xsd:anyType"/>
</code>
Replace  "anyType" to "String in your code.
 
If my answers solves your problem, please mark it as Best Answer, so that other can take benefit of this post.