Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/lib/wsdl/port.rb

Revision 2004, 1.2 kB (checked in by nahi, 1 year ago)
  • deleted WSDLDriverFactory#create_driver (replaced with create_rpc_driver in 1.5.X) and WSDLDriver class. closes #445.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - WSDL port definition.
2 # Copyright (C) 2000-2007  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 Port < Info
16   attr_reader :name             # required
17   attr_reader :binding          # required
18   attr_reader :soap_address
19
20   def initialize
21     super
22     @name = nil
23     @binding = nil
24     @soap_address = nil
25   end
26
27   def targetnamespace
28     parent.targetnamespace
29   end
30
31   def porttype
32     root.porttype(find_binding.type)
33   end
34
35   def find_binding
36     root.binding(@binding) or raise RuntimeError.new("#{@binding} not found")
37   end
38
39   def parse_element(element)
40     case element
41     when SOAPAddressName
42       o = WSDL::SOAP::Address.new
43       @soap_address = o
44       o
45     when DocumentationName
46       o = Documentation.new
47       o
48     else
49       nil
50     end
51   end
52
53   def parse_attr(attr, value)
54     case attr
55     when NameAttrName
56       @name = XSD::QName.new(targetnamespace, value.source)
57     when BindingAttrName
58       @binding = value
59     else
60       nil
61     end
62   end
63 end
64
65
66 end
Note: See TracBrowser for help on using the browser.