You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Todd Orr <to...@gmail.com> on 2008/05/05 22:02:08 UTC
Rest Local Transport
Are there any helper utils or 3rd party packages that can be used as a
client for testing Rest services via local transport? I believe that I
have been able to expose a rest service over the local transport (for
testing). However, I cannot use URL or HttpClient to access the
service since it doesn't travel over HTTP. Thoughts?
Thanks,
T
Re: Rest Local Transport
Posted by Benson Margulies <bi...@gmail.com>.
I did some similiar stuff for the Javascript code, but I was able to
hide the problem in the java code behind Javascript.
I'm not an expert on how hard it is to add a transport to the URL/Http
universe in the JDK. I might take a look.
The alternative is to grab the port by binding a socket, and then
clean it up and use the number.
Honestly, all the CXF tests just burn in some port numbers.
Re: Rest Local Transport
Posted by Todd Orr <to...@gmail.com>.
I can see this being useful when a build server pulls our projects out
of source control and runs the unit tests. It is possible, though
unlikely, that the port used for the rest service might be taken. I
figure using local transport would eliminate that issue as well as
make the test more compartmentalized. I know I can create an ad hoc
http service and run the tests there. However, ideally I could create
an in-vm system for testing the behavior of the marshaling, etc. prior
to true integration tests on a server via a deployed war. I know there
are other options.
On Mon, May 5, 2008 at 7:59 PM, Benson Margulies <bi...@gmail.com> wrote:
> You'd need to reach into the local transport. We don't have a
> URLProvider class or whatever it would take.
>
> Why would you want to do this?
>
Re: Rest Local Transport
Posted by Benson Margulies <bi...@gmail.com>.
You'd need to reach into the local transport. We don't have a
URLProvider class or whatever it would take.
Why would you want to do this?
Re: Rest Local Transport
Posted by Glen Mazza <gl...@verizon.net>.
Are you sure its not using http? http://localhost:8080 or whatever is
still http...
Glen
2008-05-05 Todd Orr wrote:
> Are there any helper utils or 3rd party packages that can be used as a
> client for testing Rest services via local transport? I believe that I
> have been able to expose a rest service over the local transport (for
> testing). However, I cannot use URL or HttpClient to access the
> service since it doesn't travel over HTTP. Thoughts?
>
> Thanks,
> T