Sha256: 970fbaf6c97e517cf500c8b71a9846ec6d11c502db40bdc15acfabfffbbdb354

Contents?: true

Size: 1000 Bytes

Versions: 30

Compression:

Stored size: 1000 Bytes

Contents

require 'test/unit'
require 'soap/marshal'


module XSD


class TestNS < Test::Unit::TestCase
  def test_xmllang
    @file = File.join(File.dirname(File.expand_path(__FILE__)), 'xmllang.xml')
    obj = SOAP::Marshal.load(File.open(@file) { |f| f.read })
    assert_equal("12345", obj.partyDataLine.gln)
    lang = obj.partyDataLine.__xmlattr[
      XSD::QName.new(XSD::NS::Namespace, "lang")]
    assert_equal("EN", lang)
  end

  def test_no_default_namespace
    env = SOAP::Processor.unmarshal(NO_DEFAULT_NAMESPACE)
    array = env.body.root_node["array"]
    item = array["item"]
    assert_equal("urn:ns", array.elename.namespace)
    assert_equal(nil, item.elename.namespace)
  end

NO_DEFAULT_NAMESPACE = <<__XML__
<?xml version="1.0" encoding="utf-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <response xmlns="urn:ns">
      <array>
        <item attr="1" xmlns=""/>
      </array>
    </response>
  </env:Body>
</env:Envelope>
__XML__
end


end

Version data entries

30 entries across 30 versions & 13 rubygems

Version Path
mumboe-soap4r-1.6.0.pre.beta test/xsd/test_ns.rb
DefV-soap4r-1.5.8.2 test/xsd/test_ns.rb
mumboe-soap4r-1.5.8.7 test/xsd/test_ns.rb
teo-soap4r-1.5.9b test/xsd/test_ns.rb
mumboe-soap4r-1.5.8.6 test/xsd/test_ns.rb
soap4r-spox-1.6.0 test/xsd/test_ns.rb
soap4r-r19-1.5.9 test/xsd/test_ns.rb
mumboe-soap4r-1.5.8.5 test/xsd/test_ns.rb
soap4r-ruby1.9-2.0.5 test/xsd/test_ns.rb
soap4r-sgonyea-1.6.0 test/xsd/test_ns.rb
soap4r-straightjacket-1.5.9 test/xsd/test_ns.rb
soap4r-straightjacket-1.5.8 test/xsd/test_ns.rb
soap4r-ruby1.9-2.0.3 test/xsd/test_ns.rb
soap4r-ruby1.9-2.0.2 test/xsd/test_ns.rb
soap4r-ruby1.9-2.0.1 test/xsd/test_ns.rb
mumboe-soap4r-1.5.8.4 test/xsd/test_ns.rb
soap4r-ruby1.9-2.0.0 test/xsd/test_ns.rb
hands-soap4r-1.5.8.4 test/xsd/test_ns.rb
soap4r-ruby1.9-1.0.0 test/xsd/test_ns.rb
snaury-soap4r-1.5.8.1 test/xsd/test_ns.rb