pub struct SoapTranslator { /* private fields */ }Expand description
The SOAP-to-REST / REST-to-SOAP translator.
Implementations§
Source§impl SoapTranslator
impl SoapTranslator
Sourcepub fn soap_to_rest(cfg: &SoapTranslation) -> Result<Self, TranslationError>
pub fn soap_to_rest(cfg: &SoapTranslation) -> Result<Self, TranslationError>
Build a SOAP-to-REST translator. The operation name is used to locate the Body’s payload element (the first child whose local name matches, ignoring namespace prefixes).
Sourcepub fn rest_to_soap(cfg: &SoapTranslation) -> Result<Self, TranslationError>
pub fn rest_to_soap(cfg: &SoapTranslation) -> Result<Self, TranslationError>
Build a REST-to-SOAP translator. Both the operation name and namespace are required (the envelope’s payload element carries the namespace).
Sourcepub fn direction(&self) -> SoapDirection
pub fn direction(&self) -> SoapDirection
The configured direction.
Trait Implementations§
Source§impl Clone for SoapTranslator
impl Clone for SoapTranslator
Source§fn clone(&self) -> SoapTranslator
fn clone(&self) -> SoapTranslator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SoapTranslator
impl Debug for SoapTranslator
Source§impl ProtocolTranslator for SoapTranslator
impl ProtocolTranslator for SoapTranslator
Source§fn translate_request(
&self,
req: &Request<TranslationBody>,
) -> Result<TranslatedRequest, TranslationError>
fn translate_request( &self, req: &Request<TranslationBody>, ) -> Result<TranslatedRequest, TranslationError>
Convert the inbound request to the upstream’s wire format. The
translator reads
req’s body (via TranslationBody::as_bytes)
and returns the converted method, path, headers, and body to
send upstream.Source§fn translate_response(
&self,
resp: &Response<TranslationBody>,
) -> Result<TranslatedResponse, TranslationError>
fn translate_response( &self, resp: &Response<TranslationBody>, ) -> Result<TranslatedResponse, TranslationError>
Convert the upstream response to the client’s wire format. The
translator reads
resp’s body and returns the converted status,
headers, and body to send the client.Source§fn content_type_in(&self) -> &str
fn content_type_in(&self) -> &str
The media type the CLIENT sends and expects back (e.g.
application/json for a REST client, text/xml for a SOAP
client).Source§fn content_type_out(&self) -> &str
fn content_type_out(&self) -> &str
The media type the UPSTREAM expects and sends back (e.g.
application/graphql for a GraphQL upstream, application/xml
for a SOAP upstream, application/grpc for a gRPC upstream).Auto Trait Implementations§
impl Freeze for SoapTranslator
impl RefUnwindSafe for SoapTranslator
impl Send for SoapTranslator
impl Sync for SoapTranslator
impl Unpin for SoapTranslator
impl UnwindSafe for SoapTranslator
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
Attempts to downcast this to
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Attempts to downcast owned
Self to T,
useful only in generic context as a workaround for specializationSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more