今天将公司的新业务系统部署的正式服务器,使用docker进行部署,由于有3个系统,系统之间使用webservice进行交互,部署完成后,调试发现webservice不通,通过日志发现如下错误:
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:218)
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:161)
... 106 common frames omitted
Caused by: javax.wsdl.WSDLException: WSDLException (at /soap:Envelope): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.
at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(WSDLReaderImpl.java:2167)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:248)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2338)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:255)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:165)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
... 108 common frames omitted
通过报错信息,可以发现主要是wsdl返回的xml的节点信息有问题,期望节点是<wsdl:definitions>,但是对于的xml节点是<soap:Envelope>,由此首先想到的是wsdl返回的xml有问题,最后通过流程请求wsdl,发现确实是返回wsdl有问题。
版权声明:本文为u011208304原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。