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

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

Video extension to Greenstone

File size: 936 bytes
Line 
1# WSDL4R - WSDL message 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'
10
11
12module WSDL
13
14
15class Message < Info
16 attr_reader :name # required
17 attr_reader :parts
18
19 def initialize
20 super
21 @name = nil
22 @parts = []
23 end
24
25 def targetnamespace
26 parent.targetnamespace
27 end
28
29 def parse_element(element)
30 case element
31 when PartName
32 o = Part.new
33 @parts << o
34 o
35 when DocumentationName
36 o = Documentation.new
37 o
38 else
39 nil
40 end
41 end
42
43 def parse_attr(attr, value)
44 case attr
45 when NameAttrName
46 @name = XSD::QName.new(parent.targetnamespace, value.source)
47 else
48 nil
49 end
50 end
51end
52
53
54end
Note: See TracBrowser for help on using the repository browser.