I am trying to add a service link for my (.NET 4.6) project.
When I select Add Service Reference
and add the WSDL URL, I see that it is correctly detected:
I unchecked the Reuse types in all referenced assemblies
checkbox, as shown below:
But when I click OK
, I get three warnings in the Error List window:
Warning 1 Warning about a custom tool: cannot import wsdl: portType Details: when starting the WSDL import extension, an exception was thrown: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: Failed to create object of type "System.Xml.Serialization.StructMapping" for input "System .Xml.Serialization.MembersMapping ". XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http://bik.pl/cc/big '] / wsdl: portType [@ name = 'BIG']
Warning 3 Custom Tool Warning: Cannot import wsdl: port port Detail: A wsdl: binding import error occurred on which wsdl: port depends. XPath to wsdl: binding: // wsdl: definitions [@targetNamespace = ' http://bik.pl/cc/big '] / wsdl: binding [@ name = 'BIGBinding'] XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http://bik.pl/cc/big '] / wsdl: service [@ name = 'BIG'] / WSDL: port [@ name = 'BIG']
Warning 2 Custom Tool Warning: Cannot import wsdl: binding Detail: A wsdl: portType import error occurred, depending on wsdl: binding. XPath to wsdl: portType: // wsdl: definitions [@targetNamespace = ' http://bik.pl/cc/big '] / wsdl: portType [@ name = 'BIG'] XPath to Error Source: // wsdl: definitions [@targetNamespace = ' http://bik.pl/cc/big '] / wsdl: binding [@ name = 'BIGBinding']
I tried different options when importing, but I get these errors all the time.
I checked WSDL with www.wsdl-analyzer.com but did not find an error:
Here is the quality report: https://www.wsdl-analyzer.com/qualityReport/show/1784995829?version=1
SoapUI correctly shows all operations, and I can make them from SoapUI, but I need to add a link to my project in Visual Studio.
Below are links to WSDL and XSD:
https://wasstt.infomonitor.pl/39D97477-0709-455f-A7C8-6498B600AC5A/ws/BIG/WEB-INF/wsdl/dluznik.wsdl
https://wasstt.infomonitor.pl/39D97477-0709-455f-A7C8-6498B600AC5A/ws/BIG/WEB-INF/wsdl/dluznik.xsd
How can I import this WSDL into my project? I cannot change the structure of this WSDL, so I have to use it as is.
EDIT: I installed XMLSpy and opened WSDL. After opening, I received a message stating that WSDL is valid.