How to use the webservice-client classes generated with Eclipse?

后端 未结 1 1000
别跟我提以往
别跟我提以往 2020-12-30 06:54

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 cl

相关标签:
1条回答
  • 2020-12-30 07:22

    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.

    0 讨论(0)
提交回复
热议问题