QName in WSDL XSD file throwing parsing error

While parsing a WSDL having a XSD in which

<xs:attribute name="FactoryType" type="xs:QName" />

is there. This QName is not accepted by the salesfroce which throws parsing error.
Please help.

Answer

The FactoryType attribute as you have it in your question is common in WCF web services that import the “http://schemas.microsoft.com/2003/10/Serialization/” namespace schema into the WSDL types.

You can see the serialization schema with the other common types.

I’ve looked at consuming .NET web services in Salesforce Apex Callouts previously.

In almost all cases you can just comment out the FactoryType attribute with no side affects. I don’t think I’ve every actually seen it utilised. It is just part of the default serialization types. Please do let me know if that is not the case with your WSDL as I’d like to see how it is utilised.

I’ve been working on a tool that should make importing a WSDL easier. You can get it from WSDL Parser and Apex Generator (Disclaimer: I work for the company that makes this tool, it is free to download and use). The tool should be able to handle a WCF WSDL and create the corresponding Apex classes for you. If it can’t, can you please share your WSDL? Ideally by adding it to your question above so everyone and see what is occurring.

Attribution
Source : Link , Question Author : codeath , Answer Author : Daniel Ballinger

Leave a Comment