xsdata.codegen.mappers.definitions module¶
-
class
xsdata.codegen.mappers.definitions.DefinitionsMapper[source]¶ Bases:
objectMap a definitions instance to message and service classes.
Currently only SOAP 1.1 bindings with rpc/document style is supported.
-
classmethod
map(definitions)[source]¶ Step 1: Main mapper entry point.
- Parameters
definitions (
Definitions) –- Return type
-
classmethod
map_port(definitions, port)[source]¶ Step 2: Match a ServicePort to a Binding and PortType object and delegate the process to the next entry point.
- Parameters
definitions (
Definitions) –port (
ServicePort) –
- Return type
-
classmethod
map_binding(definitions, binding, port_type, config)[source]¶ Step 3: Match every BindingOperation to a PortTypeOperation and delegate the process for each operation to the next entry point.
-
classmethod
map_binding_operation(definitions, binding_operation, port_type_operation, config, name)[source]¶ Step 4: Convert a BindingOperation to a service class and delegate the process of all the message classes to the next entry point.
- Parameters
definitions (
Definitions) –binding_operation (
BindingOperation) –port_type_operation (
PortTypeOperation) –config (
Dict) –name (
str) –
- Return type
-
classmethod
map_binding_operation_messages(definitions, operation, port_type_operation, name, style, namespace)[source]¶ Step 5: Map the BindingOperation messages to classes.
- Parameters
definitions (
Definitions) –operation (
BindingOperation) –port_type_operation (
PortTypeOperation) –name (
str) –style (
str) –
- Return type
-
classmethod
build_envelope_fault(definitions, port_type_operation, target)[source]¶ Build inner fault class with default fields.
- Parameters
definitions (
Definitions) –port_type_operation (
PortTypeOperation) –target (
Class) –
-
classmethod
build_envelope_class(definitions, binding_message, port_type_message, name, style, namespace)[source]¶ Step 6.1: Build Envelope class for the given binding message with attributes from the port type message.
- Parameters
definitions (
Definitions) –binding_message (
BindingMessage) –port_type_message (
PortTypeMessage) –name (
str) –style (
str) –
- Return type
-
classmethod
build_message_class(definitions, port_type_message)[source]¶ Step 6.2: Build the input/output message class of an rpc style operation.
- Parameters
definitions (
Definitions) –port_type_message (
PortTypeMessage) –
- Return type
-
classmethod
build_inner_class(target, name, namespace=None)[source]¶ Build or retrieve an inner class for the given target class by the given name.
This helper will also create a forward reference attribute for the parent class.
-
classmethod
map_port_type_message(message, namespace)[source]¶ Build an attribute for the given port type message.
- Parameters
message (
PortTypeMessage) –
- Return type
-
classmethod
map_binding_message_parts(definitions, message, extended, ns_map)[source]¶ Find a Message instance and map its parts to attributes according to the the extensible element..
- Parameters
definitions (
Definitions) –message (
str) –extended (
AnyElement) –ns_map (
Dict) –
- Return type
-
classmethod
build_parts_attributes(parts, ns_map)[source]¶ Build attributes for the given list of parts.
-
classmethod
attributes(elements)[source]¶ Return all attributes from all extended elements as a dictionary.
- Parameters
elements (
Iterator[AnyElement]) –- Return type
-
classmethod