简体   繁体   English

在Eclipse中创建Web服务客户端

[英]Creating a web-services client in Eclipse

I need to create a web services client in java/Eclipse to interface with a test management tool from my java testing code. 我需要在java / Eclipse中创建一个Web服务客户端,以与我的Java测试代码中的测试管理工具进行交互。

I successfully set up the client in NetBeans. 我在NetBeans中成功设置了客户端。 This was a fairly painless process using NetBeans' wizard. 使用NetBeans向导,这是一个相当轻松的过程。

However, Eclipse is our IDE of choice, so I need to get the code over to it. 但是,Eclipse是我们选择的IDE,因此我需要将代码传递给它。 I have found and followed steps to implement a web services client in Eclipse. 我已经找到并遵循了在Eclipse中实现Web服务客户端的步骤。 The process in Eclipse is a lot clunkier IMO, but I successfully generated the client. Eclipse中的过程非常笨拙,但我成功生成了客户端。

However, Netbeans and Eclipse don't seem to agree on what the information in the wsdl file means. 但是,Netbeans和Eclipse在wsdl文件中的信息含义上似乎不一致。 NetBeans discovers/creates a larger collection of classes in its 'generated sources' folder than Eclipse does. 与Eclipse相比,NetBeans在“生成的源”文件夹中发现/创建了更大的类集合。

I must be missing something? 我肯定错过了什么?

Looking for anyone who tried to create a ws client in both Netbeans and Eclipse, and is able to shed some light on why there are differences in the code created from the wsdl file, and how to work around it. 寻找任何试图在Netbeans和Eclipse中都创建ws客户端的人,并且能够阐明从wsdl文件创建的代码为何存在差异以及如何解决该问题。

Thanks. 谢谢。

When you create a client using the wizard "Web Service Client" Eclipse, you are using a runtime for WS. 当使用向导“ Eclipse Web Service Client”创建客户端时,将使用WS运行时。 I'm using Java EE developer version of Eclipse Helios (3.6) + JBoss Tools, With JBoss 6.0 server, and I have 4 different runtimes available. 我正在使用带有Eclipse Helios(3.6)+ JBoss Tools的Java EE开发人员版本以及JBoss 6.0服务器,并且有4种不同的运行时可用。

  1. Apache Axis 阿帕奇轴心
  2. Apache Axis2 Apache Axis2
  3. Apache CXF 2.x Apache CXF 2.x
  4. JBossWS JBossWS

Which runtime (framework) are you using under Netbeans? 您在Netbeans下使用哪个运行时(框架)? Using JBossWS, I generated WS client classes from WSDL, and I'm using them in a maven Java EE 6 application, deployed to a JBoss 6.0, and it works perfectly, inside Eclipse and outside (deployed). 使用JBossWS,我从WSDL生成了WS客户端类,并且在maven Java EE 6应用程序中使用了它们,并将其部署到JBoss 6.0中,并且在Eclipse内部和外部(已部署)都可以完美地工作。

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

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