-
Notifications
You must be signed in to change notification settings - Fork 558
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
Support TransportWithMessageCredential in dotnet-svcutil #3969
Comments
@johnpenmanweb We believe this is a known issue, @dasetser has the details, Daniel could you provide the information regarding this issue? |
@johnpenmanweb Can you provide the wsdl for this service? From the output it looks like we can't find any endpoints that we think are compatible with .NET Core. We also output a warning that we can't import a binding because when importing a SecurityBindingElement we run into something that isn't implemented. It would be helpful to know what the binding looks like. You mention that it may be related to the TransportWithMessageCredential issue, are you trying to use a service that uses this security mode? It's part of the runtime code, but we're still looking into what is needed to support generating a proxy with dotnet-svcutil for services that are using it. |
I am also facing the same issue, we have an existing webservice that asks for WSSE security policy (wsse:UsernameToken) on it, when trying to add it as a ServiceReference, on dotnet 3.1.100-preview3-014645, it throws below error:
|
@se7vanj Thanks for the additional information. We have identified the problem and will be working on a fix for the tooling in an upcoming release. |
I have a similar problem but using the VS 2019 Preview WCF ... Provider wizard, which generates code with the warnings in #2933 :
Many Build Errors like:
Do I need to add a dependency on Microsoft.Windows.Compatibility? Would you like the publicly available WSDL definition that I used? |
@OzBob Yes, if you can provide the WSDL that would be helpful. Feel free to send it to me in an email (dasetser at microsoft.com) if you would prefer not to post it here. |
I'm having an issue too. My project was building fine, but all of a sudden I get over 3K of violations like this:
I'm using VS2019 with .NET Core 3.1. Any ideas? |
@RealDotNetDave, that's unrelated. You are having a compilation reference problem. When applying an attribute, you don't need to provide the full attribute type name. You can optionally choose to exclude the suffix |
@RealDotNetDave In addition to Matt's comment it's possible the tool failed to add the System.ServiceModel.* package references to your project when it ran. If that is the case please open a new issue and include information about whether it fails in your environment even on a default .NET Core console app or if it's specific to your csproj (and if it's specific to your csproj it would help if you could narrow down what's causing the problem or provide the file so we can take a look). |
@RealDotNetDave FYI I followed up with @OzBob through email. For him the restore was running into problems because of a nuget source that was failing (in his case the Windows Template Studio source). The workaround was to disabled all nuget package sources except nuget.org, then the restore and build succeeded. This is unrelated to the initial issue reported by @johnpenmanweb, so to not distract from this thread any further please open a new issue if you need any more help with this. After looking at a wsdl provided for the original issue I believe this is due to the dotnet-svcutil tool not supporting TransportWithMessageCredential, which was added to WCF Core in 3.0. I've modified the title of this issue to be specific to that, and we'll investigate what's needed for it to support this. |
Thanks for the info. I don't use the wizard in Visual Studio since I can't configure the namespace or the output file for the service proxy. Instead, I use dotnet-svcutil. So I created a blank project and used the Wizard to figure out the references. I just want to verify that these are the required packages:
Thanks, |
You are missing |
It does build fine without Primitives. Should I include it anyway? What is really strange is that I could not build this project without those for packages, but someone else on my team could build it. |
@RealDotNetDave @mconnew the Primitives is a dependency of the Http package (and others), nuget should be downloading it without an explicit project reference, https://www.nuget.org/packages/System.ServiceModel.Http/ When I run my Test project Primitives and Http etc DLLs are in the \bin\Debug\netcoreapp3.1\ folder. |
I am trying to connect SAP web service in Blazor Core 3.1 app by Microsoft WCF Web Service Reference Provider. Here is error: XPath://wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:binding[@name='BINDING_soap12'] The following Policy Assertions were not Imported: XPath://wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:binding[@name='BINDING'] The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled. |
Same problem here with connecting to SAP as OP. Any news on svcUtil 2.0.3 or timespan? |
The 2.0.3 release is coming very soon. We are working on a last few items and plan on working on packaging and publishing by the end of the month. |
I think I have a problem that is related to this issue. I'm trying to add the following service to a .net core 3.1 project (with latest ServiceModel Nuget packages: 4.7.0) but one of the endpoint bindings is failing to be imported: It works fine in .NetFramework 4.7.2 |
the endpoint in question has the following profile
|
Dotnet-svcutil 2.0.3 release is focused on an open source effort. This will be included in dotnet-svcutil 2.0.4, which will be released as soon as we can afterwards. |
Is this related to #1257 ? |
Hello @dasetser, I have the same problem / error as @IgorLaktic . BR |
@HongGit would have a better idea than me on the timeline for future releases. |
Closing as TransportWithMessageCredential security mode is supported in dotnet-svcutil 2.0.3 release. |
it is still not supported or not all cases are supported, I just checked with NET6 and SvcUitl 2.0.3 {System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: The message could not be processed. This is most likely because the action 'http://www.id3global.com/ID3gWS/2013/04/IGlobalAuthenticate/AuthenticateSP' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding. --- End of inner exception stack trace --- at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.Se… |
Close as this is fixed. If the issue persists, feel free to re-open or open a new issue. |
Not sure if this is related to #8 or not but I am getting an issue when trying to add wsdl's from SAP. Wsdl works in .Net Framework 4.6 but fails in .net core 2.2.
Below is the verbose of dotnet-svcutil:
Warning: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
XPath: //wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:portType[@name='Z_RFC_VALIDATE_ADDRESS']
Warning: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
XPath: //wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:portType[@name='Z_RFC_VALIDATE_ADDRESS']/wsdl:operation[@name='ZRfcValidateAddress']
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:sap-com:document:sap:soap:functions:mc-style']/wsdl:binding[@name='Z_RFC_VALIDATE_ADDRESS']
Warning: Cannot import wsdl:port
Detail:
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:service[@name='Z_RFC_VALIDATE_ADDRESS']/wsdl:port[@name='Z_RFC_VALIDATE_ADDRESS']
Warning: No endpoints compatible with .Net Core apps were found.
[28032.222] Time elapsed: 00:00:21.1325156
[28032.355] Processing Code DOM ...
Generating files...
The text was updated successfully, but these errors were encountered: