public class SoapHeaderElementMethodArgumentResolver extends Object implements MethodArgumentResolver
MethodArgumentResolver
that supports resolving SoapHeaderElement
parameters. Target
method parameters must be annotated with SoapHeader
to indicate the SOAP header to resolve. This resolver
supports simple SoapHeaderElement
parameters and List
parameters for elements that appear multiple
times in the same SOAP header. The following snippet shows an example of supported declarations.
public void soapHeaderElement(@SoapHeader("{http://springframework.org/ws}header") SoapHeaderElement element)
public void soapHeaderElementList(@SoapHeader("{http://springframework.org/ws}header") List<SoapHeaderElement> elements)
SoapHeader
Constructor and Description |
---|
SoapHeaderElementMethodArgumentResolver() |
Modifier and Type | Method and Description |
---|---|
Object |
resolveArgument(MessageContext messageContext,
org.springframework.core.MethodParameter parameter)
Resolves the given parameter into a method argument.
|
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter)
Indicates whether the given method parameter is supported by this resolver.
|
public SoapHeaderElementMethodArgumentResolver()
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
MethodArgumentResolver
supportsParameter
in interface MethodArgumentResolver
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter; false
otherwisepublic Object resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws Exception
MethodArgumentResolver
resolveArgument
in interface MethodArgumentResolver
messageContext
- the current message contextparameter
- the parameter to resolve to an argument. This parameter must have previously been passed to
the MethodArgumentResolver.supportsParameter(MethodParameter)
method of this interface, which must
have returned true
.null
.Exception
- in case of errorsCopyright © 2020 Pivotal Software. All rights reserved.