I cant understand why its happening this.. in other places i make requests like the one that fails and work fine
POST /projects/1/assets HTTP/1.1Host: localhostUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)Accept: application/json, text/javascript, */*Accept-Language: ca,en-us;q=0.7,it;q=0.3Accept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Proxy-Connection: keep-aliveContent-Type: application/x-www-form-urlencoded; charset=UTF-8X-Requested-With: XMLHttpRequestReferer:
http://localhost/projects/1/assets/newCookie: JSESSIONID=1bb45c8173eba1145cf57e0ed37ePragma: no-cacheCache-Control: no-cacheContent-Length: 31
environment=&url=&ip=&hostname=
Response is 200 OK
My Java method is declared this way (but the request didnt reach my code):@POST_at_Produces({"application/json"})public Response post(@Context UriInfo uriInfo, @PathParam("projectId") int projectId, @FormParam("identifier") String identifier, @FormParam("usersId") Long usersId, @FormParam("statusId") Integer statusId, @FormParam("weaknessesId") Integer weaknessesId, @FormParam("name") String name, @FormParam("description") String description, @FormParam("consequences") String consequences, @FormParam("mitigations") String mitigations, @FormParam("cvssBase") java.math.BigDecimal cvssBase, @FormParam("cvssTemporal") java.math.BigDecimal cvssTemporal, @FormParam("cvssEnvironment") java.math.BigDecimal cvssEnvironment, @FormParam("standardProvidersCodesId") Long standardProvidersCodesId, @FormParam("visibility") String visibility, @FormParam("severity") Integer severity, @FormParam("difficulty") Integer difficulty, @FormParam("probability") Integer probability, @FormParam("risk") Integer risk) throws SystemException{....}
Any help is appreciated.
From: noseya_at_hotmail.com
To: users_at_jersey.dev.java.net
Date: Tue, 22 Sep 2009 13:50:08 +0200
Subject: [Jersey] 400 Bad Request (bug?)
Hi all :)
I'm getting this error, and i think that is a bug. This is my request:
POST /projects/1/vulnerabilities HTTP/1.1Host: localhostUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)Accept: application/json, text/javascript, */*Accept-Language: ca,en-us;q=0.7,it;q=0.3Accept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Proxy-Connection: keep-aliveContent-Type: application/x-www-form-urlencoded; charset=UTF-8X-Requested-With: XMLHttpRequestReferer:
http://localhost/projects/1/vulnerabilities/newCookie: JSESSIONID=16f95e59d3b1b0e954310c190c60Content-Length: 161
identifier=identifier&usersId=1&statusId=1&weaknessesId=4&name=name&description=description&visibility=I&standardProvidersCodesId=&severity=2&difficulty=2&risk=1
THe response is 400 Bad Request.
What you see in bold is causing the bad request. Take it out and works fine.
Thanks,
Jordi
Charlas más divertidas con el nuevo Windows Live Messenger
_________________________________________________________________
¿Quieres ver los mejores videos de MSN? Enciende Messenger TV
http://messengertv.msn.com/mkt/es-es/default.htm