我的webservice一直报这个错javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException 30
[javax.xml.bind.JAXBException:ADOMdocument"classcom.sun.org.apache.xerces.internal.do...
[javax.xml.bind.JAXBException: A DOM document "class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl" is found but an element is needed. Use Document.getDocumentElement() and set that object instead.]
at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:322)
at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142)
at com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:118)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
代码如下:我读取了一个xml文件后调用这个webservice 展开
at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:322)
at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142)
at com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:118)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
代码如下:我读取了一个xml文件后调用这个webservice 展开
3个回答
展开全部
你的代码错误地方没贴出来,这里的语句没有问题除了要判断if(nodes!=null).
A MarshalException is thrown if a
java.io.IOException occurs while marshalling the remote call
header, arguments or return value for a remote method call. A
MarshalException is also thrown if the receiver does not
support the protocol version of the sender.
If a MarshalException occurs during a remote method call,
the call may or may not have reached the server. If the call did reach the
server, parameters may have been deserialized. A call may not be
retransmitted after a MarshalException and reliably preserve
"at most once" call semantics.
检测你的webservice配置才对
A MarshalException is thrown if a
java.io.IOException occurs while marshalling the remote call
header, arguments or return value for a remote method call. A
MarshalException is also thrown if the receiver does not
support the protocol version of the sender.
If a MarshalException occurs during a remote method call,
the call may or may not have reached the server. If the call did reach the
server, parameters may have been deserialized. A call may not be
retransmitted after a MarshalException and reliably preserve
"at most once" call semantics.
检测你的webservice配置才对
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这样的目的是避免空指针异常
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
赋得古原草送别(白居易) 离离原上草,
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询