I'm working on an old project that has ASMX web services. The consumer client uses this web service as a web reference. This all works fine except that the web service doesn't expose any interfaces, only concrete classes.
I added an interface to one of the asmx web services, but it seems like that the interface isn't available when I update my web reference on the client app.
Is it even possible to expose an interface from ASMX web services?
Related
I have a WCF Service, and I need know it ,is possible consume form an ajax client?
The extension of the workflow files that I intend to consume are of type .xaml
WCF Xaml-based WF Services are exposed as SOAP based services, so ajax client can work out, but it would be very difficult to construct the payload. I would recommend to create a thin layer of webapi that can accept json and interact with WCF service.
Description:
I have an client app consuming a WCF service, both runing on .NET Core and hosted as web apps in Azure.
The client has access to an interface that the service implements as its DataContract.
Currently I consume the service via creating a ChannelFactory based on an DataContract of the WCF service.
Because lots of reasons I'd like to move away from WCF.
My first idea was to convert the WCF service to a Web API and implement something like OpenAPI (Swagger) and from there consume the API via generated docs.
However I can't really find anything similar to the way you would consume a WCF contract and then be able to call upon its methods.
Question:
Is it possible o use a shared interface between the consumer and a Web API in a way that enables me to call upon the methods (routes) in that interface? Be it using OpenAPI (Swagger) or any other framework/lib/or otherwise.
Please let me know if anything is unclear and I'll add info, I'm aware its a somewhat broad question.
I have an ASMX web service which is being called using Soap protocol. The service is using request / response types from one of our shared projects.
The project that consumes this service is also using the shared project. Now, I want that the reference that's been used in the project for that service should reuse the types being used in the shared project.
If that is not possible then can we inherit the service from an interface and then the wsdl tool can generate the implementation of the interface by inheriting from required classes?
Will WCF be an alternative?
I'm working on .NET, I want to write an interface on web service for my clients(multi client) so they can inherit from my interface to make their own web service, and I can call their web service dynamically.
Is there any way to make it?
Thanks.
Edit:
Because I'm new on web service. I will make it more clear.
I want all my customer's web sevice have same method.
I have several cuatomers. I want to have some object or interface from my web site so they can inherit from it.
I can store their web service's URL to database, and I can call their service dynamically.
So, how to do it?
It is very simple, you don't need to do anything in terms of inheritance really, that's the basic premise of web services.
Just create a dummy web service of your own (You can use this one for testing as well to return test values) and give URL to your customers.
They can all get the specs (basically they just need to add "?WSDL" at the end of your test web service) and get WSDL which they should implement into their own web service.
If that test web service is internal to your network you can simply get WSDL yourself and email it to them.
Once they all implement this web service, you can just connect to theirs and it will behave exactly the same.
I have used the AJAX Enabled WCF Service template from within a web application. By adding a Service reference to the scriptmanager, some client objects are generated allowing me to easily consume the service. My question is can I do anything like that when I use a WCF Service Library? I added the project to my solution and in my web app I added a service reference to the service. This is where I get a bit stuck. What do I do now to allow consuming the service from the client.
So, just to consume wcf service, you have to use "svcutil" app from VS pack to generate o proxy class, which is very simple in usage.