Class: WSDL::Definition::Builder Private
- Inherits:
-
Object
- Object
- WSDL::Definition::Builder
- Defined in:
- lib/wsdl/definition/builder.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.
Constructs a frozen WSDL::Definition from parsed WSDL data.
Walks the parsed WSDL documents and schemas to enumerate all services, ports, and operations. For each operation, resolves message references and converts element trees to plain hashes via XML::Element#to_definition_h.
Constant Summary collapse
- SCHEMA_VERSION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Schema version for serialized Definitions. Bump when the internal hash structure changes.
1- EMPTY_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Empty message placeholder for operations whose element resolution fails.
{ header: [], body: [] }.freeze
Instance Method Summary collapse
-
#build ⇒ Definition
private
Builds and returns a frozen WSDL::Definition.
-
#initialize(documents:, schemas:, limits:, provenance:, schema_import_errors:) ⇒ Builder
constructor
private
Creates a new Builder.
Constructor Details
#initialize(documents:, schemas:, limits:, provenance:, schema_import_errors:) ⇒ Builder
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 Builder.
34 35 36 37 38 39 40 |
# File 'lib/wsdl/definition/builder.rb', line 34 def initialize(documents:, schemas:, limits:, provenance:, schema_import_errors:) @documents = documents @schemas = schemas @limits = limits @provenance = provenance @schema_import_errors = schema_import_errors end |
Instance Method Details
#build ⇒ Definition
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.
Builds and returns a frozen WSDL::Definition.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/wsdl/definition/builder.rb', line 45 def build @build_issues = [] sources = @provenance.map(&:freeze).freeze services = build_services data = { schema_version: SCHEMA_VERSION, service_name: @documents.service_name, sources:, build_issues: @build_issues.freeze, services:, fingerprint: compute_fingerprint(sources) } Definition.new(data) end |