|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.xml.transform.TransformerObjectSupport org.springframework.ws.server.endpoint.interceptor.PayloadTransformingInterceptor
public class PayloadTransformingInterceptor
Interceptor that transforms the payload of WebServiceMessage
s using XSLT stylesheet. Allows for seperate
stylesheets for request and response. This interceptor is especially useful when supporting with multiple version of
a Web service: you can transform the older message format to the new format.
requestXslt
and responseXslt
properties. Both
of these are optional: if not set, the message is simply not transformed. Setting one of the two is required,
though.
setRequestXslt(org.springframework.core.io.Resource)
,
setResponseXslt(org.springframework.core.io.Resource)
Constructor Summary | |
---|---|
PayloadTransformingInterceptor()
|
Method Summary | |
---|---|
void |
afterCompletion(MessageContext messageContext,
Object endpoint,
Exception ex)
Does nothing by default. |
void |
afterPropertiesSet()
|
boolean |
handleFault(MessageContext messageContext,
Object endpoint)
Does nothing by default. |
boolean |
handleRequest(MessageContext messageContext,
Object endpoint)
Transforms the request message in the given message context using a provided stylesheet. |
boolean |
handleResponse(MessageContext messageContext,
Object endpoint)
Transforms the response message in the given message context using a stylesheet. |
void |
setRequestXslt(Resource requestXslt)
Sets the XSLT stylesheet to use for transforming incoming request. |
void |
setResponseXslt(Resource responseXslt)
Sets the XSLT stylesheet to use for transforming outgoing responses. |
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PayloadTransformingInterceptor()
Method Detail |
---|
public void setRequestXslt(Resource requestXslt)
public void setResponseXslt(Resource responseXslt)
public boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception
requestXslt
has been set.
handleRequest
in interface EndpointInterceptor
messageContext
- the message contextendpoint
- chosen endpoint to invoke
true
Exception
- in case of errorssetRequestXslt(org.springframework.core.io.Resource)
public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception
responseXslt
has been set.
handleResponse
in interface EndpointInterceptor
messageContext
- the message contextendpoint
- chosen endpoint to invoke
true
Exception
- in case of errorssetResponseXslt(org.springframework.core.io.Resource)
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception
handleFault
in interface EndpointInterceptor
messageContext
- contains both request and response messages, the response should contains a Faultendpoint
- chosen endpoint to invoke
true
to continue processing of the response interceptor chain; false
to indicate
blocking of the response handler chain.
Exception
public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex)
afterCompletion
in interface EndpointInterceptor
messageContext
- contains both request and response messages, the response should contains a Faultendpoint
- chosen endpoint to invokeex
- exception thrown on handler execution, if anypublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |