调用的时候增加参数设置
call.addParameter("attributeNames", XMLType.SOAP_ARRAY, ParameterMode.IN); 

解决方案 »

  1.   

    传递String数组不行吗, try {
             IHelloworld srvc = (IHelloworld) factory.create(
                        srvcModel, helloWorldURL);
              
             Client client = ((XFireProxy)Proxy.getInvocationHandler(srvc)).getClient();
             
             
             
             String a[] = new String[2];
             
             a[0] = "中国人民的儿子";
             a[1]= "海疆内和";
           
             
             out.println(srvc.example(a));
             
             
                } catch (MalformedURLException e) {
                e.printStackTrace();
            }我就可以传递
      

  2.   

    因为我用的xfire架构。在myeclipse上开发客户端生成的代码。我后来发现客户端,有个ArrayOfString类。里面只有个getString()方法。
      后来我这样做的:
    ArrayOfString str = new ArrayOfString();
    str.getString().add("字符串");
    这样处理没有问题。但是有个不好的地方是,我的字符串只能一个一个的添加。