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 created a simple REST webservice from database table "people" table in the in the default derby (sample) database in netbeans [app on APP] When I am trying to test POST (application/xml) method from the local html client created by netbeans with following data , I get error <?xml version="1.0"?> <people> <city>West Bengal</city> <country>India</country> <dob>2009-12-01T00:00:00+05:30</dob> <email>riyer@ieee.org</email> <name>Ramesh Iyer</name> <state>Tamil Nadu</state> <uid>3000</uid> </people> Error POST RequestFailed RequestFailed --> Status: () Response: { } However when I do a subsequent get request , the entry is already created in the table. Hence the error message seems to be misleading. Same happens with PUT request , data gets changed in the required field but test client's out put says that request failed which is misleading
This is not P2. Please use appropriate priority. You description is poor. Please describe : - EXACT steps of you project creation. - What database do you use ? What is the table "people" ? There is no any information about it. - How do you create RESTful WS ( exact UI steps ) ? - What J2EE server do you use ? Without this information I cannot identify the problem if any.
Please fine the required description inline - EXACT steps of you project creation. 1.Create a new "Web Application" project click next 2.choose glassfish server 3.1 click next 3. Click Finish - What database do you use ? What is the table "people" ? 1.Using the following in-built netBeans database jdbc:derby://localhost:1527/sample [app on APP] You can find the the table "people" is in the app schema - How do you create RESTful WS ( exact UI steps ) ? 1.Right click on the project node in the navigator 2.Select "New" -> "RestFul Webservice from databse" click next 3.select data source "JDBC/sample" 4.Add people table click next 5.Give package name "entity" click next 6.click next 7. Click Finish - What J2EE server do you use ? I am using Glassfish server 3.1 Let me know if you need more information.
>I created a simple REST webservice from database table "people" table in the in >the default derby (sample) database in netbeans [app on APP] I forgot to say that I don't see "people" DB in default derby APP . Did you create it ?(In reply to comment #2) > Please fine the required description inline > > - EXACT steps of you project creation. > > 1.Create a new "Web Application" project click next > 2.choose glassfish server 3.1 click next > 3. Click Finish > > - What database do you use ? What is the table "people" ? > > 1.Using the following in-built netBeans database > > jdbc:derby://localhost:1527/sample [app on APP] > > You can find the the table "people" is in the app schema > > - How do you create RESTful WS ( exact UI steps ) ? > > 1.Right click on the project node in the navigator > 2.Select "New" -> "RestFul Webservice from databse" click next > 3.select data source "JDBC/sample" > 4.Add people table click next > 5.Give package name "entity" click next > 6.click next > 7. Click Finish > > > - What J2EE server do you use ? > I am using Glassfish server 3.1 > > Let me know if you need more information. Thank you for information. I don't have "people" table in my DB schema. Could you please try some other table for equal steps to reproduce. In my case there are : Customer, DiscountCode Manufacturer MicroMarket Product ProductCode PurchaseOrder. Thanks.
I tried the test case on "Manufacturer" table with the following request Method POST(application/xml) Content <?xml version="1.0"?> <manufacturer> <addressline1>7654 1st Street</addressline1> <addressline2>Suite 100</addressline2> <city>Mountain View</city> <email>www.google@gmail.com</email> <fax>408-456-9900</fax> <manufacturerId>20985678</manufacturerId> <name>Google Inc</name> <phone>650-456-6688</phone> <rep>John Snow</rep> <state>CA</state> <zip>94043</zip> </manufacturer> It Showed the same error. Should have ended up with 200 OK Please increment the manufacturerId to see further test cases
Thank you , I will try.
The problem is very minor : probably wrong interpretation of HTTP response code. You've wrote : >Should have ended up with 200 OK No it shouldn't. Please read : http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5 The response is expected ( it actually is result of GF runtime so it is not even NB issue ). Test client recognize it as error. This is probably an issue.
Error message is fixed: web-main#c7c122458a1e
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/c7c122458a1e User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#203085 - "Test RESTful Web Services" page shows error for PUT and POST