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.

Bug 216527 - RESTful JavaScript Client wizard - inform user that web service cannot be contacted
Summary: RESTful JavaScript Client wizard - inform user that web service cannot be con...
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 12:01 UTC by Jiri Skrivanek
Modified: 2012-09-03 13:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-08-08 12:01:01 UTC
To be able to connect to web service using JavaScript client either it has to be in the same domain or Jersey Cross-Origin Resource Sharing Filter must be created. Once user creates RESTful JavaScript Client and tries to run it he should be informed when connection to web service fails and what to do to fix it. Possibly in the list function there can be some message printed to html when it fails. To reproduce:

- Create Web Project with GF as a target server.
- Use RESTful from Web Service from Database.
- Select f.e. MANUFACTURER table in the wizard.
- finish the wizard
- deploy web project
- call "Test Resource Uri" on web service under "RESTful Web Services" 
node to test it
- open new project wizard
- select "HTML/JavaScript|HTML Application"
- finish the wizard with defaults
- open new file wizard
- choose "ClientSide|RESTful JavaScript Client" and click Next
- click Browse to select "REST Project Resource"
- choose previously created web service
- finish the wizard with default values
- call "Run File" on HTML file but it just shows the Create button and not the list of items
Comment 1 Denis Anisimov 2012-08-13 08:06:22 UTC
web-main#dd64a7b5ab0e
Comment 2 Jiri Skrivanek 2012-08-13 11:54:41 UTC
Still doesn't work for me. It seems that the code where new errorHandler is added is not called at all. Maybe it could be enough to add error:function() to this.collection.fetch(). BTW, I guess one line comments will be properly formatted when they start with space (e.g. " // comment").
Comment 3 Denis Anisimov 2012-08-13 13:04:18 UTC
(In reply to comment #2)
> Still doesn't work for me. It seems that the code where new errorHandler is
> added is not called at all. Maybe it could be enough to add error:function() to
> this.collection.fetch(). BTW, I guess one line comments will be properly
> formatted when they start with space (e.g. " // comment").

Sorry, I put the errorHandler only for Model. Collections model are not handled.
Comment 4 Denis Anisimov 2012-08-13 13:08:04 UTC
web-main#d1770d0fbfb0
Comment 5 Jiri Skrivanek 2012-08-14 12:24:57 UTC
Now it shows 'Unable to fulfil the request' if it is not possible to get data from web service. Possible reason can be found next to alert in JavaScript source code.
Comment 6 Quality Engineering 2012-09-03 13:06:34 UTC
Integrated into 'main-golden', will be available in build *201209031048* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dd64a7b5ab0e
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#216527 - RESTful JavaScript Client wizard - inform user that web service cannot be contacted