On 07/12/06, Andrew Borley <[EMAIL PROTECTED]> wrote:

On 12/7/06, Andrew Borley <[EMAIL PROTECTED]> wrote:
> On 11/20/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
> > I checked in the initial structure of a REST extension under
> > cpp/sca/runtime/extensions/rest, revision r477110.
> >
> > The idea is to add support for <interface.rest> and <binding.rest> on
> > services and references and implement a RESTFul pattern (using the
HTTP
> > Post/Get/Put/Delete verbs to implement Create/Retrieve/Update/Delete
> > operations on resources) as well as a simple service invocation
> > mechanism using HTTP Get and Post.
> >
> > I have updated the Linux build files, added a configure
> > --enable-restbinding option and the necessary Makefile.am files.
> >
> > The reference binding requires Libcurl (I tried 7.15.5) and CURL_LIB
and
> > CURL_INCLUDE environment variables pointing to its lib and include
> > directories.
> > The service binding requires Apache httpd (2.2.x) and HTTPD_LIB and
> > HTTPD_INCLUDE environment variables.
> >
> > The SCDL model classes should be roughly Ok but the ServiceProxy and
> > ServiceWrapper classes are under construction and only useful to
verify
> > that the extension can be built.
> >
>
> I just committed the build files & a few minor changes to get the
> extension building on Windows - you will need to set the environment
> variables LIBCURL_HOME and HTTPD_HOME to point to the appropriate
> places (guess!)
>
> Haven't yet got the sample going - that's the next job.
>
> Cheers
> Andy
>

I spent most of today trying to get the RestCalculator sample up and
running on Windows. I hit a few issues:

Libcurl - this was the major one. The extension built fine but died on
the restclient side of the sample when it tried to initialise libcurl
(via the curl_global_init() call). I tried all the different kinds of
libcurl for Windows that are available at [1] but I got the same
result with all of them. Eventually I built my own from source, and
that died too until I built it via VS Express rather than the
command-line build! At this point it all started working and I began
to see messages appearing on the server.

To have to download the src and build it would be a huge hassle for
users that we *really* want to avoid. It may just be that I was doing
something wrong with my libcurl stuff but I couldn't see what  - I was
just getting the windows "it's died" message that you normally get
when libraries don't like each other. If anyone else could try it out
and see what happens for them with the windows libcurl binary distros
it would be appreciated!



I wonder if our building with vc8 is causing the incomaptibility. We have
had issue before with dll's being built against different versions of the
msvc runtime dlls.



REST service - after all the shenanigans with libcurl, I hit an issue
with tuscany_sca_mod_rest.dll that I didn't have time to get past. In
ModREST.cpp the request->path_info is coming out as
/htdocs/rest/sample.calculator.CalculatorComponent/CalculatorService/div,
but it looks like the code expects it to be something like
/sample.calculator.CalculatorComponent/CalculatorService/div - this
meant that the runtime was looking for a component named htdocs and a
service named rest! I assume you get the path without the /htdocs/rest
part on Linux, although it's a bit odd that the data is different on
Windows.. I'm on Apache HTTPD 2.2.3 - is that the same version you're
using?

Anyway, I'm doing a presentation on Tuscany at the Javapolis
conference in Belgium next week, so I'll be preparing for/going to
that over the next few days, and won't have much time to progress this
or the HttpdBigBank sample. I've put the windows deploy/run scripts
for RestCalculator on svn, so if anyone does fancy trying it out I'll
be interested in your results!

Cheers

Andy

[1] http://curl.haxx.se/download.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Pete

Reply via email to