JAXB客户端,无法读取响应:javax.xml.bind.UnmarshalException

时间:2016-07-27 05:19:08

标签: java jaxb

我有一个web服务使用jaxb,在客户端我通过Netbean构建webservice客户端jar文件。我的问题是有时客户端发送请求但无法读取响应对象,请遵循异常:

Failed to read a response: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,36959]
Message: Premature EOF]
com.sun.xml.internal.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,36959]
Message: Premature EOF]
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)

1 个答案:

答案 0 :(得分:0)

尝试按照here所述拦截您的XML请求和响应 你可以解决你的问题。