Ich muss entweder die WSDL-URL ausblenden oder nur für authentifizierte Benutzer verfügbar machen. Ich möchte nicht http://localhost:8080/services/Application?wsdl aussetzen.Authentifizierung der WSDL-URL oder Deaktivierung von exposed
Tomcat Version 8.5.11, Java 8, Axis 1.4 (Ich weiß, dass die Achse Version zu alt ist, aber das ist, was ich habe mit jetzt arbeiten)
Ich dachte, ich eine Sicherheitsbeschränkung auf dem Web hinzufügen könnte .xml wie erläutert hier http://docs.oracle.com/cd/E19798-01/821-1841/bncbk/index.html wie folgt:
<security-constraint>
<web-resource-collection>
<web-resource-name>WSDL</web-resource-name>
<description>WSDL Files</description>
<url-pattern>*?wsdl</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
auch diesen Thread gefunden, die die gleiche Sache zu tun vorschlagen, aber nicht für mich arbeiten Hiding WSDL in JAX-WS
Tomcat wirft der folgende Fehler:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3782)
at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1377)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1350)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1586)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:280)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> *?wsdl in security constraint
at org.apache.catalina.core.StandardContext.addConstraint(StandardContext.java:2827)
at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1317)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1190)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Irgendeine Idee, was ich falsch mache? oder wie kann ich das oben genannte erreichen?
Vielen Dank im Voraus
Dies ist ein falsches Muster ' *? Wsdl url-pattern>', stattdessen verwenden Sie dieses ' * .wsdl url-pattern>' und Ihre Ausnahme wird gehen. –
hagrawal
Siehe [hier] (http: // stackoverflow.com/questions/14018215/what-is-url-muster-in-web-xml-und-how-to-configure-servlet) für gültige URL-Muster. –
Ich stimme zu * .wsdl wird die Ausnahme loswerden, aber es wird das Problem nicht lösen. Ich habe? Wsdl am Ende der URL nicht .wsdl. – justMe