Sha256: cd2df30b6104ba7fdb330cf37f0138f4dae302023aef4b64ee8f3413523d092b

Contents?: true

Size: 1020 Bytes

Versions: 15

Compression:

Stored size: 1020 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
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

15 entries across 15 versions & 9 rubygems

Version Path
malagant-soap4r-1.5.8.20141127181857 test/xsd/test_ns.rb
rtiss_soap4r-1.6.1 test/xsd/test_ns.rb
rtiss_soap4r-1.6.0 test/xsd/test_ns.rb
eSpace_soap4r-1.5.8 test/xsd/test_ns.rb
soap4r-ruby19-1.5.9 test/xsd/test_ns.rb
tomdz-soap4r-1.5.8.20120202093209 test/xsd/test_ns.rb
soap5r-2.0.3 test/xsd/test_ns.rb
soap5r-2.0.2 test/xsd/test_ns.rb
soap5r-2.0.1 test/xsd/test_ns.rb
soap5r-2.0.0 test/xsd/test_ns.rb
soap5r-2.0.0.20120130130121 test/xsd/test_ns.rb
soap4r-sgonyea-1.5.9 test/xsd/test_ns.rb
sunteya-soap4r-1.5.8.0 test/xsd/test_ns.rb
tomdz-soap4r-1.5.8.20111103171510 test/xsd/test_ns.rb
rubyjedi-soap4r-1.5.8.20100619003610 test/xsd/test_ns.rb