Hello Jeremy,
PATCH is not supported in Jersey. You may write your own method for PATCH.
import java.lang.annotation.ElementType;import
java.lang.annotation.Retention;import
java.lang.annotation.RetentionPolicy;import
java.lang.annotation.Target;
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("PATCH")public @interface PATCH {
}
____________________________
John Yeary
____________________________
*NetBeans Dream Team*
*President Greenville Java Users Group
Java Users Groups Community Leader
Java Enterprise Community Leader*
____________________________
<
http://javaevangelist.blogspot.com/> <
https://twitter.com/jyeary>
<
http://www.youtube.com/johnyeary>
<
http://www.linkedin.com/in/jyeary>
<
https://plus.google.com/112146428878473069965>
<
http://www.facebook.com/jyeary>
<
http://feeds.feedburner.com/JavaEvangelistJohnYearysBlog>
<
http://netbeans.org/people/84414-jyeary>
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
-- Theodore Roosevelt
On Mon, Mar 26, 2012 at 12:40 PM, Jeremy Johnson <
jeremy.johnson_at_imtc.gatech.edu> wrote:
> Hi folks,****
>
> ** **
>
> I’m trying to use the Jersey Test Framework v. 1.12 to test a web service
> that makes use of HTTP PATCH.****
>
> ** **
>
> I tried calling WebResource.Builder.method( "PATCH", …) but received the
> following exception:****
>
> ** **
>
> com.sun.jersey.api.client.ClientHandlerException:
> java.net.ProtocolException: Invalid HTTP method: PATCH****
>
> ** **
>
> Is there a simple solution for getting the Test Framework to play nicely
> with PATCH?****
>
> ** **
>
> Thanks,****
>
> Jeremy****
>