I decided to write this post because I was victim of the problem while creating classes from WSDL.
I was getting the following errors while generating it:
Error: Failed to parse wsdl: Unsupported Schema element found http://www.w3.org/2001/XMLSchema:complextype. At: 11:47
But its the fullish error because if it does not support the standard http://www.w3.org/2001/XMLSchema Schema then which Schema it supports?
I was unable to fix it & I spent almost a day to achieve this but it didn't happen so I was frustrated.
As You can see in the above picture, I was using the most preferable browser that is "Chrome" to create the WSDL From google's API site and to generate APEX classes from my SF org.
I also tried Firefox.
But I was unable to do it, So I tried to use some other browser(i.e.Internet Explorer).
You might thing, He is such a fool but wait before you thing that let me tell you that it was the solution which worked for me.
So Here is the "MANTRA" to achieve it
Use the Internet Explorer to create any WSDL from any site.
While creating WSDL, don't copy paste the code in any file. Instead save the entire file as .wsdl document.
Then you can use your favorite Web browser to generate Apex class from this WSDL.
So you might be wondering what was the problem?
Problem was, Chrome created a WSDL which was not supported by S.F.
(Don't know the internal problem)
After getting this shocking result I switched to I.E. rather than
Chrome but only for "Generating Apex classes from WSDL".
Hope this post will help you guys.