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
SOAP support in all platforms #9838
Comments
|
I don't know when or if .NET will support this, so an alternate would be if there was an Open Source library that is .NET Core compatible that could be used. |
|
WRT a delivery vehicle, given that this is not a core scenario (anymore), I think making it availables as a module on PSGallery makes more sense. The trickier bit is getting the underlying .NET classes that PowerShell requires ported to Core. It might be helpful to open an issue in the .NET Core repository requesting this functionality. |
:-) And answer will
Although they could make a standalone package with the API. |
|
Agree with @BrucePay, making it a standalone module makes sense regardless if we ship it with PowerShell package. Long term plan has been to have less cmdlets/modules ship with PowerShell and have them independently maintained, updated, and published on PSGallery. |
|
In light of the news about PowerShell 7 trying to unify the fork and get us back on one version of PowerShell I came looking to see if New-WebServiceProxy was going to be addressed and found this issue. I use New-WebService proxy to communicate with things like Adobe InDesign Server, Adobe Scene 7 Dynamic Media classic, ConnectShip Progistics (apis for shipping packages via Fedex, USPS, UPS, etc.), and in the past used this for managing Cisco Unified Communications Manager (and all the other on premise Cisco Collaboration tools). Being able to quickly work with SOAP APIs is an important piece of the puzzule to enable System Administrators to automate a wide array systems they come in contact with using PowerShell. |
|
@ChrisMagnuson Thanks for your feedback! Based on MSFT team suggestion could you please clarify - do you ready to grab this in separate community project? |
|
Now that .NET Team has announced a community project for WCF support, this may be viable. Haven't looked to see how complete it is. If there is interest by the community to talk this forward, I can create a public repo for you to use. |
|
In the article they mention “NET Core WCF Client“. Given that in powershell we are acting as a soap client could that be used? Googling for that name didn’t come back with something that matched that exactly, maybe this is what they are referring to: https://github.com/dotnet/wcf |
|
@ChrisMagnuson I believe the right repo is https://github.com/CoreWCF/CoreWCF |
|
@ChrisMagnuson and @SteveL-MSFT, I've done some more digging into this topic from the perspective of a couple of repositories I've in mind and mentioned on my original post. The CoreWCF repo allows a soap client to function based on two requirements and their respected issues.
In the past, I've had already implemented an equivalent of the
$wsImporter=New-WcfWsdlImporter -Endpoint $svcEndpoint -HttpGet
$proxyType=$wsImporter | New-WcfProxyType
$endpoint=$wsImporter | New-WcfServiceEndpoint -Endpoint $svcEndpoint
$channel=New-WcfChannel -Endpoint $endpoint -ProxyType $proxyTypeThis is full WCF and hence it supports the most complicated bindings as they are described in the wsdl endpoint. Problem is that the necessary .net types are not implemented in the CoreWCF and I'm not sure if they are going to. So, I considered a different approach. I've considered packaging I wonder is someone has some more insight about the source of |
|
@Sarafian See PowerShell/src/Microsoft.PowerShell.Commands.Management/commands/management/WebServiceProxy.cs Line 38 in bd6fdae
|
Thanks @iSazonov . The workhorse in the
Has anyone ever tried to convert its code to .NET standard? I'm more and more convinced that this is .NET team issue and maybe the PowerShell team can put an extra word 😄 . I hope the new WCF in .net core 3, shares similarities in terms of features with |
|
@Sarafian Unfortunately, I don't see .NET team treating this as a priority at all which is why they invested in the CoreWCF project (even if incomplete). They are investing in REST and gRPC. We're doing some work in PS7 to make it more seamless using Windows PowerShell modules, so perhaps we can make it easier to call Windows PowerShell's |
@SteveL-MSFT thanks for reaching out and clarifying. It is expected what you said.
That would solve homogenity within the powershell experience, because the current way of executing windows specific modules with implicit remoting is really not good. Anyhow, this will not solve azure function with powershell, unless the functions teams decides to "strengthen" the powershell support. |
|
Azure Functions can run on a Windows sandbox which contains Windows PowerShell. Even today, you could from PSCore6 call out to powershell.exe to run whatever Windows PowerShell pipeline you need. |
Hmmm didn't know that. This is in general good news. Potential problem is that with every Thanks @SteveL-MSFT . |
|
I was looking for a way to mirror New-WebServiceProxy on linux powershell (to consume SharePoint soap services), and dotnet-svcutil seem to be a good option. It's not generating client automagically like windows powershell, but actually doing this manually might be even better approach in many cases (you just generate client code once and then reuse it). Below are some notes to get started (if not familiar with this tool) To generate cs file with client definition, install dotnet sdk 2 (it's not compatibale with v3 yet, but you can have both), then install the tool itself (dotnet tool install --global dotnet-svcutil) and create some dummy app (dotnet new console) Once type is loaded you should instantiate Client object. Type name likely will be "ServiceName" + "SoapClient", or something containing Client word. In case of SharePoint lists service: If there is no auth or you are on windows network with NTLM you are likely all set. Otherwise try to configure auth using $client.ClientCredentials property, or you can also use other constructor for the client: You can also use this constructor to consume same service from different endpoint. |
|
@mikeTWC1984 have considered wrapping everything in and generating proxies dynamically like it is done in the WcfPS module? It uses .net classes that normally the wsdl importers use to generate the service references but instead of saving in file it compiles in memory. |
|
@Sarafian is WcfPS compatible with powershell core, at least with Windows version? |
|
|
Please add this |
|
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
2 similar comments
|
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
|
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
|
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
Summary of the new feature/enhancement
Currently, the only way to consume a SOAP API from PowerShell 6 or higher, is to render manually the XML envelopes and do a POST with
Invoke-RestMethod. Before PowerShell 6, there wasNew-WebServiceProxywhich managed to provide some of the WS* standards and worked quite well with most simple SOAP interfaces. When this was not enough, one could fall back to coding in C# leveraging theSystem.ServiceModelassembly which unfortunately is not ported to .NET Core and therefore it is not an alternative in PowerShell 6 or higher.SOAP is not as dead as some people proclaim. Yes, it is not the current choice, but there are so many established API in SOAP, that makes it still alive. The one I've most recently encountered is the Amadeus which is used in the travel industry extensively and it doesn't seem to be going away soon. The travel industry, banking and insurance sector are known for keeping what works and for this reason the existing SOAP endpoints will not go away anytime soon. This makes PowerShell effectively a non-suitable scripting language and it shouldn't be.
SOAP support was already there and needs to become available again for all platforms.
Use cases I can think of are:
Proposed technical implementation details
I think that this is not a PowerShell issue alone and support from the .NET team is required to port some of the missing APIs and assemblies and support the otherwise known WCF on other platforms.
Notice that on the roadmap announcement for .NET 5, many comments are about the missing support for WCF and there is quite a recognizable frustration.
Known repositories currently blocked from PowerShell 6
I've added some repositories that I've been in involved with over the last years when working with SOAP interfaces.
New-WebServiceProxyto drive SOAP clients and this one blocks it from PowerShell 6. The remark is available here as well.System.ServiceModelandSystem.IdentityModelassemblies. It generates in memory proxies but it can support even federated authentication (WSTrust 1.3) which is not available in PowerShell. The dependency on theSystem.ServiceModeleffectively blocks it from PowerShell 6.System.ServiceModelandSystem.IdentityModelassemblies to leverage support for SOAP over federate authentications using WSTrust 1.3. The dependency on these assemblies blocks it PowerShell 6 and non-Windows based operating systems.The text was updated successfully, but these errors were encountered: