📄 serviceclient.java
字号:
package com.liuyang.jboss.net.ejb.client;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
public class ServiceClient {
public static void main(String[] args) throws Exception {
String endpoint = "http://localhost:8080/jboss-net/services/CalculatorService";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( "getValue" );
call.setReturnType( XMLType.XSD_INT );
Object ret = call.invoke( new Object [] {});
System.out.println("返回结果 : " + ret);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -