I'm working with a SOAP interface. The interface provider is having trouble getting me the full WSDL (long story). They have asked me to use svcutil.exe to generate everything I need. From what I can tell, svcutil.exe
requires windows - I don't have a windows box available
generates C# or VisualBasic
It'd be great if it could just spit out a WSDL. Or if there's something I can do from Linux, that would be great too.
Do I have any options from here, or do I just have to wait for the provider to get me the WSDL.
I guess the question is, given a URL and instructions to use svcutil.exe, how can I write code to use a SOAP service only using Linux?
If using linux you could save it via curl
curl url > service.wsdl
so to get a weatherForcast WSDL
curl http://www.webservicex.net/WeatherForecast.asmx?WSDL > weatherForcast.wsdl
#grantk has already demonstrated the easiest method: if you know where the WSDL is hosted, you can simply fetch the document using your tool of choice.
But as you asked specifically about using SVCUtil: you could find a windows box, use SVCUtil to fetch the WSDL, and then return to your linux (and Java?) stack and generate client proxies from that WSDL to call the service using your web service framework of choice.
If the target service supports WS-MetadataExchange or XML Web Service Discovery, SVCUtil will locate and download the WSDL for you: see this HowTo on Microsoft's MSDN web site.
Using the weather forecast service example that #grantk used, you can ask SVCUtil to query the service and download metadata as follows:
svcutil /t:metadata http://www.webservicex.net/WeatherForecast.asmx
(I'm sure there are similar tools to do this using WS-MetadataExchange in the linux world, but my experience is with SVCUtil.)
Related
I'm starting to wonder whether this is the right tool for the job, still here goes.
I'm attempting to automate the creation of our Azure Test environment using Azure SDK for JS. The environment spans many services (as you can imagine), including Classic ASP.NET app services.
Node is my safe space, so that is why I started with the JS SDK.
I have started scripting the creation of an app service using WebSiteManagementClient.webApps.createOrUpdate. I'm confused though, there is seemingly no way to configure any of the following:
Which app service plan the app service should be connected to. This feels fundamental.
The operating system, Windows or Linux.
The stack version, .NET 4.8, .NET Core, or whatever.
Is it possible to configure the above using the JS SDK, or am I going to have find another approach?
Update 23/03/21
Untested, but these are my findings so far:
App Service Plan - The plan is set using the serverFarmId property of the Site interface.
Operating system - Assuming Windows as the default, if you want a Linux app service, you change the kind property of Site from app, to app,linux.
Stack & version - In the SiteConfig interface, you have linuxFxVersion and windowsFxVersion. Again, I think the assumption is 'latest .NET' (e.g. .NET 4.8). For .NET Core 3.1, the setting looks to be DOTNETCORE|3.1.
It can be achieved using js SDK. I checked the source code and it is ok. But I don't recommend to use js sdk to do this.
Because you need to call the SDK, there are many internal logics that you need to code. This will waste a lot of your time. So I recommend you to use restapi.
The restapi method name is similar to the naming in the SDK, mainly because you can test api interfaces online to achieve the functions you want. So you can selectively choose the method you want to achieve the function you want.
Official doc
Web Apps - Create Or Update
As for your concerns, you only need to write all the configuration in json format and put it in the request body.
Tips:
First use the online interface, encode the json format, create a webapp according to your needs, and then integrate it into your code.
I've recently switched jobs from a AWS shop to an Azure shop, both using dotnet. AWS publishes Amazon.Lambda.AspNetCoreServer, which is a magic Nuget package that allows you to write a plain ol' ASP.NET core Web API and deploy it as into a lambda with only a few lines on config. I really loved this pattern because it allows developers to just write a normal web api without having the host runtime leak into their coding.
Does anything like this exist in Azure? Even something that is community supported? Or is there some any way to achieve something like this in Azure Functions?
Unfortunately there is no simple way to do that since Azure function format is a bit different.
[FunctionName(nameof(GetAll))]
public IActionResult GetAll([HttpTrigger("get", Route = "entity")]HttpRequest request)
Then it will generate json with meta data for AF.
If you wish to host pure .net core without any changes I would look into Containers option
PS0: Theoretically it would be possible to do it with little bit of reflection. For instance you create project with all your Asp.Net core apis, which you can use in asp.net core hosting. Then you write tool which grabs your dll and using reflection you find all actions in your controllers and generate code for AF
PS1: Have a look https://github.com/tntwist/NL.Serverless.AspNetCore
Does anyone have experience, information or some (coding) examples about a solution to establish a connection between the appserver of progress and node.js!? The aim is to create REST-Services to the db which can be accessed by the web like an angular-app.
Thanks for any advice
Christian
Starting with 11.2 (and enhanced in later versions) you can create REST-based applications utilizing the AppServer as a platform. ProDatasets are used as output (they convert easily to xml and/or json).
This is all explained in the Web Services part of the documentation. I'm providing a link below.
Basic steps
You need to consult the manual for all these steps...
Create an ABL program with input parameters (could be a parameter, a temp-table or a dataset) and and a single output parameter (could be a temp-table, a dataset or a single character or longchar parameter).
Add ABL-specific REST annotation to the program
Map the parameters in OpenEdge Studio
Setup REST agents with the restman utility
Export a "WAR-file" and deploy your webservice.
Calling the web service from node.js should be no greater problem than calling any REST based web service.
In versions prior to 11.2 you can "fake it and make it" utilizing WebSpeed. You can create a webspeed program that read parameters from the query-string (using get-field()) and then writes a response to the "webstream". Use either the WRITE-XML or WRITE-JSON methods on a temp-table or a dataset for writing the result. Don't forget to add a good MIME type though... This might not be as robust and customizable but it will work...
OE 11.4 Product Documentation - Web Services See chapter "II Creating OpenEdge REST Web Services"
These might also be useful:
OE 11.4 Product Documentation - Working with XML
OE 11.4 Product Documentation - Working with JSON
My team and I are currently doing a Worklight mobile project. One of our requirements is to retrieve data from MS CRM and Sharepoint via web service calls. The authentication mechanism that we are to make use of is Kerberos / Spnego.
We followed the instructions documented here, where we inserted the following into our HTTP adapter:
<authentication>
<spnego stripPortOffServiceName="true"/>
</authentication>
In addition, as mentioned in the same IBM site we have included the krb5.conf file into the ../server/conf directory in the project files.
However after invoking the adapter procedure, we encountered an error:
Runtime: Failed to create Kerberos login context
As there are very limited documentation around regarding Worklight working with Kerberos, we were unable to solve this issue. Hence we would like to seek for some help on this community. Is there something that we missed out on?
Unfortunately this type of configuration is not tested often at all and there are no more documentation on this subject matter. This will be discussed to see if documentation and testing can be improved.
The workaround that is currently used (by Desmond) is to continue using NTLM instead.
I have written an application in nodejs/ravendb using node-ravendb (https://github.com/mattdaly/node-ravendb).
Now I want to find good hosting for it and i realize that I don't have much to choose from.
The only cloud-based hosting service that i have found that works with both RavenDB and NodeJS is Appharbor.
But when i try to use it with node-ravendb I find that node-ravendb only uses username/password for authentication and Appharbor wants to use APIKEY instead.
Can I make node-ravendb use APIKEY or is there another way?
Is Appharbor really my only alternative? I am also wondering if using RavenDB with nodejs is a good idea since it does not seem like a common configuration. Can anyone comment on that?
This isn't supported out of the box AFAICT. You'd need to modify node-ravendb to use API key.
Another option, since you mentioned cloud providers: why not just run a virtual machine in Azure, and install and run anything you want? Then you don't have to futz with node-ravendb source code or API keys.