Java – how to use the eclipse generated WebService client class?

I use eclipse Helios to create a web service client to consume an axis 1.4 web service

The internal client package has five classes: 1 - service name 2 - servicenameproxy 3 - servicenameservice 4 - servicenameservicelocator 5 - servicenamesoapbindingsub

I need to know what these are? And how to invoke Web service methods using parameters?

Thank you in advance

Solution

I'm very new to web services. I can't explain these classes well, but I believe I can use proxy classes to call 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 () will be the name of the method defined in the service

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>