English 中文(简体)
粮杯处理网络网络连接站
原标题:Grails handling network connection stall

I am using Grails Ws-Client Plugin but my application waits for the SOAP response back from the server from which i am consuming web service and my application waits from this code

def proxy = webService.getClient(wsdlUrl)

当服务器下降或网络连接缓慢时, 大部分情况下都是这种 occours 。

等待还在继续,以防服务器暂时删除网络服务,当试图访问网络浏览器时,载有 wsdl 内容的URL 正在转向网站主页。

我如何能察觉到Wsdl是否存在, 以及我如何像属性一样设定超时, 以便等待响应的时间为10秒, 然后它停止等待响应, 代码开始正常执行,

我也不理解任何例外或错误。

问题回答

听起来像客户端默认没有设定读和/ 或连接超时设置。 如果网络服务向下关闭, 这会有帮助 : proxy. setConnectionTimeout( value_ in_ millicons)

我不太确定是否设置阅读超时, 也就是你所看到的主机是否正在接收连接, 但是网络服务没有可用或没有响应。 我们为此找到的最佳解决方案是使用 Apache Commons HTTP 客户端, 而不是默认客户端, 这给我们提供了客户端连接设置上更多的颗粒配置。 可能它们也出现在 WS- Client 插件中, 但相关的文档( 事实上是 GroovyWS 文件) 似乎没有提到读过超时 。





相关问题
Python SOAP server / client

I have a problem with Python and SOAP. I need to create a web service based on SOAP in Python. I read that I can use libraries like soaplib, suds and ZSI. I created a Hello World web service with ...

HTTP POST and complex structures

I m trying to send a complex HTTP POST request to a web service. The web service was created using VS2008, in which you can set VS to create HTTP POST and GET interfaces alongside the SOAP one. Now ...

XML-RPC Standard and XML Data Type

I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

What is the best solution for creating a SOAP Server in PHP?

I need some advice on which library is the best choice when it comes to creating SOAP servers (and eventually SOAP clients) in PHP. I know there is built-in functions for this, but is that really the ...

Logging all Soap request and responses in PHP

Does anyone know how to log all request and responses with the builtin SoapClient in PHP? I could in fact manually log everything with SoapClient::__getLastRequest() and SoapClient::__getLastResponse()...