~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to lib/wsdl/message.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# WSDL4R - WSDL message definition.
 
2
# Copyright (C) 2002, 2003  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
 
 
14
 
 
15
class 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
 
51
end
 
52
 
 
53
 
 
54
end