Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml JBoss/SpringWS在处理非常大的SOAP响应时超时_Xml_Web Services_Soap_Spring Ws_Jboss6.x - Fatal编程技术网

Xml JBoss/SpringWS在处理非常大的SOAP响应时超时

Xml JBoss/SpringWS在处理非常大的SOAP响应时超时,xml,web-services,soap,spring-ws,jboss6.x,Xml,Web Services,Soap,Spring Ws,Jboss6.x,我们有一个运行在JBoss EAP 6.0上的J2EE应用程序,它使用来自第三方应用程序的SOAP Web服务。我们使用SpringWS发送请求并接收响应 对于正常和大尺寸响应,应用程序工作得非常好。但是,在调用特定web服务时(出于报告目的),第三方web服务发送了大约250 MB的响应,java应用程序无法处理该响应。事务超时并抛出超时错误 异常跟踪如下: org.springframework.ws.client.WebServiceIOException: I/O error: Read

我们有一个运行在JBoss EAP 6.0上的J2EE应用程序,它使用来自第三方应用程序的SOAP Web服务。我们使用SpringWS发送请求并接收响应

对于正常和大尺寸响应,应用程序工作得非常好。但是,在调用特定web服务时(出于报告目的),第三方web服务发送了大约250 MB的响应,java应用程序无法处理该响应。事务超时并抛出超时错误

异常跟踪如下:

org.springframework.ws.client.WebServiceIOException: I/O error: Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out
org.springframework.ws.client.WebServiceIOException: I/O error: Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out
        at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:502)
        at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:343)
        at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:337)
        at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:329)
但是,当以脱机模式访问响应XML时,应用程序能够在一两分钟内处理该文件

因此,以下是我在同步(即实时)处理SOAP响应方面的问题:

  • SOAP响应的长度是否有任何限制 由中的应用层(特别是JBoss EAP 6.0)处理 我们的案子

  • 可能的话,SpringWS对 可以处理的响应大小


  • 恐怕我无法回答问题1,但我可以尝试回答问题2:SpringWS对XML消息大小没有任何限制。但是,在内存中加载非常大的SOAP消息可能会有问题,这是使用
    SaajSoapMessageFactory
    (默认值)时发生的情况。相反,请切换到,并按照该页上的说明关闭负载缓存。这样,整个SOAP消息就不会加载到内存中


    这就是说,看起来您正遭受读取超时的痛苦,而不是内存不足的错误。您可能需要增加超时时间。最简单的方法是切换到
    HttpComponents消息发送程序
    ,并在其上配置
    readTimeout
    属性。

    您应该修改您的问题,以包含有关“无法处理它”的更多信息。您收到了什么样的错误?感谢您的快速回复。上次似乎只收到了我评论的一部分。我的配置与您建议的相同。i、 e.我使用AxiomSoapMessageFactory,有效负载缓存设置为false。对于超时,我使用CommonHttpMessageSender(已弃用)代替HttpComponents消息Sender,并设置了SoTimeOut。但是,我们需要处理大于250 MB的响应(今天我们有一个处理650 MB响应的请求)。在增加读取超时后,我们没有收到超时问题,但是,该过程没有完成。使用脱机文件的批处理模式会更好吗?