大家好:
 我现在在服务器上发布了一个接口
   public interface ILogonWSService {
public  JSONObject Logon(String userid,String password);
}
实现类
public class LogonWSServiceImpl  implements ILogonWSService{
public JSONObject Logon(String userid, String password) {  
JSONObject jsonObj=new JSONObject();
jsonObj.put("username", "44444");
jsonObj.put("password", "123456");
    return jsonObj;
}}我用客户端调用
    Service service=new ObjectServiceFactory().create(ILogonWSService.class);
        try {
            //获得自定义webservice接口
            ILogonWSService usersService=(ILogonWSService) new XFireProxyFactory().create(service, url);
            //调用该webservice中定义的getUsers()方法
          JSONObject jsonObject=usersService.Logon("333", "444");
           System.out.println(jsonObject+"777--------");
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
是可以调用成功的。但是返回的值一直都为空,我把返回类型改为数组或字符串都可以得到返回值
请大侠看看这是什么问题,谢谢

解决方案 »

  1.   

    客户端谁知道JSONObject是个什么类型,
    弄写通用的返回类型就可以了 比如int or String
      

  2.   

    楼主去下载资源吧,或许可以
    http://download.csdn.net/detail/s478853630/4200187
    http://download.csdn.net/detail/s478853630/4200258
    这两个资源一个是发布方,一个是调用方,可以跑通的!
      

  3.   

    客户要求的就是返回jsonobject对象,而且返回的值包含图片二进制