httpsclient.java

来自「axis入门文档、代码 配置好jdk和tomcat」· Java 代码 · 共 15 行

JAVA
15
字号
package anni;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class HttpsClient {
    public static void main(String [] args) throws Exception {
        String endpoint = "https://localhost:8443/axis/services/HelloWorld";//注意区别在这里!https!
        Service  service = new Service();  
        Call     call    = (Call) service.createCall();
        call.setTargetEndpointAddress( new java.net.URL(endpoint) );
        call.setOperationName( "sayHello" );
        String res = (String) call.invoke( new Object[] {} );
        System.out.println( res );
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?