Consuming a web service with the Netbeans Platform

一世执手 提交于 2019-12-11 03:32:05

问题


I have an application that is written with the NetBeans Platform 5.5. I'm having trouble consuming a web service.

If I create a Java SE application in NetBeans, I can add a web service reference without problem.

Since my application is using the NetBeans Platform, many of the menu choices change. So, I cannot figure out how to add a reference to the web service. I've googled this topic a number of ways but haven't found any pages that deal with consuming a service through the platform. They all talk about consuming a service with a Java SE application.

Changing the application from the Platform architecture is not an option.


回答1:


Here is a good tutorial for setting up a Feed Reader on NetBeans Platform. It covers some of the configuration issues for using web services

Blog with an entry about making a web services client

I'd be happy to try and give you a more specific answer if you can give information about the service you want to access.




回答2:


Found this:

  1. Create web service and client using this tutorial
  2. Create library wrapper module for web service client (you don't need to include JAX-WS libs, only your client jar)
  3. In your wrapper module add following dependencies (important):
    • JAX-WS 2.1 API
    • JAX-WS 2.1 and JAXB 2.1 Library (for this you have to check Show Non-API Modules in "Add Module Dependency" window)
  4. If you try to build module after these steps it will fail telling you that your module is not friend of "path-to-netbeans"/java2/modules/org-netbeans-modules-websvc-jaxws21.jar. Right click on JAX-WS 2.1 and JAXB 2.1 Library and choose Edit. Select Implementation Version.

from here.



来源:https://stackoverflow.com/questions/470098/consuming-a-web-service-with-the-netbeans-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!