use std::collections::HashMap;
#[derive(Debug)]
pub enum SoapError {
ParseError(String),
SerializationError(String),
}
impl std::fmt::Display for SoapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
SoapError::ParseError(msg) => write!(f, "Parse error: {}", msg),
SoapError::SerializationError(msg) => write!(f, "Serialization error: {}", msg),
}
}
}
impl std::error::Error for SoapError {}
pub struct SoapRequest {
pub operation: String,
pub body: String,
pub headers: HashMap<String, String>,
}
pub fn parse_soap_request(_xml: &str) -> Result<SoapRequest, SoapError> {
Err(SoapError::ParseError("Not yet implemented".to_string()))
}
pub fn create_soap_response<T: serde::Serialize>(
_result: &T,
_operation: &str,
_namespace: &str,
) -> Result<String, SoapError> {
Err(SoapError::SerializationError(
"Not yet implemented".to_string(),
))
}