简体   繁体   English

使用@webservice 将 wsdl 文件/工件导入 SOAP 初学者/测试客户端的 .netbeans

[英]Import wsdl file/artifacts to netbeans for SOAP beginner/test client with @webservice

So I have been able to generate/publish the @webservice test class, view the WSDL in the browser, and then import it through the command prompt to my computers file system, but when I try to use the method to connect a client to it, I get "cannot find symbol" in.netbeans.所以我已经能够生成/发布@webservice 测试 class,在浏览器中查看 WSDL,然后通过命令提示符将其导入我的计算机文件系统,但是当我尝试使用该方法将客户端连接到它时,我在 .netbeans 中得到“找不到符号”。 Do I have to somehow import these files specifically to.netbeans?我是否必须以某种方式专门将这些文件导入 .netbeans? If so how?如果是这样怎么办?

Also, I was a little unsure of how to know what method to call by looking in the artifact files but I am pretty sure I am calling the right one.另外,我有点不确定如何通过查看工件文件来知道调用什么方法,但我很确定我正在调用正确的方法。 This is on page 447 of "Java Cookbook" by Ian Darwin.这是 Ian Darwin 的“Java Cookbook”第 447 页上的内容。 Any help is appreciated, Best Regards, Evan任何帮助表示赞赏,最好的问候,埃文在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

Normally the you'd generate a client stub based on the wsdl file.通常,您会根据 wsdl 文件生成客户端存根。 So you cannot just try to get a port on your class. You所以你不能仅仅尝试在你的 class 上获取一个端口。你

  • Need to generate a client stub based on that wsdl需要根据那个 wsdl 生成一个客户端存根
  • Get your port manually via JaxWS APIs通过 JaxWS API 手动获取端口

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

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