简体   繁体   English

REST Web服务,

[英]Rest Web Service,

i am approaching the development of Restful web services for the first time. 我是第一次接触Restful Web服务的开发。 I tried to follow this guide for Netbeans . 我尝试遵循Netbeans的指南 I am stuck at the testing of the web service. 我被困在Web服务的测试中。

When i open the 当我打开

http://localhost:8080/WebServicesTest/test-resbeans.html

page, none of the root resources appears in the left menu. 页面上,没有任何根资源出现在左侧菜单中。 (there should be entities.customer and entities.discountcode) (应该有entity.customer和entity.discountcode)

I really can't find a solution. 我真的找不到解决方案。 Thanks in advance to anyone who likes to give me a hint. 在此先感谢任何喜欢给我提示的人。

--------------- Edit ---------------编辑

If i click on CustomerDB --> Deploy i get an error 如果我单击CustomerDB->部署,则会出现错误

In-place deployment at C:\Users\utente\Documents\NetBeansProjects\CustomerDB\build\web
GlassFish Server 4, deploy, null, false
C:\Users\utente\Documents\NetBeansProjects\CustomerDB\nbproject\build-impl.xml:1071:   
The module has not been deployed.
See the server log for details.

The line 1071 of build-impl.xml is build-impl.xml的第1071行是

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>

I checked out the referenced tutorial. 我签出了参考教程。 Which exact path did you follow? 您遵循哪条确切路径? Did you change anything? 你有改变吗?

Most likely your CustomerDB application is not deployed correctly (see GlassFish Server output in NetBeans) and thus is not able to expose the web service and thus is not displayed in the test page (nothing visible in the side bar). 您的CustomerDB应用程序很可能没有正确部署(请参阅NetBeans中的GlassFish Server输出),因此无法公开Web服务,因此没有显示在测试页中(在侧栏中看不到任何内容)。

I tried the tutorial myself and had that phenomenon when using another database ("test" instead of the sample db, which was not connectable in my installed environment), resulting in a message that "test__pm" resource was not found. 我自己尝试了本教程,并在使用另一个数据库(“ test”而不是示例db(在已安装的环境中无法连接)时出现该现象),导致出现一条消息,提示未找到“ test__pm”资源。 I then created a conection pool and a jdbc reosurce for test and then it worked. 然后,我创建了一个连接池和一个jdbc reosurce进行测试,然后就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM