我在Spring Web MVC项目中定义了一个Jax-WS Web服务。当我使用SOAP-UI测试wsdl操作时,所有的Web服务方法都能按预期工作。
我包括用于身份验证和授权的spring-security过滤器。现在,我可以访问wsdl,但无法对其执行任何操作。
我在SOAP UI中收到以下错误消息:
HTTP状态405-不支持请求方法“ POST”
以下是我在web.xml中添加的spring-security过滤器:
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
而且,我的wsdl在以下位置:http://localhost:8080/MyProject/MyService?wsdl
请让我知道如何解决此问题。
最佳答案
得到它了!!在spring-security.xml中包含以下元素:
<http pattern="/MyService**" security="none"/>