Java openshift上Wildfly 9的wss失败

Java openshift上Wildfly 9的wss失败,java,websocket,openshift,wildfly,wss,Java,Websocket,Openshift,Wildfly,Wss,我一直在学习websocket教程,一切都很顺利: 我使用Wildfly将这个应用程序部署到openshift,一切都很好。ws正在处理端口8000 现在我正在尝试使用wss保护websocket。以下是我所做的: 在web.xml中,我添加了: <security-constraint> <display-name>Secure WebSocket Endpoint</display-name> <web-resource-collec

我一直在学习websocket教程,一切都很顺利:

我使用Wildfly将这个应用程序部署到openshift,一切都很好。ws正在处理端口8000

现在我正在尝试使用wss保护websocket。以下是我所做的:

web.xml中,我添加了:

<security-constraint>
    <display-name>Secure WebSocket Endpoint</display-name>
    <web-resource-collection>
        <web-resource-name>Secure WebSocket Endpoint</web-resource-name>
        <url-pattern>/*</url-pattern>
        <http-method>GET</http-method>
        <http-method>POST</http-method>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>
在将更新后的应用程序部署到OpenShift后,我注意到网页被重定向到https,这很好。但是wss根本不工作,没有错误消息

我在互联网上搜索了两天,尝试了很多不同的方法,但都不管用

我还尝试在
.openshift/config/standalone.xml
中添加一个
https侦听器

<https-listener name="default-https" socket-binding="https" security-realm="ApplicationRealm"/>

其中,“ApplicationRealm”定义为:

<security-realm name="ApplicationRealm">
                <authentication>
                    <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
                <authorization>
                    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
                </authorization>
            </security-realm>

但它也不起作用。我不知道为什么它在http中工作,但当安全性被强制执行时它就不工作了


请帮忙!任何提示都将不胜感激

经过几天的研究,结果证明
url模式应该是
/jsf pages/*
,然后wss工作。

我在Openshift上也有同样的问题,我创建了jdbc安全域,改为“/jsf pages/*”,但我的websocket在没有“授权”标题的情况下工作。。。剩下的服务工作得很好。你换了别的东西吗?
<security-realm name="ApplicationRealm">
                <authentication>
                    <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
                <authorization>
                    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
                </authorization>
            </security-realm>