优米格
分享有营养的

webservice服务报错:javax.xml.bind.MarshalException

BraUndress.png

webservice服务报错,信息如下:

javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.SAXException2: unable to marshal type "wsstub.sscm.importShipAdviceInfoRouteSrv.InputParameters" as an element because it is missing an @XmlRootElement annotation]

错误原因,实体类缺少注解@XmlRootElement,加上即可,如下:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InputParameters", propOrder = {
    "inputcollection",
    "msgheader"
})
@XmlRootElement(name="InputParameters")
public class InputParameters {

}
赞(1)
未经允许禁止转载:优米格 » webservice服务报错:javax.xml.bind.MarshalException

评论 抢沙发

合作&反馈&投稿

商务合作、问题反馈、投稿,欢迎联系

广告合作侵权联系