I'm trying to use xsd.exe to create a c# class. In particular I'm trying to use http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.xml to generate the xsd to then generate the class. I managed to get a class from the 1.3.0 version of the specification via xsd.exe in windows command line but when I try to do the same for this version I get a proxy authentication error like below.
我正在尝试使用xsd.exe来创建一个c#类。特别是我正在尝试使用http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.xml生成xsd然后生成类。我设法通过Windows命令行中的xsd.exe从规范的1.3.0版本中获取一个类,但是当我尝试对此版本执行相同操作时,我得到了代理身份验证错误,如下所示。
Does anyone know why I would be getting this error when I didn't for the other translation? Also if it really is my proxy blocking xsd then how do I tell xsd to use my credentials for http requests?
有没有人知道为什么当我没有进行其他翻译时我会收到此错误?此外,如果它真的是我的代理阻止xsd那么我怎么告诉xsd使用我的凭据来获取http请求?
![Proxy error image][2]
![代理错误图片] [2]
Let me know if you need more information. Thanks for your time in advance
如果您需要更多信息,请与我们联系。感谢您提前的时间
[2]: http://i.stack.imgur.com/CIbHM.jpg
EDIT: The image doesn't seem to be working for me so I'll just write the error message -
编辑:图像似乎不适合我,所以我只会写错误信息 -
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin>xsd.exe capabilities_1_1_1.xml
C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin> xsd.exe capabilities_1_1_1.xml
Microsoft (R) XML Schemas/Datatypes support utility [Microsoft (R) .NET Framework, Version 2.0.50727.3038] Copyright (C) Microsoft Corporation. All Rights Reserved. Error: There was an error processing 'capabilities_1_1_1.xml". - The remote server returned an error: (407) Proxy Authentication Required.
Microsoft(R)XML模式/数据类型支持实用程序[Microsoft(R).NET Framework,版本2.0.50727.3038]版权所有(C)Microsoft Corporation。版权所有。错误:处理'capabilities_1_1_1.xml“时出错。 - 远程服务器返回错误:(407)需要代理验证。
If you would like more help, please type "xsd /?".
如果您需要更多帮助,请输入“xsd /?”。
1 个解决方案
#1
0
For this one I figured out that the WMS.xml provided by the OGC does NOT have all it's namespaces working correctly. In particular one of the URL references (http://www.digitalearth.gov/wmt/xml/capabilities_1_1_1.dtd) does NOT exist anymore which was confusing my network hence returning a 407 proxy authentication required error.
对于这个,我发现OGC提供的WMS.xml并没有让它的所有命名空间正常工作。特别是其中一个URL引用(http://www.digitalearth.gov/wmt/xml/capabilities_1_1_1.dtd)不再存在,这使我的网络混淆,因此返回407代理身份验证所需的错误。
THE SOLUTION:
Change the DTD referenced in OGCs capabilities.xml file to point to the DTD on their website. Why it doesn't already point to that by default I DO NOT KNOW. digitalearth.gov looks like it's been down since 2006 so it's very old. Anyway once the reference for the DTD was changed I was able to create the XSD and c# class with ease.
更改OGCs capabilities.xml文件中引用的DTD以指向其网站上的DTD。为什么它没有指出默认情况下我不知道。 digitalearth.gov看起来自2006年以来一直在下降所以它已经很老了。无论如何,一旦更改了DTD的引用,我就能够轻松地创建XSD和c#类。
#1
0
For this one I figured out that the WMS.xml provided by the OGC does NOT have all it's namespaces working correctly. In particular one of the URL references (http://www.digitalearth.gov/wmt/xml/capabilities_1_1_1.dtd) does NOT exist anymore which was confusing my network hence returning a 407 proxy authentication required error.
对于这个,我发现OGC提供的WMS.xml并没有让它的所有命名空间正常工作。特别是其中一个URL引用(http://www.digitalearth.gov/wmt/xml/capabilities_1_1_1.dtd)不再存在,这使我的网络混淆,因此返回407代理身份验证所需的错误。
THE SOLUTION:
Change the DTD referenced in OGCs capabilities.xml file to point to the DTD on their website. Why it doesn't already point to that by default I DO NOT KNOW. digitalearth.gov looks like it's been down since 2006 so it's very old. Anyway once the reference for the DTD was changed I was able to create the XSD and c# class with ease.
更改OGCs capabilities.xml文件中引用的DTD以指向其网站上的DTD。为什么它没有指出默认情况下我不知道。 digitalearth.gov看起来自2006年以来一直在下降所以它已经很老了。无论如何,一旦更改了DTD的引用,我就能够轻松地创建XSD和c#类。