users@jersey.java.net

JSON GET followed by PUT

From: Keith R. Davis <keith.davis_at_zunisoft.com>
Date: Fri, 01 Aug 2008 12:46:34 -0600

This will be the dumbest question on this list for today:

While using the web test functionality of 0.8ea within Netbeans 6.1 and
GF v2UR2, if I test one of my resources with a GET (application/json):

    http://localhost:8080/openeprs-svcs/resources/userProfiles/1/

I get the JSON, no problem, looks as expected.

Now if I copy the JSON returned and select PUT (application/json) and
paste the response into the content field and set the id field to '1':

    I get a 404 not found error with no obvious errors in the GF log.

The JSON being used:

{"userProfile":{"@uri":"http://localhost:8080/openeprs-svcs/resources/userProfiles/1/","billName":"","cellPhone":"","city":"","countryRef":{"@uri":"http://localhost:8080/openeprs-svcs/resources/userProfiles/1/country/","id":"223"},"drugId":"","email":"admin@test.com","firstName":"System","homePhone":"","id":"1","lastName":"Administrator","middleName":"","npi":"","postalCode":"","prefix":"","specialtyRef":{"@uri":"http://localhost:8080/openeprs-svcs/resources/userProfiles/1/specialty/","id":"82"},"stateRef":{"@uri":"http://localhost:8080/openeprs-svcs/resources/userProfiles/1/state/","id":"1"},"street1":"","street2":"","suffix":"","taxId":"555-55-5555","upin":"","userRef":{"@uri":"http://localhost:8080/openeprs-svcs/resources/userProfiles/1/user/","id":"1"},"workFax":"","workPhone1":"","workPhone2":""}}

The only modification to the JSON returned by the GET and PUT is that I
update the taxid field. Still fails even with a straight cut and paste.

I must be missing something. When I PUT to
http://localhost:8080/openeprs-svcs/resources/userProfiles/1/ does the
JSON need to be formatted differently from what is returned by the get?

Thanks in advance...