soap parsing wsdl error: Unexpected element: TAG_END

江枫思渺然 提交于 2019-12-01 15:23:23

问题


I have an error importing a WSDL definition from an ASP.NET version 4 Visual Studio 2010 Express project, into SOAPUI 4.5.1

URL would be like

http://localhost:7929/ws/AX.asmx?WSDL

Error generated

Error loading [http://localhost:7929/ws/AX.asmx?WSDL]: org.apache.xmlbeans.XmlException:
org.apache.xmlbeans.XmlException: error: Unexpected element: TAG_END

Error trace:

com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:138)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:535)
...

Any suggestions most welcome!


回答1:


I had the same issue with Soap UI 5.2.0

The solution for me was to turn off the proxy (as suggested by @user518066)




回答2:


The issue is that soapui doesn't know where to find the schema file. If your wsdl is deployed to a server, it will return a url of the xsd file to include and soapui will be able to find it....




回答3:


I had the same problem, after several hours I found that the problem was about IPv6.

When I go to service URL I can see and validate the wsdl file. There was no problem at all.

http://localhost/SoapServer.php?wsdl

But when I add this URL to SoapUI it gives error Unexpected element: TAG_END. I found the reason by using cURL, curl http://localhost/SoapServer.php?wsdl returns 404!!

So realized that my Apache listens both IPv4 and IPv6, browser goes to IPv6 and gets the wsdl but cURL and SoapUI goes to IPv4 and get 404 error.

I disabled IPv6 on my Apache by removing the line Listen [::0]:80 in httpd.conf file, this solved the problem.




回答4:


Are you sure that the service is running? When debugging solutions with several WCF projects, there are times in which we could think that we are running the project we are working into and it turns not be that case. If you face an Error 404 when enter the svc url into a browser, then this could be the cause of the problem. In that scenario, SOAP UI will fail when trying to add or create a new WSDL endpoint. So, make sure that your solution starts running from the project where the target svc is located.



来源:https://stackoverflow.com/questions/16981902/soap-parsing-wsdl-error-unexpected-element-tag-end

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!