升级到 Magento Enterprise v 1.11.1 后无法生成服务引用

发布于 2024-12-22 03:09:11 字数 1261 浏览 1 评论 0原文

上周我们的 IT 团队从 Magento Enterprise 版本 1.11.0 升级到 1.11.1。从那时起,我无法再使用 Magento API V2 WSDL URL 在 Visual Studio 的 C# 项目中生成服务引用。没有显示错误,但过程失败并且没有生成代码。

为了尝试获取更多详细信息,我使用了 SVCUTIL.EXE(Visual Studio 2010 中包含的一个工具)来生成针对服务进行操作的 .NET 类,在这样做时,我遇到了许多架构验证错误。

输出片段...

尝试使用 WS-Metadata Exchange 或 DISCO 从“http://[domain]/index.php/api/v2_soap?wsdl=1”下载元数据。

正在生成文件...

错误:导出期间生成的架构存在验证错误: 来源: 行:44 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:Array”已声明。

错误:导出期间生成的架构存在验证错误: 来源: 行:50 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:Struct”已声明。

错误:导出期间生成的架构存在验证错误: 来源: 行:66 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:duration”已声明。

错误:导出期间生成的架构存在验证错误: 来源: 行:75 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:dateTime”已声明。

错误:导出期间生成的架构存在验证错误: 来源: 行:86 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:NOTATION”已声明。

错误:导出期间生成的架构存在验证错误: 来源: 行:96 列:4 验证错误:全局元素“http://schemas.xmlsoap.org/soap/encoding/:time”已声明。

问题

有其他人在升级到新版本的 Magento 后遇到过这种情况吗?我可以利用 Visual Studio 中的任何内容来获取有关错误的更多详细信息吗?据我所知,问题源于 Magento 服务提供的 WSDL。

感谢您提供的任何帮助。

Last week our IT team upgraded from Magento Enterprise edition 1.11.0 to 1.11.1. Since then, I can no longer generate a service reference in a C# project in Visual Studio using the Magento API V2 WSDL URL. No errors are shown but the process fails and no code is generated.

To try and get more details I used SVCUTIL.EXE, a tool that is included with Visual Studio 2010, to generate the .NET classes that act against the service and in doing so I get numerous schema validation errors.

Output snipet...

Attempting to download metadata from 'http://[domain]/index.php/api/v2_soap?wsdl=1' using WS-Metadata Exchange or DISCO.

Generating files...

Error: There was a validation error on a schema generated during export:
Source:
Line: 44 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:Array' has already been declared.

Error: There was a validation error on a schema generated during export:
Source:
Line: 50 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:Struct' has already been declared.

Error: There was a validation error on a schema generated during export:
Source:
Line: 66 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:duration' has already been declared.

Error: There was a validation error on a schema generated during export:
Source:
Line: 75 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:dateTime' has already been declared.

Error: There was a validation error on a schema generated during export:
Source:
Line: 86 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:NOTATION' has already been declared.

Error: There was a validation error on a schema generated during export:
Source:
Line: 96 Column: 4
Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:time' has already been declared.

Question

Has anyone else experienced this after upgrading to a new version of Magento? Is there anything in Visual Studio I can leverage to get more details about the error? As far as I can tell the problem originates with the WSDL provided by the Magento service.

Thanks for any help you can provide.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

血之狂魔 2024-12-29 03:09:11

我向 Magento 开具了支持票证,修复方法是启用 WS-I 合规性。为此,请转到

“系统”>“配置> Magento Core API 并将 WS-I 合规性设置为“是”

这解决了我的问题。

I opened a support ticket with Magento and the fix was to enable WS-I Compliance. To do so go to

System > Configuration > Magento Core API and set WS-I Compliance to Yes

This fixed my issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文