| java.lang.Object org.springframework.xml.transform.TransformerObjectSupport org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter
WsdlDefinitionHandlerAdapter | public class WsdlDefinitionHandlerAdapter extends TransformerObjectSupport implements HandlerAdapter,InitializingBean(Code) | | Adapter to use the WsdlDefinition interface with the generic DispatcherServlet .
Reads the source from the mapped WsdlDefinition implementation, and writes that as the result to the
HttpServletResponse .
If the property transformLocations is set to true , this adapter will change
location attributes in the WSDL definition to reflect the URL of the incoming request. If the location
field in the original WSDL is an absolute path, the scheme, hostname, and port will be changed. If the location is a
relative path, the scheme, hostname, port, and context path will be prepended. This behavior can be customized by
overriding the transformLocation() method.
For instance, if the location attribute defined in the WSDL is http://localhost:8080/context/services/myService ,
and the request URI for the WSDL is http://example.com/context/myService.wsdl , the location will be
changed to http://example.com/context/services/myService .
If the location attribute defined in the WSDL is /services/myService , and the request URI for the WSDL
is http://example.com:8080/context/myService.wsdl , the location will be changed to
http://example.com:8080/context/services/myService .
When transformLocations is enabled, all location attributes found in the WSDL definition
are changed by default. This behavior can be customized by changing the locationExpression property,
which is an XPath expression that matches the attributes to change.
author: Arjen Poutsma See Also: WsdlDefinition See Also: WsdlDefinitionHandlerAdapter.setTransformLocations(boolean) See Also: WsdlDefinitionHandlerAdapter.setLocationExpression(String) See Also: WsdlDefinitionHandlerAdapter.transformLocation(String,javax.servlet.http.HttpServletRequest) since: 1.0.0 |
DEFAULT_LOCATION_EXPRESSION | final public static String DEFAULT_LOCATION_EXPRESSION(Code) | | Default XPath expression used for extracting all location attributes from the WSDL definition.
|
setTransformLocations | public void setTransformLocations(boolean transformLocations)(Code) | | Sets whether relative address locations in the WSDL are to be transformed using the request URI of the incoming
HttpServletRequest . Defaults to false .
|
transformLocation | protected String transformLocation(String location, HttpServletRequest request)(Code) | | Transform the given location string to reflect the given request. If the given location is a full url, the
scheme, server name, and port are changed. If it is a relative url, the scheme, server name, and port are
prepended. Can be overridden in subclasses to change this behavior.
For instance, if the location attribute defined in the WSDL is http://localhost:8080/context/services/myService ,
and the request URI for the WSDL is http://example.com:8080/context/myService.wsdl , the location
will be changed to http://example.com:8080/context/services/myService .
If the location attribute defined in the WSDL is /services/myService , and the request URI for the
WSDL is http://example.com:8080/context/myService.wsdl , the location will be changed to
http://example.com:8080/context/services/myService .
This method is only called when the transformLocations property is true.
|
Fields inherited from org.springframework.xml.transform.TransformerObjectSupport | final protected Log logger(Code)(Java Doc)
|
|
|