On 9/9/10 6:49 PM, Charles Moulliard wrote:
Hi,

I try in my camel cxf bean to retrieve query parameters of my HTTP POST
request. No error is reported but I can get this property.

Request : curl.exe -i -X POST
http://localhost:9292/jway/validateForm?formID=profil

INFO: c149af70-d990-4746-8528-2d9ace11832a>>>  (RestToSOAP) from(
http://localhost:9292) -->  formRequestREST<<<  Pattern:InOut,
Headers:{User-Agent=curl/7.20.0 (i686-pc-mi
ngw32) libcurl/7.20.0 OpenSSL/0.9.8k zlib/1.2.3,
CamelHttpCharacterEncoding=null, Content-Type=null, CamelHttpUrl=
http://localhost:9292/jway/validateForm, CamelHttpPath=/
jway/validateForm, CamelHttpMethod=POST, Host=localhost:9292,
CamelHttpQuery=formID=profil, Accept=*/*, formID=profil,
CamelHttpUri=/jway/validateForm},

From the trace, we can see that the query parameter of the request is there
-->  formID=profil but the object returned does not contain this info

     @POST
     @Path("/validateForm")
     public Response validateForm(
             @QueryParam("formID") String formID,
             @QueryParam("dataID") String dataID,
             @QueryParam("draftID") String draftID,
             @QueryParam("userID") String userID,
             @QueryParam("draftData") String draftData) {

         Form form = new Form();
         form.setFormID(formID);
         form.setDataID(dataID);
         form.setDraftID(draftID);
         form.setUserID(userID);
         form.setAction("VALIDATE");
         form.setDraftData(draftData);

         producer.sendBodyAndHeader(URI_DIRECT, form, "ACTION", "VALIDATE");
         return Response.ok(form).build();
     }

-->  return :

Can you try to write some log in the validateForm to see if the fromID has the value ?

If it's null, that could be a bug of camel cxf bean.


<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><Form><action>VALIDATE</action></Form>

Regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com |  Twitter :
http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard


Reply via email to