source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/wsdl/soap/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: 922 bytes
Line 
1# WSDL4R - WSDL SOAP 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'
10
11
12module WSDL
13module SOAP
14
15
16class Binding < Info
17 attr_reader :style
18 attr_reader :transport
19
20 def initialize
21 super
22 @style = nil
23 @transport = nil
24 end
25
26 def parse_element(element)
27 nil
28 end
29
30 def parse_attr(attr, value)
31 case attr
32 when StyleAttrName
33 if ["document", "rpc"].include?(value.source)
34 @style = value.source.intern
35 else
36 raise Parser::AttributeConstraintError.new(
37 "Unexpected value #{ value }.")
38 end
39 when TransportAttrName
40 @transport = value.source
41 else
42 nil
43 end
44 end
45end
46
47
48end
49end
Note: See TracBrowser for help on using the repository browser.