jruby - when XSD has DOCTYPE to DTD, not able to load the file. #791

Closed
wants to merge 10 commits into from

6 participants

@patcheng

in a clone of ruby-saml, running under jruby fails.

Found that some of the XSD files have DOCTYPE to DTD, and that was causing issues.

and the ruby script is run without path, NullPointerException got thrown.

require 'rubygems'
require 'nokogiri'

Dir.chdir('lib/schemas') do
    Nokogiri::XML::Schema(IO.read('saml20protocol_schema.xsd'))
end
Patrick Cheng Fixed issue found while try to troubleshoot ruby-saml with jruby
when XSD has DOCTYPE to DTD, not able to load the file.

and the ruby script is run without path, NullPointerException got thrown.
cd9824b
@yokolet
Sparkle Motion member

@patcheng Would you give me saml20protocol_schema.xsd? I need to confirm current Nokogiri raises NPE and your fix actually solves the problem.

@patcheng

oops. looks like I didn't create a branch for the pull request. My local pull got included in the pull request. Let me know if that causes issue.

@tamersalama

@patcheng You are Awesome. That's what resolved the issue for me. Related #862

@leejarvis
Sparkle Motion member

@patcheng Could you merge #810 and this into a single pull request? If you could rebase against master and squash your commits it'll make it easier to review and get merged quickly. Thanks

Patrick Cheng Merge remote-tracking branch 'origin/ruby-saml_jruby_validation_error'
* origin/ruby-saml_jruby_validation_error:
  Test to demostrate sparklemotion/nokogiri#791
87d6384
@patcheng

squashed the changes and resubmitted as #912

@patcheng patcheng closed this Jun 3, 2013
@jvshahid jvshahid pushed a commit that referenced this pull request Nov 17, 2013
Patrick Cheng Fixed issue found while try to troubleshoot ruby-saml with jruby
when XSD has DOCTYPE to DTD, not able to load the file.

and the ruby script is run without path, NullPointerException got thrown.

Test to demostrate #791
28878a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment