Class: WSDL::Parser::Binding Private
- Inherits:
-
Object
- Object
- WSDL::Parser::Binding
- Defined in:
- lib/wsdl/parser/binding.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a WSDL binding element.
A binding defines the message format and protocol details for operations defined by a particular port type. It specifies the concrete protocol (SOAP 1.1 or 1.2) and data format (document or RPC style) to be used.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
private
The name of this binding.
-
#port_type ⇒ String
readonly
private
The qualified name of the port type this binding implements.
-
#style ⇒ String
readonly
private
The default style for operations ('document' or 'rpc').
-
#transport ⇒ String
readonly
private
The transport URI (e.g., HTTP).
Instance Method Summary collapse
-
#fetch_port_type(documents) ⇒ PortType
private
Fetches the port type that this binding implements.
-
#initialize(binding_node) ⇒ Binding
constructor
private
Creates a new Binding from a WSDL binding XML node.
-
#operations ⇒ Hash{String => BindingOperation}
private
Returns the operations defined in this binding.
Constructor Details
#initialize(binding_node) ⇒ Binding
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new Binding from a WSDL binding XML node.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/wsdl/parser/binding.rb', line 17 def initialize(binding_node) @binding_node = binding_node @name = binding_node['name'] @port_type = binding_node['type'] if (soap_node = find_soap_node) @style = soap_node['style'] || 'document' @transport = soap_node['transport'] end end |
Instance Attribute Details
#name ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the name of this binding.
30 31 32 |
# File 'lib/wsdl/parser/binding.rb', line 30 def name @name end |
#port_type ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the qualified name of the port type this binding implements.
33 34 35 |
# File 'lib/wsdl/parser/binding.rb', line 33 def port_type @port_type end |
#style ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the default style for operations ('document' or 'rpc').
36 37 38 |
# File 'lib/wsdl/parser/binding.rb', line 36 def style @style end |
#transport ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the transport URI (e.g., HTTP).
39 40 41 |
# File 'lib/wsdl/parser/binding.rb', line 39 def transport @transport end |
Instance Method Details
#fetch_port_type(documents) ⇒ PortType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Fetches the port type that this binding implements.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/wsdl/parser/binding.rb', line 46 def fetch_port_type(documents) port_type_name = QName.parse( @port_type, namespaces: @binding_node.namespaces, default_namespace: QName.document_namespace(@binding_node.document.root) ) documents.port_types.fetch(port_type_name) do raise UnresolvedReferenceError.new( "Unable to find portType #{port_type_name} for binding #{@name.inspect}", reference_type: :port_type, reference_name: port_type_name.to_s, context: "binding #{@name.inspect}" ) end end |
#operations ⇒ Hash{String => BindingOperation}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the operations defined in this binding.
66 67 68 |
# File 'lib/wsdl/parser/binding.rb', line 66 def operations @operations ||= operations! end |