Keith R. Davis wrote:
> 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.
>
I assume you have a suitable method annotated with @PUT in the same
resource class, right? A 404 (if it came from JAX-RS would typically
mean no method could be found to handle the incoming URL.
The only other thought I have is an idle curiousity one ... does it work
without the trailing slash? That's the way I've been formatting my URLs
and it seems to work fine.
Craig
> 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...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>