- This topic has 7 replies, 4 voices, and was last updated 8 years, 6 months ago by support-swapna.
-
AuthorPosts
-
snifiraParticipantHi,
I am using myeclipse and i have generated Spring MVC application using Spring Scaffolding method.
I have generated MVC application using Customer Table as explained in the Tutorial of Scaffolding. I can test the application successfully from my web browser.
While generating application, i have selected option Generate Restful Web services, Generate Restful Web services and Generate JSON Support.. My problem is i am not able to test the generated web Service. I could see CustomerRestController.java file generated so it seems the generation was proper. I tried following option to test the web service.
1. In the chrome addon RestEasy or RestClient typed http://localhost:8080/chouetteWebService/Companies but I get a 406 not accepted status error
2. Tried by Right clicking on Project to get option “Try with REST Webservice explorer” but that option doesn’t come up.
3. when I add the following headers={“Accept = application/json”;”Content-Type = application/json”} request headers (both or ine by one) I get the 415 Unsupported Media Type status error.
If any one can help me on how to test the REST webservice generated using Scaffolding, that would be great help.
Thanks,
snifira
snifiraParticipant*PS: I created a web project before scaffolding
I also tried a service Web Project and I added the jackson libraries but still have the same issuethank you for your time
- This reply was modified 9 years, 5 months ago by snifira.
support-swapnaModeratorsnifira,
Sorry that you are seeing this issue.
You should install the JAX-RS facet manually to the project instead of selecting the ‘Generate REST Web Services’ and ‘Generate JSON support’. Currently those options are not supported.
Right click on the project > MyEclipse > Project Facets[Capabilities] > Install JAX-RS facet.
Let us know how it works for you.
–Swapna
MyEclipse Support
snifiraParticipantwell, as you can see in the screenshot, there is no “Install JAX-RS facet” !!!
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorsnifira,
From the screenshot you sent, it looks like your project already has JAX-RS facet installed.
Please recheck whether ‘JAX-RS’ is installed from the project > Properties > MyEclipse > Project Facets.What happens when you test with REST Web Services Explorer (Right click on the project > MyEclipse > Test with REST Web Services Explorer )?
If you are still seeing issues, please send us the project for further investigation.
Let us know how it works for you.
–Swapna
MyEclipse Support
ajendraParticipantif my web application have not any error then my eclipse produce fast output and if my web application have any error then my eclipse produce launching client that is running 15 min. and finally not produce any error or debug window………why? pls help me…..
newnobParticipantHi,
I am using myeclipse and i have generated Spring MVC application using Spring Scaffolding method. I have generated MVC application using two tables with relation and one table without relation. I can test the application successfully from my web browser.While generating application, i have selected option Generate Restful Web services, Generate Restful Web services and Generate JSON Support.
But when test rest, there are all messages-“The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request “accept” headers.”( in source demo5)
When I changed the jackson version to 2.2.3 then the object without relation can get correct json response. But two object with relation can not get their json response, it get the xml。in xml list the one to many object list, so it can not be json.( in source demo6)
http://localhost:8080/demo4/Article (json OK)
http://localhost:8080/demo4/User (json OK)
http://localhost:8080/demo4/User/19 ( only xml)
How can i resolve the problem to open the restful response of object with relation?
Attachments:
You must be logged in to view attached files.
support-swapnaModeratornewnob,
I am afraid this looks like a RESTful/JSON development query.
Please cross post to development related forums like stackoverflow.com for better support from the developer community.Hope this helps. Let us know if you see any issues.
–Swapna
MyEclipse Support -
AuthorPosts