问题描述
- axis调用cxf开发的接口,Unexpected wrapper element found.
-
错误代码如下:AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Unexpected wrapper element requestHgInfoRespond found. Expected {http://warehouse.cxf.kcb.com/}requestHgInfoRespond.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Unexpected wrapper element requestHgInfoRespond found. Expected {http://warehouse.cxf.kcb.com/}requestHgInfoRespond.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at HgTest.invokeRemoteFuc(HgTest.java:208)
at HgTest.main(HgTest.java:36)调用方法: call = (Call) service.createCall(); call.setTargetEndpointAddress(endpoint); String parametersName = "arg0"; // 参数名 call.setOperationName(methodName);// 调用的方法名 call.addParameter(new QName(namespace, parametersName), XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); // 返回值类型:String result = (String) call.invoke(new Object[] { message });// 远程调用
解决方案
http://zhanjia.iteye.com/blog/1987912
时间: 2024-10-06 10:50:55