User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
Hi Atanas,
I'm very glad the example is useful to you.
I would like to run the example via our automated tests...against a
service (or services)...that can run on our ecf-services machine
(i.e. we have a server-on-internet to run the service as Wim and
Markus indicated)...but it would be really fantastic if you could
put together a reasonably simple put-based service (or maybe a
service that has get, put, post, delete all...so that all methods
could be automatically tested)...and make the source available to
us.
It might even be a good idea to use OSGi-based server, with
httpservice impl by jetty...but that's not necessary/required...all
that's required is a simple service that can respond to the rest
test code. If such a thing could be contributed by someone, we'll
happily run it and use it to do automated testing of the ecf rest
api.
I would do it myself, but I'm currently pretty highly engaged...and
so request that the community consider helping us out here.
Thanks,
Scott
On 3/13/2012 8:52 AM, Атанас Тодоров wrote:
Hi Scott,
First of all ,Thanks for you fast reply and the pretty good
example.
I am glad to say that your example worked perfectly for me.
There are two evident things that i changed to make it work
1. As for POST request for PUT Request as well i had to
provide some request parameters like this:
The key thing for you will probably be the creation of
the IRemoteCallable instance in the setUp method...along
with the creation of the remote call parameter and the
HttpPutRequestType with default content type and default
charset.
Thanks,
Scott
On 3/12/2012 12:25 PM, Атанас Тодоров wrote:
Hi Scott,
I think i will not be able to make the
service public available but i can give you more
detailed information which i hope will help you
help me .Also i have some questions.
which means the data i want to sent is not
empty and is part of the request body.
The information i am trying to send via the
wire is xml so i am trying to construct the put
request like this:
AbstractRequestType requestType = new
HttpPutRequestType(HttpPutRequestType.STRING_REQUEST_ENTITY,"application/xml");
Is this the right way?There is no javadoc nor
any examples like POST request examples so it is
hard to guess how to use the API in the right
way.
For this specific case for example I do not
know what's the difference between all the
constructors of HttpPutRequestType class and I
do not know which one to use.
Sending POST request via ECF do not require
to specify content type but seems PUT request
require that parameter.And if so why?
Yes, I believe we probably can help you.
One of the difficulties of
testing/example/demoing this, however, is to
have a PUT-based web service available. Is
there a put-based web service that you can
make available (even temporarily) for us to
use?
...or point to some public put-based service
that resembles your service (in terms of
parameters, serialization, etc).
Thanks,
Scott
On 3/8/2012 7:41 AM, Атанас Тодоров
wrote:
Hi,
Can you help me send a PUT
request using ECF framework.I have a
web resource exposed via REST and i
want to update it with some data.
NOTE: GET,POST,DELETE requests
work for me.
The code i use is:
AbstractRequestType
requestType = new
HttpPutRequestType();
Request request = new
Request(requestType, new Object[]
{ configuration }); //
configuration is String and is not
empty or null.
RemoteServiceProxy proxy
= new
RemoteServiceProxy<Object>(deserializer,
host) // deserializer is custom
impl
of BaseRemoteResponseDeserializer
proxy.makeRestSyncCall(url.toString(),
request);
where
public T
makeRestSyncCall(String resource,
Request request) throws
ECFException {