如何使用Eclipse生成的webservice-client类?

发布于 2024-10-02 01:04:19 字数 271 浏览 0 评论 0 原文

我使用 eclipse Helios 创建了一个 Web 服务客户端来使用 axis 1.4 Web 服务。
它生成了 2 个包:
1 - 数据模型。
2 - 客户端。

客户端包内有 5 个类:
1- 服务名称
2- 服务名称代理
3- 服务名称服务
4- 服务名称服务定位器
5- ServiceNameSoapBindingStub

我需要知道这些是什么?和
如何调用带有参数的Web服务方法?

提前致谢

I used eclipse Helios to create a Web Service Client for consuming an axis 1.4 web service.
It generated 2 packages:
1 - datamodel.
2 - client.

Inside client package there are 5 classes:
1- ServiceName
2- ServiceNameProxy
3- ServiceNameService
4- ServiceNameServiceLocator
5- ServiceNameSoapBindingStub

I need to Know what are these ? AND
How to call the web service methods with parameters?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流云如水 2024-10-09 01:04:19

我对 Web 服务非常很陌生,我无法很好地解释这些类是什么,但是,我相信您可以使用代理 code> 类来调用 Web 服务方法。

public class TestClient{
    public static void main(String []args){
        ServiceNameProxy proxy = new ServiceNameProxy();
        proxy.setEndpoint("http://localhost:8080/ServiceName/asdf");//defined in wsdl

        int i = proxy.webServiceMethod(new String(), new String());
    }
}

webServiceMethod() 将是服务中定义的方法名称。

I am very new to Web Services and I can't give a good explanation of what those classes are, but, I believe you can use the Proxy class to call the Web Service methods.

public class TestClient{
    public static void main(String []args){
        ServiceNameProxy proxy = new ServiceNameProxy();
        proxy.setEndpoint("http://localhost:8080/ServiceName/asdf");//defined in wsdl

        int i = proxy.webServiceMethod(new String(), new String());
    }
}

webServiceMethod() would be whatever the name of the method is defined in the service.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文