Lather.Server.EnhancedPlug (lather v1.0.42)
View SourceEnhanced Plug implementation for SOAP server endpoints with web form interface.
Provides comprehensive SOAP service endpoints with interactive web forms, multi-protocol support, and complete API documentation similar to .NET Web Services.
Features
- Interactive web forms for testing operations
- SOAP 1.1, SOAP 1.2, and JSON protocol support
- Enhanced WSDL generation with multi-protocol bindings
- Service overview with complete operation documentation
- Responsive web interface for operation testing
Usage
In Phoenix router:
scope "/soap" do
pipe_through :api
match :*, "/users", Lather.Server.EnhancedPlug, service: MyApp.UserService
match :*, "/users/*path", Lather.Server.EnhancedPlug, service: MyApp.UserService
endAs standalone Plug:
plug Lather.Server.EnhancedPlug, service: MyApp.UserServiceURL Patterns
GET /service- Service overview with operations listGET /service?wsdl- Standard WSDL downloadGET /service?wsdl&enhanced=true- Multi-protocol WSDLGET /service?op=OperationName- Interactive operation formPOST /service- SOAP 1.1 endpointPOST /service/v1.2- SOAP 1.2 endpointPOST /service/api- JSON/REST endpoint
Options
:service- The SOAP service module (required):base_path- Base path for service (default: "/soap"):enable_forms- Enable web form interface (default: true):enable_json- Enable JSON endpoints (default: true):auth_handler- Custom authentication handler:validate_params- Enable parameter validation (default: true)