---
title: "抓异常"
author: "kitchen"
date: "2012-07-30T23:54:34Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2012-07-30T23:54:34Z"
id: 1612966
url: "https://kitchen.iteye.com/blog/1612966"
---

用xfire做了一个webservice，一直在测验小的example调用，返回值是string。一直找不出问题……
总结，java、功力不深，不会抓取异常，在code的细节里丢失了方向。

最后由异常
ava.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitive
找到ac

解决方法
soapObject result 改为 Object result ；

查找的资料

http://blog.csdn.net/windzou36/article/details/7315898
http://blog.csdn.net/whybiang/article/details/6533051