//webservices 调用接口
public interface Help { Collection<String> getAssetByRfid();
}//接口实现类
public class RfidHelpImp implements RfidHelp {
public Collection<String> getAssetByRfid(){
Collection<String> c = new ArrayList<String>();
c.add("-2,,,,,,,");
c.add("-3,,,,,,,");
return c;
}}
//测试类
public class WSClient {
public static void main(String[] args) {
try{
String serverURLStr = "http://localhost:8089/service1/service/RfidHelp?wsdl";
Client client = new Client(new URL( serverURLStr ));
Object[] s= client.invoke("getAssetByRfid", new Object[0]);
System.out.println(s.length);
for(int i=0;i<s.length;i++)
System.out.println(s[i].toString());
} catch(Exception e){
throw new RuntimeException(e);
}
}
}打印结果为:
1
[#document: null]什么原因.Collection集合因不需序列化啊
解决方案 »
- 防止用户在地址栏瞎敲
- spring2.5.6+ jpa(hibernate3.5.1)配置dbcp数据源的小问题
- strust 取用session
- Spring2+Hibernate3.1+Oracle9i(9.2.0.1.0)无法写入CLOB字段(附详细情况)
- struts+hibernate的问题,请大家指教!
- servlet文件上传过大提示
- Eclipse、Tomcat、lomboz.213的问题
- Socket发送和接收消息现在碰到了极难的问题,高分赠送!
- myeclipse开发消息驱动Bean,如何关联jms类的源码?
- 求大佬帮忙,最近在自学springmvc碰到点问题
- 页面表单怎么只提交修改的部分
- 一个关于JNDI访问服务器的问题
发出解决办法