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

root/branches/1_5/lib/wsdl/service.rb

Revision 1824, 1.1 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 service 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 require 'xsd/namedelements'
11
12
13 module WSDL
14
15
16 class Service < Info
17   attr_reader :name             # required
18   attr_reader :ports
19   attr_reader :soap_address
20
21   def initialize
22     super
23     @name = nil
24     @ports = XSD::NamedElements.new
25     @soap_address = nil
26   end
27
28   def targetnamespace
29     parent.targetnamespace
30   end
31
32   def parse_element(element)
33     case element
34     when PortName
35       o = Port.new
36       @ports << o
37       o
38     when SOAPAddressName
39       o = WSDL::SOAP::Address.new
40       @soap_address = o
41       o
42     when DocumentationName
43       o = Documentation.new
44       o
45     else
46       nil
47     end
48   end
49
50   def parse_attr(attr, value)
51     case attr
52     when NameAttrName
53       @name = XSD::QName.new(targetnamespace, value.source)
54     else
55       nil
56     end
57   end
58 end
59
60
61 end
Note: See TracBrowser for help on using the browser.