首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WSWS3499W:如何使WAS理解来自web服务的HTTP302响应?

WSWS3499W:如何使WAS理解来自web服务的HTTP302响应?
EN

Stack Overflow用户
提问于 2016-03-23 15:15:45
回答 1查看 2.5K关注 0票数 0

我们有一个运行在WebSphere应用服务器(以下简称“客户端”)上的Java应用程序,它通过一个负载均衡器对分布在两个数据中心的另一个应用程序进行web服务调用。

负载平衡器的工作方式如下:

  1. 您按下负载均衡器URL
  2. 它为您提供了一个具有新URL (数据中心之一)的HTTP 302响应。
  3. 客户端应用程序直接与其中一个数据中心中的web服务应用程序对话。

例如:

代码语言:javascript
复制
    > curl -i -s -k https://stealthwsort-1810.*.*/StealthWS/StealthServices
    HTTP/1.0 302 Found
    Location: https://stealthwsort-1810-vip.*.*:5443/StealthWS/StealthServices
    Content-Type: text/html
    Expires: Mon, 1 Jan 2001 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0

由于某些原因,我们的客户端应用程序不理解来自负载均衡器的HTTP 302响应,并在日志中抛出WSWS3514E和WSWS3499W错误:

代码语言:javascript
复制
    [3/23/16 9:12:36:066 GMT] 00000029 HttpOutboundC E   WSWS3514E: No HTTP response body is available from the connection for: https://stealthwsort-1810.apaas-np.*.*/StealthWS/StealthServices
    [3/23/16 9:12:36:068 GMT] 00000029 SystemOut     O esEligibilityWs(ERROR)=Unable to process the Stealth Status request at site : https://stealthwsort-1810.apaas-np.*.*/StealthWS/StealthServices : Error : WSWS3499W: Redirected new location: https://stealthwsort-1810.apaas-np.*.*/StealthWS/StealthServices
        at bundles.workflow.classes.TaskWrapper.execute(TaskWrapper.java:581)
        at bundles.workflow.classes.ProcessController.processTask(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1602)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:507)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:374)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
        at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1819)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1660)

IBM网站建议:

有关如何接受自动重定向到新位置的详细信息,您可能需要查看产品文档。

但在这件事上我找不到任何具体的手册。

请给我指出正确的方向。如有需要,我会提供更多详情。

谢谢你,叶夫根

EN

回答 1

Stack Overflow用户

发布于 2016-03-23 15:39:43

要开始,您需要为JVM配置一些附加的HTTP传输属性:

  1. 打开管理控制台。 单击Servers > Application > server > Java和Process > Process > Java虚拟机> Custom。
  2. 可选:如果未列出该属性,则创建一个新的属性名称。
  3. 输入名称和值。
  4. 可选:接受将HTTP请求重定向到HTTPS中的不同URI。 如果在应用程序中配置了机密或整数的传输保证,则可以将HTTP请求重定向到HTTPS中的不同URI。若要接受重定向,可以执行下列任务之一:
代码语言:javascript
复制
- Set the `com.ibm.ws.webservices.HttpRedirectEnabled` Java system property to true.
- Programmatically set the `com.ibm.wsspi.webservices.Constants.HTTP_REDIRECT_ENABLED` property to a java.lang.Boolean object in the Stub or Call object before invoking the service. For example, use any of the following `java.lang.Boolean` values to set the property to true:  
    - Boolean.TRUE
    - new Boolean(true)
    - new Boolean("true")

根据要求,可以在以下链接上找到产品文档:configaddhttppropertiesadmin

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36181986

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档