当前位置: 代码迷 >> Java Web开发 >> xfire错误:For input string: ""
  详细解决方案

xfire错误:For input string: ""

热度:4623   发布时间:2013-02-25 21:10:37.0
xfire异常:For input string: ""
soap包中,包含:
<param3 href="#id0"/>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
3000
</multiRef>
java代码中,
@WebService(name = "**", targetNamespace = "***")
@SOAPBinding(use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
抛出类型转换异常:
java.lang.NumberFormatException: For input string: ""
  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
  at java.lang.Long.parseLong(Long.java:424)
  at java.lang.Long.parseLong(Long.java:461)
  at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsLong(AbstractMessageReader.java:78)
请大侠指点!

------解决方案--------------------------------------------------------
这里很明确了,就是NumberFormatException,应为你调用Long.parseLong() 时参数输入为"".

java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:424)
at java.lang.Long.parseLong(Long.java:461)
at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsLong(AbstractMessageReader.java:78)
------解决方案--------------------------------------------------------
java.lang.NumberFormatException: For input string: ""
获得的是个空串
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Sat May 26 12:24:58 CST 2018
  • 最近登录:Sat May 26 12:24:58 CST 2018
  • 最近登录:Sat May 26 12:24:58 CST 2018
  • 最近登录:Sat May 26 12:24:58 CST 2018
  • 最近登录:Sat May 26 12:24:58 CST 2018