1

私はdatanoiseアクションを持っています-サードパーティのURLにXMLSOAPリクエストを投稿することによって別のSOAPWebサービスと相互作用するSOAPレールWebサービスを実装したWebサービス:

open("http://localhost:8080/generateResponse?xmlRequest="+CGI.escape(soapRQ.result(binding).gsub("\n","")))

定期的にこれにより例外が発生します(以下のスタックトレース)。何がこのECONNRESETをトリガーするのか理解できません。

Errno::ECONNRESET (Connection reset by peer):
  /usr/local/lib/ruby/1.8/net/protocol.rb:135:in `sysread'
  /usr/local/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
  /usr/local/lib/ruby/1.8/timeout.rb:67:in `timeout'
  /usr/local/lib/ruby/1.8/timeout.rb:101:in `timeout'
  /usr/local/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
  /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
  /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'
  /usr/local/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
  /usr/local/lib/ruby/1.8/net/http.rb:2017:in `read_new'
  /usr/local/lib/ruby/1.8/net/http.rb:1051:in `request'
  /usr/local/lib/ruby/1.8/open-uri.rb:248:in `open_http'
  /usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
  /usr/local/lib/ruby/1.8/open-uri.rb:242:in `open_http'
  /usr/local/lib/ruby/1.8/open-uri.rb:616:in `buffer_open'
  /usr/local/lib/ruby/1.8/open-uri.rb:164:in `open_loop'
  /usr/local/lib/ruby/1.8/open-uri.rb:162:in `catch'
  /usr/local/lib/ruby/1.8/open-uri.rb:162:in `open_loop'
  /usr/local/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
  /usr/local/lib/ruby/1.8/open-uri.rb:518:in `open'
  /usr/local/lib/ruby/1.8/open-uri.rb:30:in `open'
  app/controllers/my_websvc_controller.rb:2354:in `postRequest'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/invocation.rb:141:in `send'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/invocation.rb:141:in `perform_invocation_without_interception'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/invocation.rb:135:in `perform_invocation'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/abstract.rb:46:in `web_service_filtered_invoke'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/abstract.rb:37:in `web_service_direct_invoke_without_controller'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:112:in `web_service_direct_invoke'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/abstract.rb:58:in `web_service_invoke'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/abstract.rb:25:in `invoke_web_service_request'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:58:in `dispatch_web_service_request'
 /usr/local/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:56:in `dispatch_web_service_request'
(eval):1:in `api'

サーバー側はRHEL5ホスト上にあります。Rails2.3.5およびRuby1.8.7。サードパートの投稿は、JBOSS4.3にデプロイされた単純なJava戦争です。

4

1 に答える 1

1

問題は、xmlRequestパラメーターのERBバインディング結果から生成されたURLのサイズが原因であることがわかりました。これは、openを使用するURLには明らかに長すぎます。POSTに切り替えましたが、正常に動作します。

于 2012-08-08T19:16:34.137 に答える