0
我是java web服務的新手。Java Web服務客戶端+ Axis + Eclipse + Tomcat
現在我試圖創建一個Web服務客戶端來訪問基於WSDL的Web服務。所以使用Eclipse生成所需的客戶端存根/綁定存根/端口/端口代理/ ServiceLocator等
根據我的理解,下一步是創建一個類與主要方法來調用它。任何人都可以幫我寫這段代碼或至少有一些鏈接來引用?
EDITED 非常感謝你的提示@ pavan-kumar。最後我想出下面的代碼,它的工作原理。再次感謝。
package clients;
import requiredClasses;
public class TestClient {
public static void main(String args[]) throws Exception
{
TestPortProxy tProxy = new TestPortProxy();
RequestEntity rEntity = new RequestEntity();
rEntity.setAttribute1(100);
rEntity.setAttribute2("value1");
tProxy.webServiceAction(rEntity);
}
}