5

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.

9
  • What's the full error ?
    – SF_user
    Aug 14, 2014 at 12:26
  • Error: Failed to parse wsdl: Unsupported Schema element found w3.org/2001/XMLSchema:attribute. At: 74:58
    – codeath
    Aug 14, 2014 at 12:27
  • I think this QName as a datatype used in XSD is not supported
    – codeath
    Aug 14, 2014 at 12:28
  • 1
    And if you replace <xs:attribute name="FactoryType" type="xs:QName" /> by <xs:element name="FactoryType" nillable="true" type="xs:string" /> ?
    – SF_user
    Aug 14, 2014 at 12:33
  • 1
    Also if you can share your WSDL i'll have a go at importing it for you. Aug 14, 2014 at 14:38

1 Answer 1

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .