Hi,
could you please send more details, like the full exception stack trace?
A reproducible sample would be helpful too (if possible).
-Naresh
xworker wrote:
> Hi
>
> Tried that. Like this:
>
> PermitConverter p = new PermitConverter();
> p.setPermitName("test");
>
>
> wr =
> client.resource("http://localhost:8080/permit-backend/resources/permits");
> wr.post(new GenericType<PermitConverter>(){}, p);
>
> Got this exception:
> javax.faces.el.EvaluationException:
> com.sun.jersey.api.client.ClientHandlerException:
> java.lang.IndexOutOfBoundsException: Index: 0, Size:0
>
>
> Naresh-11 wrote:
>
>> Hi,
>>
>> xworker wrote:
>>
>>> Hi
>>>
>>> Im trying to do a simple post with an entity from my backingbean to my
>>> REST
>>> ws service.
>>>
>>> Something like this:
>>>
>>> webresource.post(ClientResponse.class, myEntity);
>>>
>>> Whats the correct way of doing this?
>>>
>> you can definitely do it this way.
>>
>>> All the examples I've seen just send
>>> strings and not entitys.
>>>
>>>
>> Please refer the JAXB sample's [1] MainTest class. Most of the test
>> methods of this test class, use post() method for actually POSTing
>> entities.
>>
>> [1]
>> http://download.java.net/maven/2/com/sun/jersey/samples/jaxb/1.1.3-ea-SNAPSHOT/jaxb-1.1.3-ea-SNAPSHOT-project.zip
>>
>> -Naresh
>>
>>> /xw
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>>
>>
>
>