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
sukumarsukumar 

Unsupported Schema element found http://www.w3.org/2001/XMLSchem a:complextype

Hi All,

 

I am getting this error while I am generating enterprise client JARs from wsdl. I am new to wsdl , Can any one please help me with this issue.

 

D:\wsdl>java -classpath wsc-22-jdk-1.7.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
[WSC][wsdlc.run:312]Created temp dir: C:\Users\SukumarM\AppData\Local\Temp\wsdlc-temp-332533525663458937-dir
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Unsupported Schema element found http://www.w3.org/2001/XMLSchem
a:complextype. At: 93:41
at com.sforce.ws.wsdl.Schema.read(Schema.java:139)
at com.sforce.ws.wsdl.Types.read(Types.java:70)
at com.sforce.ws.wsdl.Definitions.parse(Definitions.java:162)
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:104)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:68)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:75)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)

sukumarsukumar

Issue solved..................

Kirill_YunussovKirill_Yunussov
what was it?  
Aditya BholaAditya Bhola
Can you please mention what's the solution to this problem?
Kirill_YunussovKirill_Yunussov
The problem is that if you use Chrome to generate the WSDL, then it will often have errors in it.  So for one, use IE to generate the WSDL file from Salesforce.

Second problem I saw, is that WSC-23.jar converts Salesforce Date fields to Java Calendar fields, which may interfere with older code written using different java WSDL files.  If you don't want that, you can either modify and recompile the TypeMapper class in WSC-23 package, to map Date to java.util.Date, or you can use axis WSDL2Java instead of WSC to consume the WSDL and to generate Java files.