feat: add soap adapter foundation
This commit is contained in:
@@ -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>,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user