WSDL too large/complex

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

Failed to load Metadat for Service Uri [http://iagam-dev02.iagam.net:8093/SupportManager.svc/mex] due to Error [Exception Information Type[InvalidOperationException] Message[Metadata contains a reference that cannot be resolved: 'http://iagam-dev02.iagam.net:8093/SupportManager.svc/mex'.] 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 http://go.microsoft.com/fwlink/events.asp.

I was looking at http://geekswithblogs.net/claraoscura/archive/2007/08/20/114806.aspx 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?

Cheers,
Chris

Nov 10, 2008 at 12: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 8, 2009 at 11:15 PM
Bump...
Developer
Feb 9, 2009 at 1: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 8: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.