Using WSF/Ruby to call Java Web Service - error on wsdl11to20.xsl10.xsl
Hello,
I'm new to WSF/Ruby, and I'm attempting to get it to call a Java web service running on tomcat from a Rails application. I'm attempting to do all of this on Windows XP SP3.
I'm using the WSDL mode as such:
#wsdl loc is a URL pointing to the WSDL file
client = WSClient.new( { "wsdl" => wsdl_loc },
log_file_name)
#get the proxy
proxy = client.get_proxy
unless proxy.nil?
#setup the param hash
params = {"username" => username,
"password" => password,
"docbase" => docbase}
#call the new session method
res = proxy.newSessionSimple(params)
end
When the newSessionSimple line is executed, I get this error:
I/O warning : failed to load external entity "C:/ruby/wsdlc/xslt//wsdl11to20.xsl10.xsl"
error
xsltParseStylesheetFile : cannot parse C:/ruby/wsdlc/xslt//wsdl11to20.xsl10.xsl
c:/ruby/lib/ruby/site_ruby/1.8/wsdl/ws_wsdl_proxy.rb:26: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]
Has anyone else seen this error before? I'm tempted to say that I'm missing an install component since it can't find that stylesheet, but running google searches on that error message doesn't really get me anywhere.
Also, I've followed the install steps, and I can successfully run the yahoo.rb client example.
Any ideas?
Thanks!
- Login or register to post comments
- Printer friendly version
- 497 reads











Hi George, Did you set the
Hi George,
Did you set the CONFIG["WSF_RUBY_HOME"] to your WSF/Ruby installation directory in the rbconfig.rb. This additional configuration is need to run the wsdl mode, that is to find the wsdl11to20.xsl10.xsl. And make sure it is there in /wsdlc/xslt//wsdl11to20.xsl10.xsl
Thanks
Dimuthu
Worked, but new error
Dimuthu,
Thansks for the tip -- that got me past what I was seeing before. Basically, I had that config param set, but it was set to the wrong value. Setting it correctly fixed the issue where it couldn't find the XSL.
However, now I see a different error. When I try to call the newSessionSimple method, I get this output below in the console. Have you seen anything like this before?
Thanks in advance,
George
Here's the output:
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
Variable 'attrib' has not been declared.
xmlXPathCompiledEval: evaluation failed
runtime error: file C:/downloads/ruby/WS-Ruby/wso2-wsf-ruby-bin-1.1.0-win32/wsdlc/xslt//wsdl11to20.xsl10.xsl line 717 element attribute
xsl:attribute: The attribute 'name' is missing.
c:/ruby/lib/ruby/site_ruby/1.8/wsdl/ws_wsdl_proxy.rb:26: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Hi George, I m exactly not
Hi George,
I m exactly not sure what is the error. But I doubt your WSDL can be a RPC encoded style WSDL which we barely support. Can you send us the WSDL or (cut down version, 'binding' section tells the style of the wsdl), so we can try what is going wrong..
Thanks
Dimuthu
WSDL
Dimuthu,
I've attached the WSDL that I'm using. I'm attempting to call the newSessionSimple operation. The web service returns an object that contains a session ticket - that's what I'm really after.
Thanks,
George
Hi, I was able to write a
Hi,
I was able to write a simple client and service with your wsdl. (attached). May be the problem is in your libxsl version. My libxsl version is 1.1.22. Can you check your libxsl version, and if it is too low, try update it.
Thanks
Dimuthu
libxsl
I'm using 1.1.23. Do you think that could be the problem?
I saw from your same client that I may be passing the parameters wrong. I wasn't aware that it needs to be a nested hash like this:
{ "newSessionSimple" => {"username" => "user", "password" => "pass", "docbase" => "docbase"} }
In any case, I updated my code to that, and I'm still getting the same error. I also attempted to run the auth_sample.rb file that you uploaded, and get the same result, so it must be something with my setup. I've attached the log files that it generated, maybe that will shed some light on the problem.
Thanks,
George
Hi, The logs doen't say
Hi,
The logs doen't say anything, and the error is somehow failing to parse the wsdl with the wsdl11to2..xsl file.
Just to check whether your xsl version is correct or not, try xsltproc (shipped with libxslt), and check with the following command,
xsltproc wsdl11to20.xsl10.xsl AuthenticationService.wsdl
if it gives the xsml (wsdl2), then the xsl version ruby loaded is not the 1.1.23 (can be something else), or if it gives the same errors then it can be some problem in 1.1.23.
Thanks
Dimuthu