source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/wsdl/service.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.1 KB
Line 
1# WSDL4R - WSDL service 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 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
58end
59
60
61end
Note: See TracBrowser for help on using the repository browser.