简体   繁体   English

我们如何在Java应用程序中调用Web服务?

[英]How can we call a web service in java application?

I want to call a web service in my java application. 我想在Java应用程序中调用Web服务。 How do I achieve this? 我该如何实现? I'm new to web services. 我是Web服务的新手。

Go through this tutorial . 阅读本教程

The basic steps are: 基本步骤是:

  • download (if not already present) a JAX-WS implementation 下载(如果尚不存在)JAX-WS实现
  • generate a java client by importing the wsdl with some tool (see below) 通过使用某些工具导入wsdl来生成Java客户端(请参见下文)
  • invoke methods on the generated client code 在生成的客户端代码上调用方法

This article shows how to do it step by step using NetBean's wizards 本文显示了如何使用NetBean的向导逐步进行操作

Just use Google and search for Webservice and Java. 只需使用Google并搜索Webservice和Java。

Here is a tutorial 这是一个教程

Go to the Apache foundation web site and search for the "AXIS SOAP client"! 请访问Apache基金会网站并搜索“ AXIS SOAP客户端”!

This is well documented and the client side consists of a single JAR file. 这是有据可查的,并且客户端由单个JAR文件组成。

Also I would thourogly recommend SOAPUI for generating and reading test messages. 另外,我会建议使用SOAPUI来生成和读取测试消息。

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

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