This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I've created a simple resource with two entry points, one for application/csv and one for application/json. I tested this with the Test RESTful web services feature in Netbeans. If I request application/json, the correct data is always returned. If I request application/csv, sometimes application/json is returned, and sometimes application/csv is returned. I'm running this in Firefox. When in the incorrect data is returned for a request for application/csv, I can see from tracing information in the resource that both the application/csv and application/json methods are hit, with the application/csv method being hit first. If I use Firebug, and request application/csv, and the wrong data is returned, if I examine the http header and response in Firebug, I can see that it is application/csv, and the response contains the correct data, but the incorrect data is displayed in the browser.
The combination of application/csv and application/json in @Produces annotation causes the strange behaviour of JavaScript client. The problem must be in generated code.
Fixed. Extend raw text output for text/plain and application/csv http://hg.netbeans.org/web-main/rev/2fea353401af
Integrated into 'main-golden', will be available in build *201007080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2fea353401af User: mkuchtiak@netbeans.org Log: #188324: extend raw text output for application/csv, text/plain