hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Hübner" <sthueb...@googlemail.com>
Subject Re: HttpCore to mock remote servers in unit tests?
Date Sat, 07 Apr 2007 15:23:27 GMT
2007/4/6, Ole Matzura <ole@eviware.com>:
> Hi Stefan,
>
> I recommend you to use Jetty for this, it will allow you to do exactly
> what you want (ie start a small service with few lines of code and
> inject some handlers..), we use it in soapUI for mocking webservices and
> it works just great..

Yes, I was considering Jetty, but gave Simple a shot first
(www.simpleframework.org) and I must say, it's great too!

Another colleague of mine mentioned Jetty would be an option. See I
didn't want too blow up a full servlet implementation to just do what
I wanted to, but maybe Jetty is more (or less or something else too)
than a plain Servlet engine.

Thanks for giving me a spin to have a second look at it! It's always
good, to have two or three sharp knifes in one's personal toolbox.


Cheers,
Stefan
>
> regards,
>
> /Ole
> eviware.com
>
>
> Stefan Hübner wrote:
> > Thanks for clarifying that to me, Roland!
> >
> > Tomcat on the other hand is way too oversized, since I just want to
> > start a small service with a few lines of code, inject a
> > request/response-handler (e.g. based on JMock) run a test and shut
> > that thing down again. Thought, HttpCore could provide me with the
> > service part of it, but ok, that's what prototypes are good for,
> > right?
> >
> > Regards,
> > Stefan
> >
> > 2007/4/6, Roland Weber <ossfwot@dubioso.net>:
> >> Hi Stefan,
> >>
> >> > So I thought, I could set up a small server based on
> >> > HttpCore-components.
> >>
> >> There's one in the test code for HttpCore, and a slightly different
> >> one in the test code for HttpClient (though the latter still lacks
> >> some pieces for expect-continue handling). Both are based on the
> >> HttpService class and the ElementalHttpServer example.
> >>
> >> > I progressed up to the point where I actually
> >> > were about to check parameters of the requests, the mocked server
> >> > received. There I stuck since HttpCore's HttpRequest-Interface is
> >> > lacking any higher level API to read it's parameters.
> >> >
> >> > Maybe, that interface is just not intended to serve use cases like the
> >> > one described above?
> >>
> >> Exactly. "Core" is not a higher level API. See our project charter,
> >> section "Project Scope", item 2:
> >>
> >>    Jakarta HttpComponents will provide ONLY a toolset of low level
> >>    generic transport APIs. In particular, server side application
> >>    layer APIs WILL NOT be developed.
> >>    http://jakarta.apache.org/httpcomponents/charter.html
> >>
> >> Please use the Servlet API for that purpose, for example in Tomcat:
> >>         http://tomcat.apache.org/
> >> Our project charter was specifically drafted to avoid scope clashes
> >> with other Apache projects.
> >>
> >> cheers,
> >>   Roland
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>
Mime
View raw message