Last post Apr 05, 2019 06:52 PM by Aslee
Apr 02, 2019 03:26 PM|Aslee|LINK
When I try to add a reference of a web service to my .Net Core project, I get an error "Error importing wsdl: binding on which depends wsdl: port.
XPath to wsdl: binding".
but if the web service is WCF no. I'm missing some package?
Apr 03, 2019 05:39 AM|Xing Zou|LINK
How do you import your asmx service?Do you use the WCF Web Service Reference Provider Tool?
You need to develop asmx Service in Asp.net project, and then call it from Asp.net Core.I test it and it works well.
Could you explain more details about what you have done or share a reproducible project to us?
Apr 03, 2019 12:04 PM|Aslee|LINK
I discovered what the error was, this is when the HTTPGET and HTTPPOST protocol are active in the asmx web service. but now when I do the web service reference at the end, it throws this error.
"Unable to generate deps.json; it may have already been generated. To obtain a diagnostic output, specify the "-d" option in front of the tool name (for example, "dotnet -d <toolname>": C: \ Program Files \ dotnet \ sdk \ 2.2.104 \ Sdks \ Microsoft .NET.Sdk
\ targets \ GenerateDeps \ GenerateDeps.proj"
Apr 04, 2019 02:43 AM|Xing Zou|LINK
I'm not sure why that would fail since it is a general error.
Have you tried to installed
svcutil tool ?
Could you provide the output of running the tool with the "-d" parameter (dotnet -d svcutil) as it has suggested?
You could refer to below links which may help you:
Apr 04, 2019 05:19 AM|AddWeb Solution|LINK
if you want to use WCF on the client side with .NET Core, you can certainly do so. First, make sure you add the System.ServiceModel.Primitives and one of System.ServiceModel.Http (for the BasicHttpBinding/BasicHttpsBinding or NetHttpBinding/NetHttpsBinding
bindings, which includes SOAP and REST) or System.ServiceModel.NetTcp (for NetTcpBinding, a Windows-only binary protocol). Absent are named pipes, MSMQ and support for the WS-* specs.
A simple example is in order, first, the contract:
public interface IPingService
string Ping(string msg);
Then, the client code:
var binding = new BasicHttpBinding();
var endpoint = new EndpointAddress(new Uri("http://server/PingService.svc"));
var channelFactory = new ChannelFactory(binding, endpoint);
var serviceClient = channelFactory.CreateChannel();
var result = serviceClient.Ping("Ping");
Please Refer link for more understanding.
Apr 05, 2019 06:52 PM|Aslee|LINK
Thank you very much for the information.
I leave here as I gave my problem solution, install dotnet-svcutil and I assure you that it had "dotnet tool list -g".