cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1453953 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/form/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ rt/frontend/jaxrs/src/test/j...
Date Thu, 07 Mar 2013 16:47:46 GMT
Author: sergeyb
Date: Thu Mar  7 16:47:46 2013
New Revision: 1453953

URL: http://svn.apache.org/r1453953
Log:
[CXF-4884] Removing CXF Form extension

Removed:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/form/Form.java
Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/form/FormTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/OOBResponseProvider.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthOutInterceptor.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingProvider.java
Thu Mar  7 16:47:46 2013
@@ -31,6 +31,7 @@ import javax.ws.rs.Encoded;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -38,7 +39,6 @@ import javax.ws.rs.ext.MessageBodyWriter
 import javax.ws.rs.ext.Provider;
 
 import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
 import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
@@ -209,7 +209,7 @@ public class FormEncodingProvider<T> imp
         throws IOException, WebApplicationException {
         
         MultivaluedMap<String, String> map = 
-            (MultivaluedMap<String, String>)(obj instanceof Form ? ((Form)obj).getData()
: obj);
+            (MultivaluedMap<String, String>)(obj instanceof Form ? ((Form)obj).asMap()
: obj);
         boolean encoded = keepEncoded(anns);
         
         String enc = HttpUtils.getSetEncoding(mt, headers, "UTF-8");

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
Thu Mar  7 16:47:46 2013
@@ -45,6 +45,7 @@ import javax.ws.rs.InternalServerErrorEx
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -57,7 +58,6 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
 import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
 import org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource;

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java Thu
Mar  7 16:47:46 2013
@@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletReq
 import javax.ws.rs.BadRequestException;
 import javax.ws.rs.InternalServerErrorException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
@@ -43,7 +44,6 @@ import org.apache.cxf.common.util.String
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.io.CachedOutputStream;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
 import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
 import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
@@ -63,6 +63,17 @@ public final class FormUtils {
         
     }
     
+    public static String formToString(Form form) {
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        try {
+            FormUtils.writeMapToOutputStream(form.asMap(), bos, "UTF-8", false);
+            return bos.toString("UTF-8");
+        } catch (Exception ex) {
+            // will not happen
+        }
+        return "";
+    }
+    
     public static void restoreForm(FormEncodingProvider<Form> provider, 
                                    Form form, 
                                    Message message)

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/form/FormTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/form/FormTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/form/FormTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/form/FormTest.java
Thu Mar  7 16:47:46 2013
@@ -18,6 +18,11 @@
  */
 package org.apache.cxf.jaxrs.ext.form;
 
+import javax.ws.rs.core.Form;
+
+import org.apache.cxf.jaxrs.impl.MetadataMap;
+import org.apache.cxf.jaxrs.utils.FormUtils;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -25,8 +30,8 @@ public class FormTest extends Assert {
 
     @Test
     public void testToString() {
-        Form form = new Form().set("a", "b").set("c", "d");
-        assertEquals("a=b&c=d", form.toString());
+        Form form = new Form(new MetadataMap<String, String>()).param("a", "b").param("c",
"d");
+        assertEquals("a=b&c=d", FormUtils.formToString(form));
     }
 
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java
Thu Mar  7 16:47:46 2013
@@ -28,10 +28,10 @@ import java.util.List;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Encoded;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 
@@ -62,7 +62,7 @@ public class FormEncodingProviderTest ex
         InputStream is = getClass().getResourceAsStream("singleValPostBody.txt");
         Form form = ferp.readFrom(Form.class, null, 
                 new Annotation[]{}, MediaType.APPLICATION_FORM_URLENCODED_TYPE, null, is);
-        MultivaluedMap<String, String> mvMap = form.getData();
+        MultivaluedMap<String, String> mvMap = form.asMap();
         assertEquals("Wrong entry for foo", "bar", mvMap.getFirst("foo"));
         assertEquals("Wrong entry for boo", "far", mvMap.getFirst("boo"));
 
@@ -190,11 +190,11 @@ public class FormEncodingProviderTest ex
     
     @Test
     public void testWriteForm() throws Exception {
-        Form form = new Form();
+        Form form = new Form(new MetadataMap<String, String>());
         ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
         FormEncodingProvider<Form> ferp 
             = new FormEncodingProvider<Form>();
-        ferp.writeTo(form.set("a", "a1").set("b", "b1"), Form.class, Form.class, 
+        ferp.writeTo(form.param("a", "a1").param("b", "b1"), Form.class, Form.class, 
                      new Annotation[0], MediaType.APPLICATION_FORM_URLENCODED_TYPE, 
                      new MetadataMap<String, Object>(), bos);
         String result = bos.toString();

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java Thu Mar
 7 16:47:46 2013
@@ -31,6 +31,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Future;
 
+import javax.ws.rs.HttpMethod;
 import javax.ws.rs.ProcessingException;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.client.AsyncInvoker;
@@ -38,6 +39,7 @@ import javax.ws.rs.client.Entity;
 import javax.ws.rs.client.InvocationCallback;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.GenericEntity;
 import javax.ws.rs.core.GenericType;
 import javax.ws.rs.core.HttpHeaders;
@@ -53,7 +55,6 @@ import org.apache.cxf.bus.spring.SpringB
 import org.apache.cxf.feature.Feature;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.impl.ResponseImpl;
 import org.apache.cxf.jaxrs.model.ParameterType;
 import org.apache.cxf.jaxrs.model.URITemplate;
@@ -280,7 +281,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response post(Object body) {
-        return invoke("POST", body);
+        return invoke(HttpMethod.POST, body);
     }
     
     /**
@@ -289,7 +290,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response put(Object body) {
-        return invoke("PUT", body);
+        return invoke(HttpMethod.PUT, body);
     }
 
     /**
@@ -297,7 +298,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response get() {
-        return invoke("GET", null);
+        return invoke(HttpMethod.GET, null);
     }
 
     /**
@@ -305,7 +306,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response head() {
-        return invoke("HEAD", null);
+        return invoke(HttpMethod.HEAD, null);
     }
 
     /**
@@ -313,7 +314,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response options() {
-        return invoke("OPTIONS", null);
+        return invoke(HttpMethod.OPTIONS, null);
     }
 
     /**
@@ -321,7 +322,7 @@ public class WebClient extends AbstractC
      * @return JAXRS Response
      */
     public Response delete() {
-        return invoke("DELETE", null);
+        return invoke(HttpMethod.DELETE, null);
     }
 
     /**
@@ -331,7 +332,7 @@ public class WebClient extends AbstractC
      */
     public Response form(Map<String, List<Object>> values) {
         type(MediaType.APPLICATION_FORM_URLENCODED);
-        return doInvoke("POST", values, null, Response.class, Response.class);
+        return doInvoke(HttpMethod.POST, values, null, Response.class, Response.class);
     }
     
     /**
@@ -341,7 +342,7 @@ public class WebClient extends AbstractC
      */
     public Response form(Form form) {
         type(MediaType.APPLICATION_FORM_URLENCODED);
-        return doInvoke("POST", form.getData(), null, Response.class, Response.class);
+        return doInvoke(HttpMethod.POST, form.asMap(), null, Response.class, Response.class);
     }
     
     /**
@@ -394,7 +395,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T post(Object body, Class<T> responseClass) {
-        return invoke("POST", body, responseClass);
+        return invoke(HttpMethod.POST, body, responseClass);
     }
     
     /**
@@ -405,7 +406,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T post(Object body, GenericType<T> responseType) {
-        return invoke("POST", body, responseType);
+        return invoke(HttpMethod.POST, body, responseType);
     }
     
     /**
@@ -415,7 +416,7 @@ public class WebClient extends AbstractC
      * @return the future
      */
     public <T> Future<T> post(Object body, InvocationCallback<T> callback)
{
-        return doInvokeAsyncCallback("POST", body, body.getClass(), null, callback);
+        return doInvokeAsyncCallback(HttpMethod.POST, body, body.getClass(), null, callback);
     }
     
     /**
@@ -426,7 +427,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T put(Object body, Class<T> responseClass) {
-        return invoke("PUT", body, responseClass);
+        return invoke(HttpMethod.PUT, body, responseClass);
     }
     
 
@@ -438,7 +439,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T put(Object body, GenericType<T> responseType) {
-        return invoke("PUT", body, responseType);
+        return invoke(HttpMethod.PUT, body, responseType);
     }
     
     /**
@@ -448,7 +449,7 @@ public class WebClient extends AbstractC
      * @return the future
      */
     public <T> Future<T> put(Object body, InvocationCallback<T> callback)
{
-        return doInvokeAsyncCallback("PUT", body, body.getClass(), null, callback);
+        return doInvokeAsyncCallback(HttpMethod.PUT, body, body.getClass(), null, callback);
     }
     
     /**
@@ -472,7 +473,7 @@ public class WebClient extends AbstractC
      * @return JAX-RS Response
      */
     public <T> Response postCollection(Object collection, Class<T> memberClass)
{
-        return doInvoke("POST", collection, new ParameterizedCollectionType<T>(memberClass),
+        return doInvoke(HttpMethod.POST, collection, new ParameterizedCollectionType<T>(memberClass),
                         Response.class, Response.class);
     }
     
@@ -485,7 +486,7 @@ public class WebClient extends AbstractC
      */
     public <T1, T2> T2 postCollection(Object collection, Class<T1> memberClass,

                                             Class<T2> responseClass) {
-        Response r = doInvoke("POST", collection, new ParameterizedCollectionType<T1>(memberClass),
+        Response r = doInvoke(HttpMethod.POST, collection, new ParameterizedCollectionType<T1>(memberClass),
                               responseClass, responseClass);
         return responseClass.cast(responseClass == Response.class ? r : r.getEntity());
     }
@@ -500,7 +501,7 @@ public class WebClient extends AbstractC
     public <T1, T2> Collection<? extends T2> postAndGetCollection(Object collection,

                                                                   Class<T1> memberClass,

                                                                   Class<T2> responseClass)
{
-        Response r = doInvoke("POST", collection, new ParameterizedCollectionType<T1>(memberClass),

+        Response r = doInvoke(HttpMethod.POST, collection, new ParameterizedCollectionType<T1>(memberClass),

                               Collection.class, new ParameterizedCollectionType<T2>(responseClass));
         return CastUtils.cast((Collection<?>)r.getEntity(), responseClass);
     }
@@ -514,7 +515,7 @@ public class WebClient extends AbstractC
      */
     public <T> Collection<? extends T> postObjectGetCollection(Object body, 
                                                                   Class<T> responseClass)
{
-        Response r = doInvoke("POST", body, null, Collection.class, 
+        Response r = doInvoke(HttpMethod.POST, body, null, Collection.class, 
                               new ParameterizedCollectionType<T>(responseClass));
         return CastUtils.cast((Collection<?>)r.getEntity(), responseClass);
     }
@@ -526,7 +527,7 @@ public class WebClient extends AbstractC
      * @return typed collection
      */
     public <T> Collection<? extends T> postAndGetCollection(Object body, Class<T>
memberClass) {
-        return invokeAndGetCollection("POST", body, memberClass);
+        return invokeAndGetCollection(HttpMethod.POST, body, memberClass);
     }
     
     /**
@@ -536,7 +537,7 @@ public class WebClient extends AbstractC
      * @return typed collection
      */
     public <T> Collection<? extends T> getCollection(Class<T> memberClass)
{
-        return invokeAndGetCollection("GET", null, memberClass);
+        return invokeAndGetCollection(HttpMethod.GET, null, memberClass);
     }
     
     /**
@@ -547,7 +548,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T get(Class<T> responseClass) {
-        return invoke("GET", null, responseClass);
+        return invoke(HttpMethod.GET, null, responseClass);
     }
     
 
@@ -558,7 +559,7 @@ public class WebClient extends AbstractC
      *         can be obtained too, see Client.getResponse()
      */
     public <T> T get(GenericType<T> responseType) {
-        return invoke("GET", null, responseType);
+        return invoke(HttpMethod.GET, null, responseType);
     }
     
     /**
@@ -568,7 +569,7 @@ public class WebClient extends AbstractC
      * @return the future
      */
     public <T> Future<T> get(InvocationCallback<T> callback) {
-        return doInvokeAsyncCallback("GET", null, null, null, callback);
+        return doInvokeAsyncCallback(HttpMethod.GET, null, null, null, callback);
     }
     
     /**
@@ -1187,17 +1188,17 @@ public class WebClient extends AbstractC
 
         @Override
         public <T> Future<T> get(Class<T> responseType) {
-            return method("GET", responseType);
+            return method(HttpMethod.GET, responseType);
         }
 
         @Override
         public <T> Future<T> get(GenericType<T> responseType) {
-            return method("GET", responseType);
+            return method(HttpMethod.GET, responseType);
         }
 
         @Override
         public <T> Future<T> get(InvocationCallback<T> callback) {
-            return method("GET", callback);
+            return method(HttpMethod.GET, callback);
         }
 
         @Override
@@ -1207,17 +1208,17 @@ public class WebClient extends AbstractC
 
         @Override
         public <T> Future<T> put(Entity<?> entity, Class<T> responseType)
{
-            return method("PUT", entity, responseType);
+            return method(HttpMethod.PUT, entity, responseType);
         }
 
         @Override
         public <T> Future<T> put(Entity<?> entity, GenericType<T>
responseType) {
-            return method("PUT", entity, responseType);
+            return method(HttpMethod.PUT, entity, responseType);
         }
 
         @Override
         public <T> Future<T> put(Entity<?> entity, InvocationCallback<T>
callback) {
-            return method("PUT", entity, callback);
+            return method(HttpMethod.PUT, entity, callback);
         }
 
         @Override
@@ -1227,17 +1228,17 @@ public class WebClient extends AbstractC
 
         @Override
         public <T> Future<T> post(Entity<?> entity, Class<T> responseType)
{
-            return method("POST", entity, responseType);
+            return method(HttpMethod.POST, entity, responseType);
         }
 
         @Override
         public <T> Future<T> post(Entity<?> entity, GenericType<T>
responseType) {
-            return method("POST", entity, responseType);
+            return method(HttpMethod.POST, entity, responseType);
         }
 
         @Override
         public <T> Future<T> post(Entity<?> entity, InvocationCallback<T>
callback) {
-            return method("POST", entity, callback);
+            return method(HttpMethod.POST, entity, callback);
         }
 
         @Override
@@ -1247,27 +1248,27 @@ public class WebClient extends AbstractC
 
         @Override
         public <T> Future<T> delete(Class<T> responseType) {
-            return method("DELETE", responseType);
+            return method(HttpMethod.DELETE, responseType);
         }
 
         @Override
         public <T> Future<T> delete(GenericType<T> responseType) {
-            return method("DELETE", responseType);
+            return method(HttpMethod.DELETE, responseType);
         }
 
         @Override
         public <T> Future<T> delete(InvocationCallback<T> callback) {
-            return method("DELETE", callback);
+            return method(HttpMethod.DELETE, callback);
         }
 
         @Override
         public Future<Response> head() {
-            return method("HEAD");
+            return method(HttpMethod.HEAD);
         }
 
         @Override
         public Future<Response> head(InvocationCallback<Response> callback) {
-            return method("HEAD", callback);
+            return method(HttpMethod.HEAD, callback);
         }
 
         @Override
@@ -1277,17 +1278,17 @@ public class WebClient extends AbstractC
 
         @Override
         public <T> Future<T> options(Class<T> responseType) {
-            return method("OPTIONS", responseType);
+            return method(HttpMethod.OPTIONS, responseType);
         }
 
         @Override
         public <T> Future<T> options(GenericType<T> responseType) {
-            return method("OPTIONS", responseType);
+            return method(HttpMethod.OPTIONS, responseType);
         }
 
         @Override
         public <T> Future<T> options(InvocationCallback<T> callback) {
-            return method("OPTIONS", callback);
+            return method(HttpMethod.OPTIONS, callback);
         }
 
         @Override

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/client/OAuthClientUtils.java
Thu Mar  7 16:47:46 2013
@@ -25,6 +25,7 @@ import java.util.UUID;
 
 import javax.ws.rs.ProcessingException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.UriBuilder;
 
 import net.oauth.OAuth;
@@ -33,7 +34,6 @@ import net.oauth.OAuthConsumer;
 import net.oauth.OAuthMessage;
 
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.rs.security.oauth.provider.OAuthServiceException;
 
 /**
@@ -185,8 +185,8 @@ public final class OAuthClientUtils {
         try {
             tokenService.replaceHeader("Authorization", header);
             Form form = tokenService.post(null, Form.class);
-            return new Token(form.getData().getFirst("oauth_token"),
-                    form.getData().getFirst("oauth_token_secret"));
+            return new Token(form.asMap().getFirst("oauth_token"),
+                    form.asMap().getFirst("oauth_token_secret"));
         } catch (WebApplicationException ex) {
             throw new OAuthServiceException(ex);
         }

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/OOBResponseProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/OOBResponseProvider.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/OOBResponseProvider.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/OOBResponseProvider.java
Thu Mar  7 16:47:46 2013
@@ -28,6 +28,7 @@ import java.lang.reflect.Type;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
@@ -36,7 +37,7 @@ import javax.ws.rs.ext.Provider;
 
 import net.oauth.OAuth;
 
-import org.apache.cxf.jaxrs.ext.form.Form;
+import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.provider.FormEncodingProvider;
 import org.apache.cxf.rs.security.oauth.utils.OAuthConstants;
 
@@ -57,7 +58,7 @@ public class OOBResponseProvider impleme
         Class<OOBAuthorizationResponse> clazz, Type genericType, Annotation[] annotations,
MediaType mt, 
         MultivaluedMap<String, String> headers, InputStream is) throws IOException
{
         Form form = formProvider.readFrom(Form.class, Form.class, annotations, mt, headers,
is);
-        MultivaluedMap<String, String> data = form.getData();
+        MultivaluedMap<String, String> data = form.asMap();
         OOBAuthorizationResponse resp = new OOBAuthorizationResponse();
         
         resp.setRequestToken(data.getFirst(OAuth.OAUTH_TOKEN));
@@ -84,11 +85,11 @@ public class OOBResponseProvider impleme
                         MediaType mt, MultivaluedMap<String, Object> headers, OutputStream
os) 
         throws IOException, WebApplicationException {
         
-        Form form = new Form();
-        form.set(OAuth.OAUTH_VERIFIER, obj.getVerifier());
-        form.set(OAuth.OAUTH_TOKEN, obj.getRequestToken());
+        Form form = new Form(new MetadataMap<String, String>());
+        form.param(OAuth.OAUTH_VERIFIER, obj.getVerifier());
+        form.param(OAuth.OAUTH_TOKEN, obj.getRequestToken());
         if (obj.getState() != null) {
-            form.set(OAuthConstants.X_OAUTH_STATE, obj.getState());
+            form.param(OAuthConstants.X_OAUTH_STATE, obj.getState());
         }
         formProvider.writeTo(form, Form.class, Form.class, anns, mt, headers, os);
     }

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
Thu Mar  7 16:47:46 2013
@@ -24,12 +24,13 @@ import java.io.InputStream;
 
 import javax.ws.rs.NotAuthorizedException;
 import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
 import org.w3c.dom.Element;
 
 import org.apache.cxf.common.util.Base64Exception;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.provider.FormEncodingProvider;
 import org.apache.cxf.jaxrs.utils.FormUtils;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
@@ -57,22 +58,23 @@ public class Saml2BearerAuthHandler exte
     
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
-        Form form = readFormData(message);    
-        String assertionType = form.getData().getFirst(Constants.CLIENT_AUTH_ASSERTION_TYPE);
+        Form form = readFormData(message);
+        MultivaluedMap<String, String> formData = form.asMap();
+        String assertionType = formData.getFirst(Constants.CLIENT_AUTH_ASSERTION_TYPE);
         String decodedAssertionType = assertionType != null ? HttpUtils.urlDecode(assertionType)
: null;
         if (decodedAssertionType == null || !Constants.CLIENT_AUTH_SAML2_BEARER.equals(decodedAssertionType))
{
             throw new NotAuthorizedException(errorResponse());
         }
-        String assertion = form.getData().getFirst(Constants.CLIENT_AUTH_ASSERTION_PARAM);
+        String assertion = formData.getFirst(Constants.CLIENT_AUTH_ASSERTION_PARAM);
         
         Element token = readToken(message, assertion);         
-        String clientId = form.getData().getFirst(OAuthConstants.CLIENT_ID);
+        String clientId = formData.getFirst(OAuthConstants.CLIENT_ID);
         validateToken(message, token, clientId);
         
         
-        form.getData().remove(OAuthConstants.CLIENT_ID);
-        form.getData().remove(Constants.CLIENT_AUTH_ASSERTION_PARAM);
-        form.getData().remove(Constants.CLIENT_AUTH_ASSERTION_TYPE);
+        formData.remove(OAuthConstants.CLIENT_ID);
+        formData.remove(Constants.CLIENT_AUTH_ASSERTION_PARAM);
+        formData.remove(Constants.CLIENT_AUTH_ASSERTION_TYPE);
         
         // restore input stream
         try {

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthOutInterceptor.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthOutInterceptor.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthOutInterceptor.java
Thu Mar  7 16:47:46 2013
@@ -18,8 +18,9 @@
  */
 package org.apache.cxf.rs.security.oauth2.auth.saml;
 
+import javax.ws.rs.core.Form;
+
 import org.apache.cxf.common.util.Base64Exception;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.rs.security.oauth2.saml.Base64UrlUtility;
 import org.apache.cxf.rs.security.oauth2.saml.Constants;
 import org.apache.cxf.rs.security.saml.SamlFormOutInterceptor;
@@ -28,8 +29,8 @@ public class Saml2BearerAuthOutIntercept
 
     @Override
     protected void updateForm(Form form, String encodedToken) {
-        form.set(Constants.CLIENT_AUTH_ASSERTION_TYPE, Constants.CLIENT_AUTH_SAML2_BEARER);
-        form.set(Constants.CLIENT_AUTH_ASSERTION_PARAM, encodedToken);
+        form.param(Constants.CLIENT_AUTH_ASSERTION_TYPE, Constants.CLIENT_AUTH_SAML2_BEARER);
+        form.param(Constants.CLIENT_AUTH_ASSERTION_PARAM, encodedToken);
     }
     
     @Override

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/OAuthClientUtils.java
Thu Mar  7 16:47:46 2013
@@ -26,12 +26,12 @@ import java.util.Map;
 
 import javax.ws.rs.ProcessingException;
 import javax.ws.rs.client.ResponseProcessingException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 
 import org.apache.cxf.common.util.Base64Utility;
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenGrant;
 import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken;
 import org.apache.cxf.rs.security.oauth2.common.OAuthError;
@@ -210,7 +210,7 @@ public final class OAuthClientUtils {
         Form form = new Form(grant.toMap());
         if (extraParams != null) {
             for (Map.Entry<String, String> entry : extraParams.entrySet()) {
-                form.getData().add(entry.getKey(), entry.getValue());
+                form.param(entry.getKey(), entry.getValue());
             }
         }
         if (consumer != null) {
@@ -225,8 +225,8 @@ public final class OAuthClientUtils {
                 }
                 accessTokenService.header("Authorization", sb.toString());
             } else {
-                form.set(OAuthConstants.CLIENT_ID, consumer.getKey());
-                form.set(OAuthConstants.CLIENT_SECRET, consumer.getSecret());
+                form.param(OAuthConstants.CLIENT_ID, consumer.getKey());
+                form.param(OAuthConstants.CLIENT_SECRET, consumer.getSecret());
             }
         } else {
             // in this case the AccessToken service is expected to find a mapping between

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
(original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
Thu Mar  7 16:47:46 2013
@@ -22,9 +22,10 @@ package org.apache.cxf.rs.security.saml;
 import java.net.URI;
 
 import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.impl.UriInfoImpl;
 import org.apache.cxf.jaxrs.provider.FormEncodingProvider;
 import org.apache.cxf.jaxrs.utils.FormUtils;
@@ -45,12 +46,13 @@ public class SamlFormInHandler extends A
         Message message = JAXRSUtils.getCurrentMessage();
         
         Form form = readFormData(message);    
-        String assertion = form.getData().getFirst(SAML_ELEMENT);
+        MultivaluedMap<String, String> formData = form.asMap();
+        String assertion = formData.getFirst(SAML_ELEMENT);
         
         handleToken(message, assertion);         
 
         // redirect if needed
-        String samlRequestURI = form.getData().getFirst(SAML_RELAY_STATE);
+        String samlRequestURI = formData.getFirst(SAML_RELAY_STATE);
         if (samlRequestURI != null) {
             // RelayState may actually represent a reference to a transient local state
             // containing the actual REQUEST URI client was using before being redirected

@@ -61,8 +63,8 @@ public class SamlFormInHandler extends A
                 return;
             }
         }
-        form.getData().remove(SAML_ELEMENT);
-        form.getData().remove(SAML_RELAY_STATE);
+        formData.remove(SAML_ELEMENT);
+        formData.remove(SAML_RELAY_STATE);
         
         // restore input stream
         try {

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
(original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormOutInterceptor.java
Thu Mar  7 16:47:46 2013
@@ -22,6 +22,7 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.logging.Logger;
 
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
@@ -29,7 +30,6 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
 import org.apache.ws.security.saml.ext.AssertionWrapper;
@@ -68,7 +68,7 @@ public class SamlFormOutInterceptor exte
     }
         
     protected void updateForm(Form form, String encodedToken) {
-        form.set(SAML_ELEMENT, encodedToken);
+        form.param(SAML_ELEMENT, encodedToken);
     }
     
     @SuppressWarnings("unchecked")

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
Thu Mar  7 16:47:46 2013
@@ -32,6 +32,7 @@ import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.Response;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -49,7 +50,6 @@ import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.ext.xml.XMLSource;
 import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
 import org.apache.cxf.jaxrs.model.wadl.WadlGenerator;
@@ -300,9 +300,9 @@ public class JAXRSClientServerSpringBook
         String endpointAddress =
             "http://localhost:" + PORT + "/the/thebooks9/depth-form"; 
         WebClient wc = WebClient.create(endpointAddress);
-        Response r = wc.form(new Form().set("a", "b"));
+        Response r = wc.form(new Form().param("a", "b"));
         assertEquals(204, r.getStatus());
-        r = wc.form(new Form().set("a", "b").set("c", "b"));
+        r = wc.form(new Form().param("a", "b").param("c", "b"));
         assertEquals(413, r.getStatus());
     }
     

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Thu Mar  7 16:47:46 2013
@@ -32,6 +32,7 @@ import java.util.Map;
 
 import javax.ws.rs.NotFoundException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
@@ -65,7 +66,6 @@ import org.apache.cxf.jaxrs.client.JAXRS
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.ResponseExceptionMapper;
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.jaxrs.ext.xml.XMLSource;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
@@ -579,7 +579,7 @@ public class JAXRSSoapBookTest extends A
         client.path("/bookstore/books/139/subresource4/139/CXF Rocks");
         Book bean = new Book("CXF Rocks", 139L);
         Form form = new Form();
-        form.set("name", "CXF Rocks").set("id", Long.valueOf(139L));
+        form.param("name", "CXF Rocks").param("id", Long.toString(139L));
         Book b = readBook((InputStream)client.matrix("", bean).query("", bean).form(form).getEntity());
         assertEquals(139, b.getId());
         assertEquals("CXF Rocks", b.getName());
@@ -668,9 +668,9 @@ public class JAXRSSoapBookTest extends A
         String baseAddress = "http://localhost:" + PORT 
             + "/test/services/rest/bookstore/books/679/subresource3";
         WebClient wc = WebClient.create(baseAddress);
-        Form f = new Form();
-        f.set("id", "679").set("name", "CXF in Action - ")
-            .set("name", "679");
+        Form f = new Form(new MetadataMap<String, String>());
+        f.param("id", "679").param("name", "CXF in Action - ")
+            .param("name", "679");
         Book b = readBook((InputStream)wc.accept("application/xml")
                           .form(f).getEntity());
         assertEquals(679, b.getId());

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
Thu Mar  7 16:47:46 2013
@@ -21,12 +21,12 @@ package org.apache.cxf.systest.jaxrs.sec
 
 import java.io.InputStream;
 
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.Response;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Unmarshaller;
 
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
 import org.apache.cxf.systest.jaxrs.Book;
 
 import org.junit.BeforeClass;
@@ -54,7 +54,7 @@ public class JAXRSSpringSecurityClassTes
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstorestorage/bookforms",

                                         "foo", "bar", null);
         wc.accept("application/xml");
-        Response r = wc.form(new Form().set("name", "CXF Rocks").set("id", "123"));
+        Response r = wc.form(new Form().param("name", "CXF Rocks").param("id", "123"));
         
         Book b = readBook((InputStream)r.getEntity());
         assertEquals("CXF Rocks", b.getName());
@@ -67,7 +67,7 @@ public class JAXRSSpringSecurityClassTes
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstorestorage/bookforms2",

                                         "foo", "bar", null);
         wc.accept("application/xml");
-        Response r = wc.form(new Form().set("name", "CXF Rocks").set("id", "123"));
+        Response r = wc.form(new Form().param("name", "CXF Rocks").param("id", "123"));
         
         Book b = readBook((InputStream)r.getEntity());
         assertEquals("CXF Rocks", b.getName());

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java?rev=1453953&r1=1453952&r2=1453953&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
Thu Mar  7 16:47:46 2013
@@ -25,6 +25,7 @@ import java.util.Map;
 
 import javax.ws.rs.ProcessingException;
 import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Form;
 import javax.ws.rs.core.MediaType;
 
 import org.apache.cxf.Bus;
@@ -32,7 +33,7 @@ import org.apache.cxf.bus.spring.SpringB
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.ext.form.Form;
+import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.provider.FormEncodingProvider;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.rs.security.saml.SamlEnvelopedOutInterceptor;
@@ -85,7 +86,7 @@ public class JAXRSSamlTest extends Abstr
         
         wc.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_XML);
         try {
-            Book book = wc.post(new Form().set("name", "CXF").set("id", 125),
+            Book book = wc.post(new Form(new MetadataMap<String, String>()).param("name",
"CXF").param("id", "125"),
                                 Book.class);                
             assertEquals(125L, book.getId());
         } catch (WebApplicationException ex) {
@@ -142,7 +143,7 @@ public class JAXRSSamlTest extends Abstr
         
         wc.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_XML);
         try {
-            Book book = wc.post(new Form().set("name", "CXF").set("id", 125),
+            Book book = wc.post(new Form(new MetadataMap<String, String>()).param("name",
"CXF").param("id", "125"),
                                 Book.class);                
             assertEquals(125L, book.getId());
         } catch (WebApplicationException ex) {



Mime
View raw message