feat: add soap adapter foundation

This commit is contained in:
a.tolmachev
2026-04-07 00:00:19 +03:00
parent 31fbdfdc02
commit a6388e4353
24 changed files with 1346 additions and 25 deletions
+24
View File
@@ -0,0 +1,24 @@
use serde_json::Value;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum SoapAdapterError {
#[error("soap endpoint is missing")]
MissingEndpoint,
#[error("request failed")]
Transport(#[from] reqwest::Error),
#[error("invalid xml payload")]
InvalidXml(#[from] roxmltree::Error),
#[error("soap envelope body was not found")]
MissingBody,
#[error("soap response body was empty")]
EmptyBody,
#[error("soap endpoint returned status {status}")]
UnexpectedStatus { status: u16, body: Value },
#[error("soap fault: {message}")]
SoapFault {
code: Option<String>,
message: String,
detail: Option<Value>,
},
}