This project is read-only.

WSDL too large/complex

Topics: Usage Scenarios, Technical Questions
Nov 5, 2008 at 2:33 AM
When attempting to import quite a large WSDL we get this error

Failed to load Metadat for Service Uri [] due to Error [Exception Information Type[InvalidOperationException] Message[Metadata contains a reference that cannot be resolved: ''.] Inner Exception Information Type[InvalidOperationException] Message[There is an error in XML document (1, 55065).] Inner Exception Information Type[InvalidOperationException] Message[There is an error in XML document (1, 55065).] Inner Exception Information Type[XmlException] Message[The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 55065.] ]

For more information, see Help and Support Center at

I was looking at which suggested adding a config file entry to increase the values for the readerQuotas.  I created a mmc.exe.config in c:\windows\system32 and added the XML from that web page to the config file.  That still caused the same error message to appear.

Any suggestions on how to auto-import a large wsdl?


Nov 10, 2008 at 1:51 AM
I have isolated this to the 
public WsdlImporter LoadServiceMetadata(Uri metadataUri, bool metaDataNeedCredentials, string metaDataUserId, string metaDataPassword)
method in the ServiceImporter class in the Microsoft.MSE.Tools.MetadataLoader.Module, this method creates a WSHttpBinding using MetadataExchangeBindings.CreateMexHttpBinding() method.  This creates a Binding object with a XmlReaderQuotas(sic) object with the default values.  Which of course is nowhere big enough to import any real life WSDL with more than about 10 functions.

Of course the source code for this dll is not available, and the dll is strongly named so I can't roll my own and drop in the DLL, and there is no way to provide a config entry to up the quota limits.

So currently I am looking at recreating this DLL by dissassembling it in total, then reassembling it with the quota limits up'ed, then hacking together a host for it so I can upload the data into the service database.

Also thanks for all the helpful replies...glad to see this is being looked at!
Feb 9, 2009 at 12:15 AM
Feb 9, 2009 at 2:45 PM
There are a number of Wsdl improvements in the upcomming release that should fix your issue.  We are targeting late Feb/ early March for the release.
Feb 9, 2009 at 9:50 PM
Thanks for the reply. I was looking at this for deployment of our internal web services and the large wsdl import was the only thing holding us back.  Hopefully the above post will help fix the problem quickly.  If you need a sample WSDL then let me know.