Bug 980488 - bad response REST methods for helloworld-html5
Summary: bad response REST methods for helloworld-html5
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Examples
Version: 2.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2.4.0
Assignee: Marek Novotny
QA Contact: Stefan Miklosovic
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-02 14:04 UTC by Stefan Miklosovic
Modified: 2015-08-02 23:42 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-16 15:59:32 UTC
Type: Bug
Embargoed:
ppenicka: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFK2-32 0 Major Open bad response REST methods for helloworld-html5 2013-08-12 07:14:03 UTC

Description Stefan Miklosovic 2013-07-02 14:04:11 UTC
Description of problem:
I am unable to test helloworld-html5 application for REST communication on any JBoss AS / EAP server. The problem is that in documentation, it is said I have to query 

http://localhost:8080/jboss-as-helloworld-html5/hello/xml/David

in order to get some xml formatted answer of David (substitue xml to json for json response).

However, I am getting 404/405 error codes.

The solution lies in class org.jboss.as.quickstarts.html5rest.HelloWorld where both endpoints are set. They are set as @POST but it does not make sense, they have to be annotated as @GET. After it, the application behaves correctly.

Web counterpart of the application behaves without issues.

Comment 1 sgilda 2013-07-03 18:24:34 UTC
Issued pull 553 with the fix:
https://github.com/jboss-jdf/jboss-as-quickstart/pull/553

Comment 2 sgilda 2013-07-03 18:25:45 UTC
@pmuir: There is also a 'Quickstarts' component under JBoss Enterprise Application Platform. Would that be a better location for this one?

Comment 3 Pete Muir 2013-07-04 16:06:17 UTC
@sgilda, no this one is targeted at WFK. An issue in JDF is the correct thing.

Comment 4 sgilda 2013-07-04 18:49:56 UTC
@pmuir: OK. This one is fixed an merged.

Comment 5 Petr Penicka 2013-07-07 20:43:06 UTC
Edited doc text for WFK 2.3 release notes.

Comment 6 sgilda 2013-07-08 11:23:46 UTC
The commit with the fix is here:
https://github.com/jboss-jdf/jboss-as-quickstart/commit/f2158fa4fd177b65b4a1f543fbe62165e69b8099

The fix impacts the following files:
helloworld-html5/README.md
helloworld-html5/src/main/java/org/jboss/as/quickstarts/html5rest/HelloWorld.java
helloworld-html5/src/main/webapp/index.html

@ppenicka, @smikloso: Should this fix be applied to the WFK repository (https://github.com/jboss-eap/quickstart/tree/master-wfk23) also?  Or is it too late?

Comment 7 sgilda 2013-07-08 11:25:39 UTC
@ppenicka: Please note, the index.html file also needs modification. Otherwise, the simple "Hello" doesn't work when you click the button.

Comment 9 Petr Penicka 2013-07-08 12:28:05 UTC
Changed the doc text so that the workaround matches the mentioned upstream fix, thanks sgilda for the notice ;)

Comment 10 Petr Penicka 2013-07-08 12:30:10 UTC
.. and inserted the doc text into the right field (Doc Text instead of Environment).

Comment 11 Pete Muir 2013-07-16 15:59:32 UTC
Migrated to JIRA

Comment 12 JBoss JIRA Server 2013-07-30 20:12:15 UTC
Sande Gilda <sgilda> made a comment on jira WFK2-32

This issue was fixed in the community version of the quickstarts here: https://github.com/jboss-jdf/jboss-as-quickstart 

This is the commit that was done on July 3, 2013: https://github.com/jboss-jdf/jboss-as-quickstart/commit/f2158fa4fd177b65b4a1f543fbe62165e69b8099

In the bug comments (https://bugzilla.redhat.com/show_bug.cgi?id=980488#c6), I asked whether the fix needed to be applied to the WFK repository. From the comments after, it's not clear what was decided.

After I fixed bug 980488, I reassigned it to Marek Novotny. Since this is fixed in the community quickstarts, should this JIRA be assigned Marek or someone on the WFK team?

Comment 13 sgilda 2013-07-31 10:50:29 UTC
Added dev_ack flag.


Note You need to log in before you can comment on or make changes to this bug.