-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to add wcf web service to netstandard2.0 class library project #5721
Comments
I am not able to attach wsdl file as attachment here, so added it as comment below. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have been trying to add an existing WCF service (wsdl) to netstandard2.0 project and getting the following error. Not sure how to get over this issue. Any help is greatly appreciated.
To Reproduce
Steps to reproduce the behavior:
Project -> Add -> Connected Service -> WCF Web Service
Error Details:
Cannot import wsdl:port\r\nDetail: \r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:service[@name='Shortener']/wsdl:port[@name='ShortenerPort']
Cannot import wsdl:binding\r\nDetail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.\r\nXPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:portType[@name='ShortenerPortType']\r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:binding[@name='ShortenerBinding']
Cannot import wsdl:portType\r\nDetail: The ':' character, hexadecimal value 0x3A, cannot be included in a name.
Parameter name: name\r\nXPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:portType[@name='ShortenerPortType']
svcutil output given below
PS C:\tylerdev\test> svcutil /t:code /o:ShortenerProxy.cs https://mymachine-app.corp.tylertechnologies.com:8447/tylercmedge/services/Shortener.wsdl
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.8.3928.0]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'https://mymachine-app.corp.tylertechnologies.com:8447/tylercmedge/services/Shortener.wsdl' using WS-Metadata Exchange or DISCO.
Error: Cannot import wsdl:portType
Detail: The ':' character, hexadecimal value 0x3A, cannot be included in a name.
Parameter name: name
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:portType[@name='ShortenerPortType']
Error: 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://www.tylertechnologies.com']/wsdl:portType[@name='ShortenerPortType']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:binding[@name='ShortenerBinding']
Error: 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://www.tylertechnologies.com']/wsdl:binding[@name='ShortenerBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.tylertechnologies.com']/wsdl:service[@name='Shortener']/wsdl:port[@name='ShortenerPort']
Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.
Expected behavior
I would expect to add the wcf reference to the the project.
Screenshots
Added above
Additional context
I am able to generate proxy using wsdl.exe file but not with svcutil or dotnet-svcutil or as connected Service to netstandard package.
The text was updated successfully, but these errors were encountered: