[Axis] could not find deserializer for type {...}
Posted on 2006-07-20 14:09 InterMa 阅读(3933) 评论(0) 编辑 收藏 举报今天使用Axis1.4发布WS,在client端死活都会遇到如下这个异常:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Deserializing parameter 'msg': could not find deserializer for type {http://biz.testws.interma}Message
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:NIC-interma
org.xml.sax.SAXException: Deserializing parameter 'msg': could not find deserializer for type {http://biz.testws.interma}Message
搞得我差点没吐血,最后才发现问题所在:我之前一直采用jws方式来发布WS,而换成wsdd方式发布之后,client端就正常了。
我使用Axis开发WS参考的文章是:(这2篇文章非常不错~,适合新手)
http://www-128.ibm.com/developerworks/cn/webservices/ws-startaxis/
http://www-128.ibm.com/developerworks/cn/webservices/ws-deepaxis/
其中后一篇明明说到采用jws方式发布的WS可以使用bean参数,但是结果就是死活不行。。。
不知道是不是我某个地方疏忽了,反正我在wsdd方式下一切就正常了,希望能给遇到同样问题的朋友们一些参考。
btw: 同时试了一下.net的client调用Axis发布的WS,VS会自动为Bean参数生成一个只包含property的class,调用起来一切正常,:-)
最后再补充2篇关于WS安全性的文章:
http://www-128.ibm.com/developerworks/cn/webservices/ws-secaxis1/
http://www-128.ibm.com/developerworks/cn/webservices/ws-secaxis2/