ThinkGeo.com    |     Documentation    |     Premium Support

WMS GetCapabilities Length Limitation

MapSuite Team,

I am working with a public WMS Server that has a very large GetCapabilities result string.

It is so large that the result string is truncated when the following is invoked:
string TheServerCapabilitiesXml = (TiledWmsLayer) TheTiledWmsLayer.GetServerCapabilitiesXml();

When I request GetCapabilities directly from a WebBrowser the entire result is displayed.

I know that the length is greater than 148,000 bytes.

Does MapSuite have a limit as to the number of bytes returned from GetCapabilities?

Thanks,
Dennis

Hi Dennis,

This API only return the cached capability XML file, I think the problem shouldn’t been in this API.

You can visit this path: %temp%\MapSuite\TiledWmsRasterLayer to get your cached capability file and watch whether it’s also be truncated.

And we hadn’t found a test WMS capabitlity to reproduce it, if possible please sent us the test sample about it.

Regards,

Ethan

hi Ethan,

As you suggested I found the file containing the cached capability and found it to contain the entire expected capabilities.

It would appear that the GetServerCapabilitiesXml() method is not returning everything that is cached. I even converted from a plain String to StringBuilder and have same issue. The maximum length that the method returns is 147,445 bytes.

What are your thoughts?

Thanks,
Dennis

Hi Dennis,

Thanks for your information, it’s proved a bug today, our developer should had fixed it.

Please get this package https://www.nuget.org/packages/ThinkGeo.MapSuite.Layers.TiledWms/11.0.0-beta010

It will valid for download in one days after Nuget get refresh.

Regards,

Ethan

Ethan,

Good news! I updated with the latest beta for TiledWms and now I receive the entire 150,064 bytes of the Capabilities.

Thanks,
Dennis

Hi Dennis,

I am glad to hear that works.

Thanks for your update.

Regards,

Ethan