I have built a webcrawler in C++. I am using an API called URLdownloadToFile().
Is there any other API that can be used?
The API URLdownloadToFile() is working well for some URLs and it is not working well for some other URLs? Please suggest some ways I can overcome this problem?
Thanks,
Dnyaneshwari C.
You might want to look into libcurl which should allow you to pull content using a variety of protocols. This should also support proxies etc which might be what is giving you problems with specific urls. See also; http://curl.haxx.se/
You might want to look at WinINet which is a simple C API for high-level interface with the HTTP network stack. Another option is WinHttp which is somewhat more compilcated and requires you do deal with COM.
Unless there is a particular reason for sticking with c++ you could well be better off switching to Python and using BeautifulSoup. I've used curl, and it is nice, but all my web stuff is done in Python now
Related
It's pretty much the tittle.
Im not expecting the whole code to just copy and paste (but feel free to do it). Im just having difficulties to find some data related. If someone knows how to do it, please post some hints, article links, specific words to make some research on it.
Thank you.
As Christian mentioned in his comment, your problem can be solved by implementing an HTTP client that parses JSON responses, independently of the technology used by your server. To do this in C++, I would refer you to the following resources:
High-level library for C++ HTTP client.
libcurl (lower level library for HTTP requests).
RapidJSON library to parse the responses you will get from your server (see this benchmark for a comparison of JSON parsing libraries).
If your C++ application uses a framework such as Qt, it likely includes facilities for requests (e.g. Qt HTTP example).
On the server side, you will have to define HTTP endpoints that return the data you are interested in, encoded as JSON. The beginning of this tutorial shows an easy way to do that.
node.js c++ add on manual
https://nodejs.org/api/addons.html
http://libuv.org/
use libuv function in node.js 0.12.x
I'm using django.
I've tried a lot of different things including urllib2, but I can't seem to create customers. I receive a 401 error.
If not how can I authenticate, and still use things like Customer().save()?
thanks
c
Have you looked at https://github.com/balanced/balanced-django as an example to see how that library is doing it? I lack details as to if you're using the Balanced Python library (https://github.com/balanced/balanced-python) or something else. If you are using that library, make sure your API secret is making it down into something like balanced.configure which sets up the client library authentication. For example, balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyf').
Also, feel free to stop by #balanced on Freenode IRC if you'd like to get some help directly from Balanced developers who assist with integration.
I am trying to set up a web store using magento on a SOA Architecture. So I intend to use all of the functionalities through the API connecting it with mule ESB.
However on my research I have read that the magento API is Silly Slow. And now I am wondering if it actually can handle the requests of an entire website.
Has anybody done something like this before? Can it actually work? If not, is there a workaround?
Regards
Leo
No, it is not viable to setup a store using only Magento's SOAP and RPC APIs. THat is not the intention of these APIs.
There are examples where people have done what you are looking for such as http://www.yireo.com/software/magebridge
They claim to be 40% faster than native Magento.
I've tried the tool, and it is quite functional.
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.
We're looking at developing a Web Service to function as a basis for a browser display/gui for a networked security prototype written in C++. My experience with web services has been limited to Java. I prefer Web Services in Java because it's on the "beaten path".
One sure was to do this would be to simply code a Java client which invokes the web service, and call it as a command line with parameters from the C++ code.
It's not ideal, since generally speaking an API is preferable, but in this case it would work and be a pretty safe solution.
A resource which does handles web service development in C++ is called gSOAP, at this url: http://gsoap2.sourceforge.net
Any thought on which is a better approach? Has anyone used gSOAP, and if so, what did you think?
I'd done things with gSOAP, it's not awful. I'm increasingly opposed to the RPC model for web services, though; it forces you into a lot of connection and session state that adds complexity. A REST interface is simpler and more robust.
To me is Axis C++.
For RPC style, have a look at Thrift,
I found it quite better ( faster, clearer, a lot of languages implementations) than soap.
My colleague ended up using a combination of Axis2 / java (for the service) and gsoap for the client. He created the wsdl from the Java service by generating it from a C++ header (using c2wsdl (?) or something like that. He said it was better than using a Java interface because that generated two sets of wsdl, for seperate versions of soap.
Then he used wsdl2java to generate the webservice and a test web client. Once we got that working, he used gsoap to create the web client (in C++), and it worked fine.
thanks for all the answers! I ended using a combination of them.
I had very good experience with gsoap - very simple, performance is good.
If it is acceptable to run only on Windows, there is a brand-new API for that purpose: WWSAPI
Instead of calling the java client from the command line, you can create a java virtual machine inside your C app, instantiate the class and call any methods. This is what the java.exe app does and I think the source code is included in the jdk.
Depends on how low level you want to go. You might checkout yield.