When using Axis2 to invoke the CXF server-side WebService method:
Error: Unmarshalling error:unexpected element (uri: "http://ejb.fss.keyman.com", Local: "XMLData"). Expected elements is <{}arg0>
Detailed information is as follows:
Org.apache.axis2.AxisFault:Unmarshalling error:unexpected Element (uri: "http://ejb.fss.keyman.com", Local: "XMLData "). Expected elements is <{}arg0> at Org.apache.axis2.util.Utils.getInboundFaultFromMessageContext (Utils.java : 531) at Org.apache.axis2.description.OutInAxisOperationClient.handleResponse (outinaxisoperation.java:375) at Org.apache.axis2.description.OutInAxisOperationClient.send (outinaxisoperation.java:421) at Org.apache.axis2.description.OutInAxisOperationClient.executeImpl (outinaxisoperation.java:229) at Org.apache.axis2.client.OperationClient.execute (operationclient.java:165) at Org.apache.axis2.client.ServiceClient.sendReceive (serviceclient.java:555) at Org.apache.axis2.client.ServiceClient.sendReceive (serviceclient.java:531) at Com.keyman.fss.test.FindResultByWorkIDTest.ReportResult (findresultbyworkidtest.java:69) at Com.keyman.fss.test.FindResultByWorkIDTest.main (FINDRESULTBYWORKIDTEST.JAVA:80)
Workaround:
Precede the WebService server method parameter with the @WebParam (name = "XMLData", targetnamespace = "http://ejb.fss.keyman.com")
Information such as command space.
Examples are as follows:
public string Findresultbyworkid (@WebParam (name = "XMLData", targetnamespace = "http://ejb.fss.keyman.com") string XMLDATA) {Specific code}
WebService invokes the service-side unmarshalling error:unexpected element (XXX). Expected elements is Xxx