java webservice返回xml解析异常问题!!!
各位好,我是菜鸟,问个异常:
org.xml.sax.SAXException: Deserializing parameter 'withSalesInfoQueryReturn': could not find deser
大致是通过webservice返回,其中返回参xml被webservice强制转义特殊字符,导致webservice自己都无法解析。
webservice报告的返回参:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<Esb>
<Route>
<Time>2015-03-13 10:42:13</Time>
<EsbId>9835710bd31a3952d7ba4cd7ecf11650</EsbId>
</Route>
</Esb>
</soapenv:Header>
<soapenv:Body>
<withSalesInfoQueryResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<withSalesInfoQueryReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><?xml version="1.0" encoding="UTF-8" ?><resWithSalesInfo><resultCode>1</resultCode><resultDesc>查询成功</resultDesc><salesList><item><servId>913032898269</servId><sceneId>1013</sceneId><despInfo>低0用户</despInfo><sugInfo>请注意手机流量使用</sugInfo><maintainInfo>null</maintainInfo><areaCode>0691</areaCode><accNbr>18988102006</accNbr></item></salesList></resWithSalesInfo></withSalesInfoQueryReturn>
</withSalesInfoQueryResponse>
</soapenv:Body>
</soapenv:Envelope>
可以看到 withSalesInfoQueryReturn 这里面的返回内容被转义了。
如果不用webserice调用服务接口,可以正确返回xml。
请问这种问题要怎么解决? 可以设置返回参?还是怎么滴,请各位大神提提建议
org.xml.sax.SAXException: Deserializing parameter 'withSalesInfoQueryReturn': could not find deser
大致是通过webservice返回,其中返回参xml被webservice强制转义特殊字符,导致webservice自己都无法解析。
webservice报告的返回参:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<Esb>
<Route>
<Time>2015-03-13 10:42:13</Time>
<EsbId>9835710bd31a3952d7ba4cd7ecf11650</EsbId>
</Route>
</Esb>
</soapenv:Header>
<soapenv:Body>
<withSalesInfoQueryResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<withSalesInfoQueryReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><?xml version="1.0" encoding="UTF-8" ?><resWithSalesInfo><resultCode>1</resultCode><resultDesc>查询成功</resultDesc><salesList><item><servId>913032898269</servId><sceneId>1013</sceneId><despInfo>低0用户</despInfo><sugInfo>请注意手机流量使用</sugInfo><maintainInfo>null</maintainInfo><areaCode>0691</areaCode><accNbr>18988102006</accNbr></item></salesList></resWithSalesInfo></withSalesInfoQueryReturn>
</withSalesInfoQueryResponse>
</soapenv:Body>
</soapenv:Envelope>
可以看到 withSalesInfoQueryReturn 这里面的返回内容被转义了。
如果不用webserice调用服务接口,可以正确返回xml。
请问这种问题要怎么解决? 可以设置返回参?还是怎么滴,请各位大神提提建议
...全文
相关推荐
使用WebService的方法返回xml格式的数据
使用webservice的方法调用数据库中的数据,然后返回的数据格式的xml.直接显示成xml格式
JAVA调用webservice并解析xml
本人测试能成功运行并输出结果。因为项目需要,在myeclipse中测试可行,在eclipse中也已测试。请放心使用。
webservice远程调用,返回数据生成xml文件,并通过SAX解析出来
webservice远程调用,返回String数据并生成xml文件到本地工程,在通过SAX解析器把数据解析出来。这是webservice应用的一个简单的例子。根据该例子的思想,可以实现很多功能了。例如把client工程的sayHello方法改为查询数据库的数据,在返回给webservice工程。(在该例子中工程名命名有点不规范,不好意思)。在client工程我使用的是XFire技术,在webservice工程我使用的是axis技术来实现Web service。我们可以学习其中的一种就可以了
Java访问WebService返回XML数据的方法
主要介绍了Java访问WebService返回XML数据的方法,涉及java操作WebService的相关技巧,需要的朋友可以参考下
Java解析调用webservice服务的返回XML串详解
主要介绍了Java解析调用webservice服务的返回XML串详解的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下


Web 开发
