Class: WSDL::XML::ElementBuilder Private
- Inherits:
-
Object
- Object
- WSDL::XML::ElementBuilder
- Includes:
- Log
- Defined in:
- lib/wsdl/xml/element_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.
Builds XML Element trees from WSDL message part definitions.
Transforms WSDL message parts into a tree of Element objects that represent the structure of SOAP messages. Resolves type references, handles complex and simple types, and detects recursive type definitions to prevent infinite loops during element building.
Constant Summary collapse
- XSD_BUILTIN_TYPES =
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.
XSD built-in simple and complex types per XML Schema Part 2 §3.
Set.new(%w[ anyType anySimpleType string normalizedString token language Name NCName ID IDREF IDREFS ENTITY ENTITIES NMTOKEN NMTOKENS boolean decimal integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger float double duration dateTime time date gYearMonth gYear gMonthDay gDay gMonth hexBinary base64Binary anyURI QName NOTATION ]).freeze
Instance Method Summary collapse
-
#build(parts) ⇒ Array<Element>
private
Builds Element trees from WSDL message parts.
-
#initialize(schemas, limits: nil, issues: nil) ⇒ ElementBuilder
constructor
private
Creates a new ElementBuilder instance.
Methods included from Log
Constructor Details
#initialize(schemas, limits: nil, issues: nil) ⇒ ElementBuilder
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 ElementBuilder instance.
40 41 42 43 44 45 46 |
# File 'lib/wsdl/xml/element_builder.rb', line 40 def initialize(schemas, limits: nil, issues: nil) @schemas = schemas @limits = limits || Limits.new @issues = issues @depth_exceeded = false @type_cache = {} end |
Instance Method Details
#build(parts) ⇒ Array<Element>
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 Element trees from WSDL message parts.
Each part can reference either a type (via @type attribute) or an element (via @element attribute). Processes each part and returns the corresponding Element objects.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/wsdl/xml/element_builder.rb', line 57 def build(parts) @depth_exceeded = false parts.filter_map { |part| if part[:type] build_type_element(part) elsif part[:element] build_element(part) end } end |