Lather.Server.DSL (lather v1.0.42)
View SourceDomain Specific Language for defining SOAP operations and types.
Provides convenient macros for defining SOAP service operations, parameter validation, and type definitions.
Summary
Functions
Configures Basic Authentication.
Configures custom authentication.
Sets the description for the current operation or type. Works in both soap_operation and soap_type blocks.
Defines an element within a complex type.
Defines input parameters for the current operation.
Defines output parameters for the current operation.
Defines a parameter within an input or output block.
Sets the SOAPAction for the current operation.
Defines authentication requirements for operations.
Defines a SOAP operation with metadata for WSDL generation.
Defines a complex type for use in operations.
Sets the description for the current type (deprecated, use description/1).
Configures WS-Security authentication.
Functions
Configures Basic Authentication.
Configures custom authentication.
Sets the description for the current operation or type. Works in both soap_operation and soap_type blocks.
Defines an element within a complex type.
Defines input parameters for the current operation.
Defines output parameters for the current operation.
Defines a parameter within an input or output block.
Sets the SOAPAction for the current operation.
Defines authentication requirements for operations.
Example
soap_auth do
basic_auth realm: "SOAP Service"
# or
ws_security required: true
# or
custom_auth handler: MyApp.CustomAuth
end
Defines a SOAP operation with metadata for WSDL generation.
Example
soap_operation "GetUser" do
description "Retrieves a user by ID"
input do
parameter "userId", :string, required: true, description: "User identifier"
parameter "includeDetails", :boolean, required: false, default: false
end
output do
parameter "user", "User", description: "User information"
end
soap_action "http://example.com/GetUser"
end
def get_user(params) do
# Implementation
end
Defines a complex type for use in operations.
Example
soap_type "User" do
description "User information"
element "id", :string, required: true
element "name", :string, required: true
element "email", :string, required: false
element "created_at", :dateTime, required: true
end
Sets the description for the current type (deprecated, use description/1).
Configures WS-Security authentication.