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

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 {

}
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容