I received two WSDL + XSD files and one xsd datatypes file from an organisation. Both WSDL file are imported/ used as (two) service reference(s).
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.
The problem is; both WSDL files are using the same object/class of the xsd file. How to solve this problem, without modifying the WSDL files? Do I need to combine the WSDL files? Or is it possible to point both WSDL files to some shared datatypes file?
if you need more information/ details, please write a comment.
Thank you in advance.
*I am using C#, Visual Studio 2015.
Create a new WSDL file which imports both (received) WSDL files.
Note: The WSDL and XSD files need to be in the same directory.
Example
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/">
<import location="LOCATION WSDL1"/>
<import location="LOCATION WSDL2"/>
</definitions>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.