private static final String URL= "http://IP:7001/services/IFileService";
 static QName qnameAttachment = new QName("FileServiceImpl", "DataHandler"); 
private static void add() throws Exception {
     Service service = new Service();
    Call call = (Call) service.createCall();
    call.registerTypeMapping(DataHandler.class,    qnameAttachment,JAFDataHandlerSerializerFactory.class,  JAFDataHandlerDeserializerFactory.class);
 call.setTargetEndpointAddress(new java.net.URL(URL));
 call.setOperationName(new QName(URL, "add")); // 指定方法的命名空间
 call.addParameter("s1", XMLType.XSD_STRING, ParameterMode.IN);
 call.addParameter("s2", qnameAttachment, ParameterMode.IN);
 call.setReturnType(XMLType.XSD_ANY);
 File file = new File("e://soft//新建文本文档.txt");
 DataHandler handler = new DataHandler(new FileDataSource(file));
                JSONObject json = new JSONObject();
 json.put("system_code", new String[] { "1001" });
 json.put("file_name", new String[] { " 新建文本文档.txt" });
 String fileProperty = json.toString();
 Object ret = call.invoke(new Object[] { fileProperty, handler });// 执行调用
}
 public static void main(String[] args) {
  try {
   //上传
   add();
  } catch (Exception e) {
   e.printStackTrace();
  }
 }在调用方法时,服务端能正确的获取到fileProperty 的值,而获取到handler  则为null,这个是怎么回事呀?要怎么解决呀?还有就是,虽然,handler 为null,但是,还是能把fileProperty 解析出来,存入到数据库,但是返回值又报错了:
 Exception:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Deserializing parameter 'out':  could not find deserializer for type {http://www.w3.org/2001/XMLSchema}any
 faultActor: 
 faultNode: 
 faultDetail: 
 {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Deserializing parameter 'out':  could not find deserializer for type {http://www.w3.org/2001/XMLSchema}any
 at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
 at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
 at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
 at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 at org.apache.axis.client.Call.invoke(Call.java:2467)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at com.yrong.axis.test.AxisTest.add(AxisTest.java:91)
 at com.yrong.axis.test.AxisTest.main(AxisTest.java:61)
 
希望各位朋友帮帮忙呀,这个两个问题(一个是handler获取不到,一个就是这个异常),应该怎么解决呀?小弟在此谢谢了。