我在互联网上搜寻,试图找到任何可能遇到这个问题的人,但却空手而归.所以这里:
我们有一个java Web应用程序(基于Spring MVC 4).它位于Microsoft IIS后面,充当使用应用程序请求路由(ARR)v3的负载平衡器/反向代理.
这种IIS正在执行与负载平衡ARR 3个不同的环境(所有运行的相同的Java代码): dev.example.com,demo.example.com和qa.example.com.
该应用程序通过SockJS和stompjs使用WebSockets向用户的浏览器提供通知,当应用程序服务器在Tomcat 7上时,这一切都运行良好.将qa.example.com环境升级到Tomcat 8后,WebSocket连接停止工作 - 它回退到XHR POST要求.
我想强调的是,IIS,只是qa应用程序服务器没有进行任何更改.
以下是来自dev环境(工作)的示例请求/响应:
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cache-Control: no-cache
Connection: Upgrade
Cookie: <cookies snipped>
Host: dev.example.com
Origin: https://dev.example.com
Pragma: no-cache
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Key: E7aIek0X6qcO9PAl1n6w4Q==
Sec-WebSocket-Version: 13
Upgrade: websocket
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Run Code Online (Sandbox Code Playgroud)
响应
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: Upgrade …Run Code Online (Sandbox Code Playgroud) 我已经有一个我付费的Web服务器,我想使用Thrift和PHP公开它的一些服务.
我的问题是:我可以使用托管在默认端口上的普通PHP运行Thrift服务器(与托管网页的方式相同),而不是在一些时髦的模糊端口上运行单独的PHP应用程序.这样我就不必更改服务器配置(即使我想这也是我无法做到的).
谢谢
编辑:也许我应该澄清一点.一旦我使用.thrift文件定义了我的服务,是否可以:
我正在使用 Apache CXF 从 Java 客户端调用 WCF 服务。使用另一个地址的 STS 来保护服务的安全。我已将服务客户端配置为在调用主服务之前调用安全令牌,并且它可以工作(它尝试调用 STS),但 STS 期望在元素中提供一些额外的数据RequestSecurityToken。STS 的策略指定RequestSecurityToken在发送之前对其进行加密和签名,这就是导致我出现问题的原因。加密和签名正在工作,但我似乎无法在加密之前修改 SOAP 消息。
我查看了这个问题:如何修改出站 CXF 请求的原始 XML 消息?虽然它有很大帮助,但我需要更改的 XML 部分位于已加密和签名的 SOAP 消息的一部分内。
我做了一个Interceptor并在我能找到的所有不同阶段进行了尝试,但在RequestSecurityToken创建和加密和签名之间似乎没有一个阶段被调用。
有吗?或者已经有一个可以向其中添加额外元素的工具RequestSecurityToken?
为了清楚起见编辑:
这是我的 RST 现在的样子:
<wst:RequestSecurityToken xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType>
<wsp:AppliesTo xmlns:wsp="http://www.w3.org/ns/ws-policy">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:9085/MyService</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>
<wst:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</wst:KeyType>
<wst:KeySize>192</wst:KeySize>
<wst:Entropy>
<wst:BinarySecret Type="http://docs.oasis-open.org/ws-sx/ws-trust/200512/Nonce">OlbfbuCUf3N2lNf9mhD03gfeMk0TfPI2nLWx8edlL5w=</wst:BinarySecret>
</wst:Entropy>
<wst:ComputedKeyAlgorithm>http://docs.oasis-open.org/ws-sx/ws-trust/200512/CK/PSHA1</wst:ComputedKeyAlgorithm>
<wst:Renewing/>
</wst:RequestSecurityToken>
Run Code Online (Sandbox Code Playgroud)
以下是服务提供商的文档所说的大致内容(请注意Credentials末尾附近的元素):
<t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://localhost:9085/MyService</Address>
</EndpointReference>
</wsp:AppliesTo>
<t:Entropy>
<t:BinarySecret u:Id="uuid-e2d08122-45ab-45cd-80d1-46de2306836b-1" Type="http://schemas.xmlsoap.org/ws/2005/02/trust/Nonce" …Run Code Online (Sandbox Code Playgroud) 使用bukkit API,是否可以进行类似以下伪代码的调用:
Bukkit.getPluginManager().getPlugin("PluginName").getJarFile();
Run Code Online (Sandbox Code Playgroud)
对于像MobBountyReloaded这样的插件,它会返回plugins/MobBountyReloaded_v235.jar.
我尝试使用众所周知的命名方案来寻找文件,例如只是附加.jar或<version>.jar插件的名称,但这并不总能产生正确的结果.上面的例子失败了,因为plugin.yml文件中的版本号只是235和不是_v235,而一些插件使用的方案<PluginName>-<Version>-<buildnumber>.jar.
有没有一种简单的方法来实现这一目标?每个加载的插件的文件信息必须在内存中的某个位置,不是吗?
这很奇怪:我的Apache配置了DirectoryIndex index.html,index.php这样,当我键入http://gustavopi-macmini.local/时,index.php如果文件中只有html标签,它会搜索并加载它.
但是,如果我放入一些PHP脚本index.php,它会加载index.html.en(It Works!).但是,如果我输入http://gustavopi-macmini.local/index.php,它会加载并执行脚本.
此外,如果我将一个index.php文件放在一个子目录中并键入http://gustavopi-macmini.local/somesubdirectory/它会index.php正常加载和执行...
为什么这种从根目录中的php脚本"跳"出来的奇怪行为?