1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! # soap-server
//!
//! A WSDL-driven SOAP 1.1/1.2 server library for Rust, built on top of
//! [axum](https://docs.rs/axum). Provide a WSDL file, register async handler
//! closures for each operation, and get a SOAP 1.1/1.2 endpoint with no
//! boilerplate envelope handling. `soap-server` is a transport + dispatch layer —
//! not a code generator or full XSD validator (see the Capabilities & Limitations
//! page in the user guide for the precise scope).
//!
//! ## Features
//!
//! - **SOAP 1.1 and 1.2** — auto-detects version from `Content-Type` and envelope
//! namespace; responds in the same version as the request.
//! - **WSDL-driven dispatch** — operations are discovered from the WSDL at build time.
//! Registering a handler for an unknown operation is a build-time error.
//! - **WS-Security (UsernameToken)** — supports PasswordDigest and PasswordText
//! authentication with nonce replay detection and timestamp freshness checks.
//! - **XSD structural validation** — required elements are validated against the
//! WSDL/XSD schema before the handler is called.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use soap_server::{FnHandler, ServerBuilder, SoapFault};
//! use bytes::Bytes;
//!
//! #[tokio::main]
//! async fn main() {
//! let svc = ServerBuilder::from_wsdl_file("path/to/service.wsdl")
//! .handler(
//! "MyOperation",
//! FnHandler::new(|_body: Bytes| async move {
//! // Parse body, call business logic, return response XML bytes.
//! Ok::<Bytes, SoapFault>(Bytes::from(
//! r#"<MyOperationResponse xmlns="urn:example"/>"#,
//! ))
//! }),
//! )
//! .build()
//! .expect("WSDL build failed");
//!
//! let router = svc.into_router();
//! let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await.unwrap();
//! axum::serve(listener, router).await.unwrap();
//! }
//! ```
//!
//! ## WS-Security
//!
//! Call `.auth(|username| { /* return password or None */ })` on the builder.
//! Operations that require authentication return a `Sender` fault if the
//! `<wsse:Security>` header is missing or invalid. Use `.auth_bypass([...])` to
//! exempt specific operations (e.g. clock-sync operations).
//!
//! ## Multi-WSDL / multi-service
//!
//! Call `SoapService::into_router()` on each service and merge the resulting
//! `axum::Router` instances — each service mounts at its own path derived from
//! the WSDL `<service><port address>` element.
pub
pub
pub
pub
pub
pub
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crateWsdlError;
pub use crateWsdlLoader;
pub use crateRotatingNonceCache;
pub use cratecompute_digest;
pub use cratevalidate_username_token;
pub use crate;