Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/branches/1_5/lib/wsdl/soap/body.rb

Revision 1824, 1.2 kB (checked in by nahi, 2 years ago)
  • Copyright notice updated. add '2000-2007' uniformly.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - WSDL SOAP body definition.
2 # Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
4 # This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
5 # redistribute it and/or modify it under the same terms of Ruby's license;
6 # either the dual license version in 2003, or any later version.
7
8
9 require 'wsdl/info'
10
11
12 module WSDL
13 module SOAP
14
15
16 class Body < Info
17   attr_reader :parts
18   attr_reader :use      # required
19   attr_reader :encodingstyle
20   attr_reader :namespace
21
22   def initialize
23     super
24     @parts = nil
25     @use = nil
26     @encodingstyle = nil
27     @namespace = nil
28   end
29
30   def parse_element(element)
31     nil
32   end
33
34   def parse_attr(attr, value)
35     case attr
36     when PartsAttrName
37       @parts = value.source
38     when UseAttrName
39       if ['literal', 'encoded'].include?(value.source)
40         @use = value.source.intern
41       else
42         raise RuntimeError.new("unknown use of soap:body: #{value.source}")
43       end
44     when EncodingStyleAttrName
45       @encodingstyle = value.source
46       @encodingstyle = nil if @encodingstyle.to_s.empty?
47       value.source
48     when NamespaceAttrName
49       @namespace = value.source
50     else
51       nil
52     end
53   end
54 end
55
56
57 end
58 end
Note: See TracBrowser for help on using the browser.