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
pankaj meshram 21pankaj meshram 21 

Error: Failed to parse wsdl: Unsupported Schema element found http://www.w3.org/2001/XMLSchema:attribute. At: 1:153944

i am facing above error while converting wsdl to apex class
Best Answer chosen by pankaj meshram 21
Khan AnasKhan Anas (Salesforce Developers) 
Hi Pankaj,

Greetings to you!

The WSDL had three "attribute" elements:

<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>

Commenting these out of the WSDL allowed into to be used with wsdl2apex. I'm not sure what adverse effects resulted from removing them.

Please refer to the below links which might help you further.

https://salesforce.stackexchange.com/questions/93891/unsupported-schema-element-found-http-www-w3-org-2001-xmlschemaattribute

http://www.rahulpawar.in/2013/10/salesforcecom-generate-apex-classes_21.html

https://salesforce.stackexchange.com/questions/40869/creating-a-class-by-consuming-a-wsdl-document-schemaattribute

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Pankaj,

Greetings to you!

The WSDL had three "attribute" elements:

<xs:attribute name="FactoryType" type="xs:QName"/>
<xs:attribute name="Id" type="xs:ID"/>
<xs:attribute name="Ref" type="xs:IDREF"/>

Commenting these out of the WSDL allowed into to be used with wsdl2apex. I'm not sure what adverse effects resulted from removing them.

Please refer to the below links which might help you further.

https://salesforce.stackexchange.com/questions/93891/unsupported-schema-element-found-http-www-w3-org-2001-xmlschemaattribute

http://www.rahulpawar.in/2013/10/salesforcecom-generate-apex-classes_21.html

https://salesforce.stackexchange.com/questions/40869/creating-a-class-by-consuming-a-wsdl-document-schemaattribute

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
pankaj meshram 21pankaj meshram 21
Thanks Khan sir,
It Works now .
There are some problem occured after that but i resolved that . your links are really helpful.