在websphere6.1中调用axis2发布的接口,不报错误,就是不能调用!急急急!!!
在WebSphere6.1中调用接口的代码如下:
public static void main(String[] args) throws Exception {
RPCServiceClient client = new RPCServiceClient();
Options options = client.getOptions();
// 指定调用WebService的URL
options.setTo(new EndpointReference("http://localhost:8080/axis2/services/HelloService"));
// 指定getName方法的参数值
Object[] objects = new Object[] { "超人" };
// 指定getName方法返回值的数据类型的Class
Class<?>[] classes = new Class[] { String.class };
// 指定要调用的方法名:getName 和 WSDL文件中的命名空间:http://service.com
// 注意:命名空间(http://service.com)与类HelloService的包名(com.service)有一定关系。
QName qname = new QName("http://service.com", "getName");
String result = (String) client.invokeBlocking(qname, objects, classes)[0];
System.out.println(result);
}
调用的时候第一行 RPCServiceClient client = new RPCServiceClient(); 就不执行了,也不报任何错误.
请大神帮忙是看看是什么原因.