You need to sign in to do that
Don't have an account?
iRitesh
How to handle anyType of wsdl in generating apex classes
i have to get some data using SOAP api from one org to another .so i generated Enterprise wsdl file of one organization . it contains some fields with specified type as type=xsd:anyType. because apex doesn't support xsd:anyType thats why i changed it to xsd:string .ok it will generate some apex classes .i want to know is it the proper way.for handling anyType or we should do some thing else .Please guideline
Answer from the same question posted to Salesforce StackExchange:
----
The Enterprise and Partner APIs are intended for usage outside of Salesforce rather than integrating two Salesforce Orgs together. They are typically consumed by languages like Java, .NET, PHP, Ruby, ...
As you found, anyType is not supported by Wsdl2Apex. See Supported WSDL Features:
So in earlier versions anyType was mapped to string. You can certainly change it in the WSDL element types to get WSDL2Apex to import it.
It appears to only used on the NewValue and OldValue elements on History Types. E.g. from AccountHistory.
If you aren't going to be working with these History sObjects then you aren't likely to have any issues with the change.
Alternatives: