On Mon, 2008-12-01 at 17:00 -0800, Tony G wrote: > David McGehee wrote: > > > Microsoft Server2003 jbase 4.1 environment. We need a > > > different method of making http: connections from > > > jBase. We are currently using a CALLC custom-written > > > interface for which we no longer have the code. > > From: Jim Idle > > The easiest way is to EXECUTE an external program > > (curl is good: http://curl.haxx.se/download.html and > > works on WIndows), redirect the output to a file, then > > read in the file. > > > > There is also a C library version of it and if it has > > string input and output then you can make a DEFC for > > it (or maybe get CALLC to work) and just call it like > > your old custom code. It would be trivial to create a > > CALLC wrapper for it though. > > > This is both a suggestion as well as an inquiry: > > I've used cURL for various projects. It's well supported, very > popular, and if you don't mind the execute/capture method, it a > good option. The library "libcurl" that Jim mentions can be > tough to use though there are bindings for many languages - so > you can write your client code in C, PHP, or Java for example, > and still make use of cURL if you like the way it works. This > same library gets you HTTP plus FTP and other protocols.
Yep - it is really just an example; there are myriad ways to do this these days. > There are many examples of Java HTTP clients around, so CALLJ may > be higher on the list of preferable options. I didn't mention Java because it seems a waste to start lots of JVMS just to do an occasional http get ;-) > > There is also CALLDOTNET, since David is on Windows. It's > relatively easy to write a .NET HTTP client, including for web > services, and again, this is well documented with lots of > examples on the 'net. [ I can do this as a service and provide > the source, as long as you promise not to lose it. :) ] That would be better than Java for Windows of course - still a fair overhead memory wise compared to a few libcurl calls though :-) > > According to the BASIC manual, .NET code will bind the first time > it's executed but there is only an initialization performance > penalty, and subsequent operations should be as fast as the > transfer itself. I don't know if this true for CALLJ. Anyone? Same deal just about so long as you use Sun's JIT. Once the JVM is started it sticks around. But .Net is better integrated with Windows and if you are staying there and don't want to mess with libcurl, then .Net is probably the best bet. If performance is not really much of an issue then just EXECUTE "curl options etc" CAPTURING... Jim --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
