Are there any helpful c++ libraries which can support me, implementing a simple REST webservice?
I am not searching for a bloated webservice framework like c++ REST SDK, or something like that. I already have a HTTP server running which can handle HTTP calls. (especially the HTTP server from the poco libraries).
I guess it should be not too hard to implement a Restful webservice interface around that.
But my question is, do i have to implement it on my own (how would you implement it?) or can I still make use of some libraries? So I am searchin for a library that can actually help me processing rest requests.
kind regards
Related
We need to make SOAP requests in C++. Basically a SOAP client. The catch is that we DON'T want to use any third party library like gSOAP. Reason being that the transactions are finance related. We need to write the complete code ourselves.
Please suggest ideas towards it. I believe that this is going to be very complex.
Any ideas towards this would be of great help. Our environment is C++ on windows (VS 2010) Please note that for now, we can assume that there is a single SOAP based web service (written in C#) for which we need to do it. Therefore, any complexity related to generalizing this SOAP client can be left out for now.
Ultimately a SOAP request is a HTTP POST of XML data. You can build the XML yourself and use IWinHttpRequest to post that data to the server.
Is there a way I can access the Exchange Mails/Calendars/Addressbook without .NET or non cross platform thing? I want to access them with C++ but on both MS and Linux. Their docs says it is possible but there is no any non C#/.Net example.
EWS combines the functionality that is included in WebDAV and CDOEX, and provides logic that makes common scenarios such as calendaring workflows easy to implement. EWS is a SOAP-based XML Web service that can be accessed remotely from any operating system and any language that can send requests over HTTPS.
Please share with me if there is any way or I'm missing something!
Thanks!
I agree that there are few examples outside the C# / Powershell realm. That being said, if you stick to plain EWS, it should be possible. I have no idea the WebServce access from C++ is anything similar to C#. In C# you point Visual Studio (or wsdl.exe) to the WSDL of the WebService and it will create a set of proxy classes which do all the SOAP handling.
If you don't have something similar with C++ you'll need to build the SOAP requests yourself.
See http://msdn.microsoft.com/en-us/library/bb204119(v=exchg.140).aspx for a reference to the EWS operations and XML elements.
One thing you might want to utilize is the EWS Managed API. It has a nice tracing feature which dumps all the requests/responses to the console. So, you can write up a small test program and see what the request has to look like. This could help you building the EWS requests on the C++ side.
I understand this is a long shot but, would there happen to be a clojure library for responding to kerberos over http (aka spnego) requests?
I'm currently looking into using spring-security framework for this but thought i'd ask about a more clojure friendly approach just in case.
There's nothing special involved to integrate a clojure app with Spring Security. However, you are bound by its implementation as a servlet filter, so you cannot easily use it under a generic http library. Under a j2ee container, it is a good choice.
In the place I work there are some software written in C# and some written in C++ (the most important ones). Some time ago we decided it would be a good idea to track any possible problem in the software, by sending stack trace and exception information over a web service. So I came with a WCF Service, that gets the information and store them on a database and send an automatic e-mail. It worked, we had to secure it through password, it's done, but now I want our other software, the one written in C++, to use this webservice (this software is used both on windows and linux, so we can't just make a call to another software in the user machine).
I've googled about it, and found this tutorial on how to use gSOAP, which so far didn't help me very much (lots of errors, it is not very detailed, and the web.config file is impossible to read). I was wondering if is there any other way to achieve this. In adition, since I'm using authentication on my webservice, it now has a wsHttpBinding (which AFAIK isn't supported by gSOAP).
Can you guys help me out?
Since your WCF service is in C# with .NET, and the only issue is getting the C++ application to be able to talk to it, one way is to follow the advice in REST / SOAP Endpoints for a WCF service and related articles.
Your C# programs continue to have the full SOAP access to your service.
Your C++ programs could do something like this for REST access:
"Browse" to the HTTP GET URL for the service command you wanted.
Then toss (or parse and use) whatever response came back.
It is a pretty minimal change to your WCF service to offer both SOAP and REST.
The REST ability opens your service to JavaScript as well as C++ clients.
You may need to restrict the interface to simple data, or class objects that are easy to parse in C++.
Will the machines running the C++ applications have the .NET Framework installed?
Check out: Create WCF service for unmanaged C++ clients
I'm quite a newbie with Boost, and my only experience of surfing though a proxy using a library is using .NET (that is really convenient for that purpose). I'm now trying to perform a simple HTTP request through a HTTP proxy.
Is there a tidy way to do it using boost directly?
My proxy use a NTLM authentification.
No, Boost provides neither an HTTP client nor a way to interface with proxies. You would necessarily have to implement those features yourself.
To be clear, yes, it is possible to implement an HTTP client using Boost.Asio. But implementing a client that can reliably talk through a proxy is significantly more complex, and Asio does not provide any support for that beyond the low-level socket itself. It certainly does not include the framework for performing NTLM authentication, which may prove difficult to get right.
More complex libraries like cURL provide that support.