This question already has answers here:
Calling WCF Service from MS Access
(2 answers)
Closed 7 years ago.
We have a WCF Service and now we are having to suppor tit in backward compatibility mode. One of the consumer turns out to be an Access Application. Now, I have personally never worked with Access and not sure if Access has a direct way to consume the WCF services. However, I came across following link:
http://jaliyaudagedara.blogspot.com/2014/02/calling-wcf-service-from-stored.html?m=1
Given the fact that I would be more comfortable working with SQL Server rather than doing any work in Access to do backward compatibility, I found this link as my best shot to backward compatibility.
Are there any other ways that I can approach this problem?
This question has already been asked and answered here:
Calling WCF Service from MS Access
In short, you can call a WCF service exposed via WebHttpBinding (simple HTTP) or BasicHttpBinding (SOAP/HTTP) using XMLHttp (for simple HTTP) or the SOAP Toolkit (for SOAP/HTTP).
Related
This question already has answers here:
How can a self-hosted (WinForm ) WCF service interact with the main form?
(3 answers)
Closed 7 years ago.
I have a C# WinForms app which is hosting a WCF service. When I call this service from another app, I want that method in the WCF service to call a method on the Form. I could cast the Form.ActiveForm but this doesn't seem a good way to do it. What would be the best way to call the Form from the hosted WCF service?
You could use events. The form registers to the event while the service triggers the event
I found a better solution elsewhere on StackOverflow. I had previously searched on here before posting my question but missed this one
How can a self-hosted (WinForm ) WCF service interact with the main form?
This works nicely so thought I'd update here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am working on a project where I need to make a call from .NET platform to non .NET Web service. I am making web service call using some methods where I can generate SOAP request to access web service. I made this communication using code given in code-projet site.http://www.codeproject.com/Articles/376168/Csharp-Dynamic-Web-Service-Invoker. I am able to communicate properly but I would like to make this communication more secure. Only reason to make web service dynamic is because it may reside on different locations.
My approach is to add secure token (some string) in a newly created header and add that header in outgoing SOAP request. And at receiving end (non .net platform), I will extract that value from header and verify against some algorithm and if things go fine, then only it will start rest of processes.
After researching couple of sites, I found that all the answers are for adding custom SOAP headers are pointing to direction where we use either WCF or Static web services. But here that is not the case. I just wrote simple plugin(Class) that makes this communication. I am calling web service after generating assembly reference after reading WSDL file from remote location.
I researched around 20-30 different forums to get answer to this question but none has the answer. Can someone help on this?
Only reason to make web service dynamic is because it may reside on different locations.
You can set a WCF client's endpoint at runtime. When the services implement the same contract this'll work fine with native .NET instead of some (non-compiling or at least incomplete) code from the web, which is good because you're very unlikely to find support for the latter.
Let's take a look at your actual problem:
I would like to make this communication more secure
Then start at the service side. What framework is the service written in, does it support security in any way? It really depends on how you want to authenticate the caller, but "add secure token (some string) [...] and verify against some algorithm" does sound a little bit like reinventing the wheel.
WCF can work with almost any, if not every kind of SOAP and HTTP security, so configure your service, use a regular, configurable WCF client and set the endpoint to the right address at runtime.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm going to be working on a project that involves a number of elements:
ASP.NET MVC website
C# console application
iPhone App
To get all these separate applications talking to the database, my immediate thought was to use a WCF Service.
However, I now need to add an API to the site to allow third parties to select, insert and update records from their own applications.
In my mind, I would just create a separate RESTful service endpoint on my WCF Service which would be locked down using authentication and would only give access to certain methods.
However, I've been reading today about the Web API feature in MVC 4 which is meant to be the latest thing for RESTful APIs?
Should I be going along the line of using the Web API? or because my other applications need a web service, should I stick with a WCF Service?
If you intend to do RESTful development then you will definitely want to use the ASP.Net Web Api (which was originally called WCF Web Api and created with the goal of "Making REST a first class citizen in .NET".
Another thing to consider is that the WCF REST Starter kit is no longer supported.
Note that using Web Api doesn't mean you have to use ASP.Net MVC or IIS even as it can be self hosted.
For handling operations which are non-CRUD in nature I'd recommend Googling "REST non-CRUD". I found this blog post RESTful URLs for non-CRUD operations (and particularly the comments interesting). If you decide you NEED to have RPC calls then those may have to be done with WCF. That said since WCF REST is being killed off I'm not sure what the best solution is going to be. Having both is probably the best answer but at the same time it's not necessarily a good answer.
Another alternative would be a WCF OData Service but I'm not sure if that gets any support from an iPhone.
One last point to make (that can be deleted in the future as this is time sensitive)
Microsoft has provided a Go Live license with the beta which means that it is supported by Microsoft and you shouldn't have any problems upgrading to the file RTM.
Service Stack also looks like an option.
Demos, overview, examples is available here.
There's no right answer here. You can certainly do fairly well with a WCF RESTful service. Or you could use ASP.NET MVC. Both are perfectly valid, and both have strengths and weaknesses.
Ultimately, I'd suggest you go with whatever feels the most maintainable to you.
I would like to note that MVC 4 is in beta, so watch out for bugs and don't go live until it's out of beta.
Since you are going to create an ASP.NET MVC web site, it would be quite comfortable to use ASP.NET Web API also because programming model is very similar and those solutions are more or less integrated with each other.
I would be inlclined to look at what has the best support on all platforms that you are going to use, I suspect the iPhone app may end up driving your choices.
If it was pure .net I would still tend to lean toweards a SOAP service - it is not considered cool these days but it generally will do what you need on most platforms without having to roll custom solutions.
EDIT
ASP.NET Web API means that .NET now provides a great framework for developing a restful API, I revise my answer to say that I would now lean towards this - progress is great!
I have the same question.
In the MSDN site,
http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx
Found a video tutorial where they said that for machine cosumption like iPhone or web app clients of JSON or xml, web API is recommended option. Its around the last part of the video.
While for more complex machine to machine communication WCF is prefereable.
http://channel9.msdn.com/Series/Building-Web-Apps-with-ASP-NET-Jump-Start/Building-Web-Apps-with-ASPNET-Jump-Start-04-Building-a-Service-Layer-with-ASPNET-Web-API
Here is a screenshot from their presentation.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
what is difference with WCF and other web services ?
What are the main difference between web service and wcf service ?
how to call both service?
This is a big question, but a WCF service is much more versatile and can do what a web service can do and much more. See this post for more detailed information regarding this issue.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Are they just the same protocol or something different?
I am just confused about it.
Actually, I want to call a web service written in C# with ASP.NET by Python. I have tried XMLRPC but it seems just did not work.
So what is the actually difference among them?
Thanks.
All of them use the same transport protocol (HTTP).
XMLRPC formats a traditional RPC call with XML for remote execution.
SOAP wraps the call in a SOAP envelope (still XML, different formatting, oriented towards message based services rather than RPC style calls).
If you're using C#, your best bet is probably SOAP based Web Services (at least out of the options you listed).
In order to call web service written in C#, you will need SOAP library that is able to consume WSDL (check it out in addition to all the useful terms mentioned here). Couple of the libraries i came across:
suds is a lightweight SOAP python client.
ZSI is more powerful library that also has WSDL consumption of complex types.
SOAPpy was good library. Unfortunately it was not updated since 2005-02-22, so i provided it here only for reference.
Python Web services page has more information and links on different related libraries.
They are completely different protocols, you need to find out the protocol used by the web service you wish to consume and program to that. Web services is really just a concept XML-RPC, SOAP and REST are actual technologies the implement this concept. These implementations are not interoperable (without some translation layer).
All these protocols enable basically the same sort of thing, calling into remote some application over the web. However the details of how they do this differ, they are not just different names for the same protocol.
xml-rpc: Its a mechanism to call remote procedure & function accross network for distributed system integration. It uses XML based message document and HTTP as transport protocol. Further, it only support 6 basic data type as well as array for communication.
SOAP: SOAP is also XML-based protocol for information exchange using HTPP transport protocol. However, it is more advanced then XML-RPC protocol. It uses XML formatted message that helps communicating complex data types accross distributed application, and hence is widely used now a days.