0
votes

I am trying to add a WCF service Reference through a .wsdl file but I keep getting an "Add Service Endpoint Error"

Full error:

The input path 'C:\Users\user\OneDrive\Documenten\Registration_protocol_v1.xsd' doesn't appear to refer to any existing files The directory 'C:\Users\user\errors\v1' could not be found. Verify that the directory exists and that you have the appropriate permissions to read it. Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://url.be/registration/v1']/wsdl:binding[@name='RegistrationSOAPBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://url.be/registration/v1']/wsdl:service[@name='RegistrationService']/wsdl:port[@name='RegistrationSOAP11'] Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://url.be/registration/v1']/wsdl:portType[@name='RegistrationPortType'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://url.be/registration/v1']/wsdl:binding[@name='RegistrationSOAPBinding'] Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Schema with target namespace 'http://url.be/registration/v1' could not be found. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://url.be/registration/v1']/wsdl:portType[@name='RegistrationPortType']

Any ideas on how I fix this so I add the Service References?

1
url.be/registration/v1 gives me a 404 error. Post some of your code as well, what's the full url of the WSDL?Mikael
I sadly can't share the actual correct link but that one gives me a 404 error as well. I have no code added yet since I haven't been able to add the referenceTheremy

1 Answers

0
votes

Can you access the service WSDL page in your browser properly? it seems that there is something wrong with the service. otherwise, we can access the service start page at least.
enter image description here
Besides, please ensure there is no problem with the network connectivity, such as firewall settings, anti-virus software, local HOSTS file.
If we can access the WSDL, we can also take advantage of SVCUtil.exe tool to generate the client proxy.
https://docs.microsoft.com/en-us/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe
Feel free to let me know if the problem still exists.