Unmarshalling Error: unexpected element 错误的解决

来源:互联网 发布:荣耀盒子 装软件 编辑:程序博客网 时间:2024/05/19 07:08

[javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"finOver"). Expected elements are <{}deptName>,<{}lastChangTime>,<{}cityId>,<{}remark>,<{}registerFund>,<{}modifyDate>,<{}channelSource>,<{}custNature>,<{}isRedeempoints>,<{}companyProperty>,<{}city>,<{}custPotentialType>,<{}billTitle>,<{}shuttleAddressList>,<{}recommendCust>,<{}province>,<{}bussType>,<{}simpleName>,<{}upgradeSource>,<{}lastYearProfit>,<{}focusDeptId>,<{}isSpecial>,<{}isImportCustor>,<{}isParentCompany>,<{}mainContact>,<{}createUser>,<{}parentCompanyId>,<{}contactId>,<{}custNumber>,<{}custName>,<{}custStatus>,<{}deptId>,<{}versionNumber>,<{}lastYearIncome>,<{}isAcceptMarket>,<{}provinceId>,<{}tradeId>,<{}preferenceService>,<{}nextLevel>,<{}focusDeptName>,<{}responsibillity>,<{}parentNumber>,<{}areaId>,<{}id>,<{}becomeMemTime>,<{}createDate>,<{}isTranGoods>,<{}surplusMonthlyStatementMoney>,<{}custType>,<{}custId>,<{}accountList>,<{}registAddress>,<{}contactList>,<{}logs>,<{}jshAddress>,<{}companyScop>,<{}degree>,<{}procRedit>,<{}modifyUser>,<{}isFocusPay>,<{}taxregNumber>,<{}channel>,<{}brandWorth>]
 at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
 at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
 at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
 at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:764)
 ... 121 more

在调用接口的时候遇到了这个问题,[javax.xml.bind.UnmarshalException就是转换xml文件和java对象的时候报错。最后确定下来的原因是我所调用的接口返回参数已经修改,而本地没有更新。

解决方法是重新生成客户端代码。

原创粉丝点击