问题
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