SOAP Base¶
Experimental — Not part of v1 launch scope
This base is available for advanced use and evaluation. For production deployments, use the MCP Server or REST API.
The SOAP base exposes G6Solver via a SOAP 1.1 web service, built on spyne. It provides enterprise-grade XML/WSDL integration for legacy systems.
Overview¶
The SOAP base wraps G6 operations as SOAP RPC methods, callable from any SOAP client. It generates WSDL automatically and supports XML validation via lxml.
The server binds to port 8080 by default.
Architecture¶
Like all G6 bases, spyne is imported lazily. The module is fully importable and testable without spyne installed. Business logic helpers (_decompose_goal, _run_bayesian, etc.) return plain dicts and are tested directly.
The create_wsgi_app() function creates a spyne-backed WSGI application:
from mvp.soap.service import create_wsgi_app
app = create_wsgi_app()
# Serve with wsgiref, gunicorn, etc.
Service operations¶
The G6SoapService(ServiceBase) class exposes these SOAP operations:
| Operation | Parameters | Description |
|---|---|---|
DecomposeGoal | goal: Unicode, max_depth: Integer | Goal decomposition |
RunBayesian | data_json: Unicode, model_type: Unicode | Bayesian inference |
RunAutoML | X_json: Unicode, y_json: Unicode, task: Unicode | AutoML pipeline search |
RecommendAlgo | X_json: Unicode, y_json: Unicode, task: Unicode | Algorithm recommendation |
SystemStatus | -- | Service health |
ListComponents | -- | List all components |
Invoke | component: Unicode, op: Unicode, params_json: Unicode | Invoke any component |
RunPipeline | steps_json: Unicode, initial_json: Unicode | Execute a pipeline |
JSON-over-SOAP
Complex parameters (lists, dicts) are passed as JSON strings and deserialized server-side. Return values are also JSON-encoded Unicode strings. This provides a pragmatic bridge between SOAP's XML schema and G6's JSON-native data model.
WSDL¶
The spyne application auto-generates a WSDL document at the service endpoint. The target namespace is mvp.g6.soap. The WSDL can be consumed by any SOAP client (Java, C#, PHP, etc.) to generate client stubs.
SOAP 1.1 protocol is used with lxml validation on the input protocol.
Deployment¶
# Local development
python -m mvp.soap
# Production (gunicorn)
gunicorn mvp.soap.service:create_wsgi_app --bind 0.0.0.0:8080
# Docker
docker build -f bases/mvp/soap/Dockerfile -t g6-soap .
docker run -p 8080:8080 g6-soap
Source files¶
| File | Purpose |
|---|---|
bases/mvp/soap/__init__.py | Exports create_wsgi_app |
bases/mvp/soap/__main__.py | Entry point |
bases/mvp/soap/service.py | G6SoapService + helpers + WSGI app factory |
bases/mvp/soap/Dockerfile | Container build |
See also¶
- Bases Overview -- all delivery mechanisms
- gRPC Base -- high-performance RPC alternative
- REST Base -- HTTP/JSON alternative