Server returned HTTP response code: 405 for URL

半腔热情 提交于 2020-01-05 09:07:47

问题


When I create a new SOAP project in SoapUI 4.6.4, first I have to add initial WSDL url. My initial WSDL URL: http://l:xxxxxxxxxxxxxxx?wsdl.

But I'm getting this error:

Error loading http://lxxxxxxxx?wsdl: org.apache.xmlbeans.XmlException: java.io.IOException: Server returned HTTP response code: 405 for URL: http://lxxxxxxxx?wsdl

So how can I fix this?


回答1:


Response Code 405: method Not Allowed one of the Methods GET/POST is disallowed, and you are using one of them check this




回答2:


405 is method not allowed error, this mean you have method that causing problem when its being called. Check if you have duplicate path with method in your wsdl. If no duplicate path try open the http://lxxxxxxxxxxxx?wsdl in your browser if you cant, that`s mean something wrong with your web configuration.




回答3:


Most of the answers here are correct but difficult to get for those who are new in this like me. So in simple try changing your controller's request mapping.

@RequestMapping(path = RequestMappingURL.IVPS_CYCLE_DATE, method = { RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_VALUE)

In above code I mapped request method as post but actually client was sending get request. As soon as I changed it to GET it worked. See below code

@RequestMapping(path = RequestMappingURL.IVPS_CYCLE_DATE, method = { RequestMethod.GET }, produces = MediaType.APPLICATION_JSON_VALUE)



来源:https://stackoverflow.com/questions/24299707/server-returned-http-response-code-405-for-url

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