简体   繁体   English

DataTypes XSD两个WSDL文件-类型'X'和X'都使用来自名称空间的XML类型名称'X'

[英]DataTypes XSD two WSDL files - Types 'X' and X' both use the XML type name, 'X', from namespace ''

I received two WSDL + XSD files and one xsd datatypes file from an organisation. 我从一个组织收到了两个WSDL + XSD文件和一个xsd数据类型文件。 Both WSDL file are imported/ used as (two) service reference(s). 两个WSDL文件都被导入/用作(两个)服务参考。

As soon as I serialize an object I am receiving the below exception: Types 'X' and X' both use the XML type name, 'X', from namespace Y. 序列化对象后,我立即收到以下异常消息:类型'X'和X'都使用名称空间Y中的XML类型名称'X'。

The problem is; 问题是; both WSDL files are using the same object/class of the xsd file. 两个WSDL文件都使用与xsd文件相同的对象/类。 How to solve this problem, without modifying the WSDL files? 如何在不修改WSDL文件的情况下解决此问题? Do I need to combine the WSDL files? 我需要合并WSDL文件吗? Or is it possible to point both WSDL files to some shared datatypes file? 还是可以将两个WSDL文件都指向某个共享数据类型文件?

if you need more information/ details, please write a comment. 如果您需要更多信息/细节,请写评论。

Thank you in advance. 先感谢您。

*I am using C#, Visual Studio 2015. *我正在使用C#,Visual Studio 2015。

Create a new WSDL file which imports both (received) WSDL files. 创建一个新的WSDL文件,该文件将同时导入(接收)两个WSDL文件。

Note: The WSDL and XSD files need to be in the same directory. 注意:WSDL和XSD文件必须位于同一目录中。

Example

<?xml version="1.0" encoding="utf-8"?>
<definitions  xmlns="http://schemas.xmlsoap.org/wsdl/">
    <import location="LOCATION WSDL1"/>
    <import location="LOCATION WSDL2"/>
</definitions>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 类型&#39;X&#39;和X&#39;都使用来自命名空间&#39;&#39;的XML类型名称&#39;X&#39;。 使用XML属性为类型指定唯一的XML名称和/或命名空间 - Types 'X' and X' both use the XML type name, 'X', from namespace ''. Use XML attributes to specify a unique XML name and/or namespace for the type 如何解决“都使用 XML 类型名称 X,使用 XML 属性为类型指定唯一的 XML 名称和/或命名空间”? - How to solve “Both use the XML type name X, use XML attributes to specify a unique XML name and/or namespace for the type”? XML序列化错误:2种类型都使用XML类型名称“关系”,来自命名空间&#39;&#39; - XML Serialization error: 2 types both use the XML type name, 'Relationship', from namespace '' 找不到类型或名称空间名称“ X” - The type or namespace name 'X' could not be found 找不到类型或名称空间名称X - The type or namespace name X could not be found 将解决方案从MVC 3.x升级到MVC 5.2.3:类型或名称空间名称“ Mvc”在名称空间“ System.Web”中不存在 - Upgrading solution from MVC 3.x to MVC 5.2.3: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' 在Windows Phone 8.x项目中找不到UserControl:“名称空间中不存在类型或名称空间名称&#39;UserControls&#39;” - UserControl in Windows Phone 8.x project can't be found: “The type or namespace name 'UserControls' does not exist in the namespace” 如何解决“名称空间Y中不存在类型或名称空间名称X”的错误? - How do I fix error saying “The type or namespace name X does not exist in the namespace Y”? 命名空间“Y”中不存在类型或命名空间名称“X” - 在 VS 生成的代码中 - The type or namespace name 'X' does not exist in the namespace 'Y' - in VS generated code 名称空间“using:Y”中不存在名称“X” - The name "X" does not exist in the namespace "using:Y"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM