dotnet / wcf

This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.
MIT License
1.71k stars 560 forks source link

Error Adding Connected Service with dor net 2.2 #3335

Closed bilalmalik777 closed 5 years ago

bilalmalik777 commented 5 years ago

Hi,

I'm trying to use the "Add Connected Service" feature inside the VS2017 but I'm getting the following error message all the time. wcfcapture I am using dot net core 2.2 and visual studio versio is15.9.3

StephenBonikowsky commented 5 years ago

Thanks for reporting the issue @bilalmalik777 !

dasetser commented 5 years ago

@bilalmalik777 This sounds like a bug in the tool. Do you get this for every service you try to use the tool with (for example, on a newly created WCF Service project in VS)? Or is this specific to one service?

There are two things you could try that would help us see what's causing this so we can get this fixed: 1) Use the dotnet-svcutil command line tool to add this service reference to the project and add the "-v Debug" parameter. The output of this should help us see what's causing the error.

2) Alternatively, if this is specific to one service you're trying to use if you can attach the wsdl for us we can try reproducing it ourselves to investigate. You can append "?singleWsdl" to the service address to get the wsdl from a WCF service

bilalmalik777 commented 5 years ago

@dasetserI am facing this issue in case of dot net core but with dot net 4.6 its work perfectly. I will try the first option to find the exact error I cannot share anything with you relating to services because the client does not allow us to do that and services can only be accessed from client created VM.

joaopauloit commented 5 years ago

@bilalmalik777 This sounds like a bug in the tool. Do you get this for every service you try to use the tool with (for example, on a newly created WCF Service project in VS)? Or is this specific to one service?

There are two things you could try that would help us see what's causing this so we can get this fixed:

  1. Use the dotnet-svcutil command line tool to add this service reference to the project and add the "-v Debug" parameter. The output of this should help us see what's causing the error.
  2. Alternatively, if this is specific to one service you're trying to use if you can attach the wsdl for us we can try reproducing it ourselves to investigate. You can append "?singleWsdl" to the service address to get the wsdl from a WCF service

Hi @dasetser . See my stack trace:

[6752.872] Time elapsed: 00:00:00.7110734 dotnet sdk version:2.1.503 [6752.846] Time elapsed: 00:00:00.7469745 [6752.740] Time elapsed: 00:00:00.8546778 Attempting to download metadata from 'https://grupotecnoset--tst1.custhelp.com/services/soap/connect/soap?wsdl' using WS-Metad ata Exchange and HttpGet. [6752.846] Importing metadata ... Warning: Cannot import wsdl:binding Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Channels.StandardBindingImporter Error: The method or operation is not implemented. XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:binding[@name='RightNowSyncBi nding'] Warning: Cannot import wsdl:port Detail: XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:service[@name='RightNowSyncSe rvice']/wsdl:port[@name='RightNowSyncPort'] Warning: Cannot import wsdl:binding Detail: An exception was thrown in a call to a policy import extension. Extension: System.ServiceModel.Channels.SecurityBindingElementImporter Error: The method or operation is not implemented. XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:binding[@name='RightNowFedAut hSyncBinding'] Warning: Cannot import wsdl:port Detail: XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:service[@name='RightNowSyncSe rvice']/wsdl:port[@name='RightNowFedAuthSyncPort'] Warning: No endpoints compatible with .Net Core apps were found. [6752.846] Time elapsed: 00:00:12.3939735 [6752.240] Processing Code DOM ... Generating files...

It does not generate correct the service reference.

Can you help?

Tks

joaopauloit commented 5 years ago

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='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:binding[@name='RightNowFedAuthSyncBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:service[@name='RightNowSyncService']/wsdl:port[@name='RightNowFedAuthSyncPort'] Cannot import wsdl:binding Detail: An exception was thrown in a call to a policy import extension. Extension: System.ServiceModel.Channels.SecurityBindingElementImporter Error: An unsupported security policy assertion was detected during the security policy import: http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>http://www.w3.org/2001/10/xml-exc-c14n#</t:CanonicalizationAlgorithm><t:SignWith xmlns:t="http://d... XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_4']/wsdl:binding[@name='RightNowFedAuthSyncBinding']

dasetser commented 5 years ago

@joaopauloit It looks like you're having a different problem than the one reported in this issue. I'll follow up on issue #3371 which it looks like you filed for the problem you're having.

joaopauloit commented 5 years ago

@dasetser Okay

Tks

dasetser commented 5 years ago

@bilalmalik777 Did you ever get a chance to try this with dotnet-svcutil's verbosity increased so we can find a callstack for this issue?

Lxiamail commented 5 years ago

Closing the issue for now. @bilalmalik777 Please feel free to reactivate the issue with additional information that Daniel suggested if you still need help.