source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/wsdl/binding.rb@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 1.2 KB
Line 
1# WSDL4R - WSDL binding definition.
2# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>.
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
9require 'wsdl/info'
10require 'xsd/namedelements'
11
12
13module WSDL
14
15
16class Binding < Info
17 attr_reader :name # required
18 attr_reader :type # required
19 attr_reader :operations
20 attr_reader :soapbinding
21
22 def initialize
23 super
24 @name = nil
25 @type = nil
26 @operations = XSD::NamedElements.new
27 @soapbinding = nil
28 end
29
30 def targetnamespace
31 parent.targetnamespace
32 end
33
34 def parse_element(element)
35 case element
36 when OperationName
37 o = OperationBinding.new
38 @operations << o
39 o
40 when SOAPBindingName
41 o = WSDL::SOAP::Binding.new
42 @soapbinding = o
43 o
44 when DocumentationName
45 o = Documentation.new
46 o
47 else
48 nil
49 end
50 end
51
52 def parse_attr(attr, value)
53 case attr
54 when NameAttrName
55 @name = XSD::QName.new(targetnamespace, value.source)
56 when TypeAttrName
57 @type = value
58 else
59 nil
60 end
61 end
62end
63
64
65end
Note: See TracBrowser for help on using the repository browser.