异常:
Exception in thread "main" org.apache.axiom.soap.SOAPProcessingException: A SOAP message cannot contain entity references because it must not have a DTD
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createEntityReference(StAXSOAPModelBuilder.java:359)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:279)
at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj:58)
at org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:1)
at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj)
at org.apache.axiom.core.CoreChildNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreChildNodeSupport$org_apache_axiom_core_CoreChildNode$coreGetNextSibling(CoreChildNodeSupport.aj:103)
at org.apache.axiom.om.impl.llom.OMNodeImpl.coreGetNextSibling(OMNodeImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomChildNodeSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomChildNodeSupport$org_apache_axiom_om_impl_common_AxiomChildNode$getNextOMSibling(AxiomChildNodeSupport.aj:39)
at org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:1)
at org.apache.axiom.om.impl.traverse.OMChildrenIterator.getNextNode(OMChildrenIterator.java:36)
at org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:69)
at org.apache.axiom.om.impl.traverse.OMFilterIterator.hasNext(OMFilterIterator.java:54)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_common_AxiomContainer$getFirstChildWithName(AxiomContainerSupport.aj:230)
at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_common_AxiomContainer$getFirstChildWithName(AxiomContainerSupport.aj)
at org.apache.axiom.soap.impl.common.AxiomSOAP12FaultSupport.ajc$interMethod$org_apache_axiom_soap_impl_common_AxiomSOAP12FaultSupport$org_apache_axiom_soap_impl_common_AxiomSOAP12Fault$getNode(AxiomSOAP12FaultSupport.aj:84)
at org.apache.axiom.soap.impl.llom.soap12.SOAP12FaultImpl.getNode(SOAP12FaultImpl.java:1)
at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:202)
at org.apache.axis2.AxisFault.<init>(AxisFault.java:196)
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 com.asiainfo.openplatform.isb.ws.access.WsAccessStub.service(WsAccessStub.java:191)
at com.bmcc.interfaces.webservice.wsaccess.client.TestClient.main(TestClient.java:52)
wsdl在MyEclipse Enterprise Workbench Version: 2014环境里生成axis2服务端和客户端,在myeclipse里访问该axis2生成的服务端,出现上面的异常信息。axis2版本为 1.6.2.
同样的客户端代码,放到 IBM的开发工具 WebSphere Integration Developer V6.1里,通过客户端访问服务端,该问题不存在。好神奇的问题。
偶然间发现问题原因:原来跟jdk版本有关系,在MyEclipse Enterprise Workbench Version: 2014里,将jdk版本换成jdk1.5,问题就不存在了。