I'm not intimately familiar with this library, but I would be
interested to know if it works properly on a non-JRuby setup. If it
does, it would be a bug we would want to fix in JRuby. If it does not,
then it's probably an issue with the library...

On Fri, May 7, 2010 at 1:38 PM, David Maria <msrnivas / yahoo.com> wrote:
> I did exactly what noisefree did but getting below error
>
> Fast Debugger (ruby-debug-ide 0.4.6) listens on localhost:3509
> JRuby limited openssl loaded. gem install jruby-openssl for full
> support.
> http://jruby.kenai.com/pages/JRuby_Builtin_OpenSSL
> Wire dump:
>
> opening connection to 192.168.24.76...
> opened
> <- "POST /BSSWebService/Test.asmx HTTP/1.1\r\nContent-Type: text/xml;
> charset=utf-8\r\nSoapaction:
> \"http://tempuri.org/MyName\"\r\nUser-Agent: SOAP4R/1.5.5\r\nAccept:
> */*\r\nHost: 192.168.24.76\r\nContent-Length: 368\r\n\r\n"
> <- "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<env:Envelope
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n
> xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <env:Body>\n
> <n1:MyName xmlns:n1=\"http://tempuri.org/MyName\">\n
> <n1:inpstr>testString</n1:inpstr>\n  </n1:MyName>\n
> </env:Body>\n</env:Envelope>"
> -> "HTTP/1.1 500 Internal Server Error\r\n"
> -> "Date: Fri, 07 May 2010 18:28:15 GMT\r\n"
> -> "Server: Microsoft-IIS/6.0\r\n"
> -> "X-Powered-By: ASP.NET\r\n"
> -> "X-AspNet-Version: 2.0.50727\r\n"
> -> "Cache-Control: private\r\n"
> -> "Content-Type: text/xml; charset=utf-8\r\n"
> -> "Content-Length: 934\r\n"
> -> "\r\n"
> reading 934 bytes...
> -> "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope
> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException:
> Server did not recognize the value of HTTP Header SOAPAction:
> http://tempuri.org/MyName.\r\n  at
> System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()\r\n
> at System.Web.Services.Protocols.SoapServerProtocol.Initialize()\r\n
> at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
> HttpContext context, HttpRequest request, HttpResponse response)\r\n
> at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
> HttpContext context, HttpRequest request, HttpResponse response,
> Boolean& abortProcessing)</faultstring><detail
> /></soap:Fault></soap:Body></soap:Envelope>"
> read 934 bytes
> Conn keep-alive
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException:
> Server did not recognize the value of HTTP Header SOAPAction:
> http://tempuri.org/MyName.
>  at
> System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
>  at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
>  at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
> HttpContext context, HttpRequest request, HttpResponse response)
>  at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type
> type, HttpContext context, HttpRequest request, HttpResponse response,
> Boolean& abortProcessing)</faultstring><detail
> /></soap:Fault></soap:Body></soap:Envelope>
>
> : System.Web.Services.Protocols.SoapException: Server did not recognize
> the value of HTTP Header SOAPAction: http://tempuri.org/MyName.
> (SOAP::FaultError)
>  at
> System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
>  at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
>  at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
> HttpContext context, HttpRequest request, HttpResponse response)
>  at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type
> type, HttpContext context, HttpRequest request, HttpResponse response,
> Boolean& abortProcessing)
>
>
> What could be the problem
>
> My code
>
> module RechnerServiceModule
>  InterfaceNS = 'http://tempuri.org/MyName'
>  Methods=[['MyName','inpstr']]
>
>  def RechnerServiceModule.add_method(drv)
>   Methods.each do |method, *param|
>     drv.add_method_with_soapaction(method, InterfaceNS, *param)
>
>   end
>  end
> end
> require 'rubygems'
> require "soap/rpc/driver"
> #require "RechnerServiceModule"
> include RechnerServiceModule
>
> server = 'http://192.168.24.76/BSSWebService/Test.asmx'
> wiredump_dev=STDERR
> service = SOAP::RPC::Driver.new(server,
> RechnerServiceModule::InterfaceNS)
> #service.use_default_namespace = true
> service.default_encodingstyle =
> SOAP::EncodingStyle::ASPDotNetHandler::Namespace
> service.wiredump_dev=wiredump_dev
> RechnerServiceModule::add_method(service)
> result = service.MyName("testString")
>
> print("Result: ", result)
> --
> Posted via http://www.ruby-forum.com/.
>
>