Class LocationTransformerObjectSupport
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.transport.http.LocationTransformerObjectSupport
- Direct Known Subclasses:
WsdlDefinitionHandlerAdapter
,XsdSchemaHandlerAdapter
Abstract base class for
WsdlDefinitionHandlerAdapter
and XsdSchemaHandlerAdapter
that transforms XSD
and WSDL location attributes.- Since:
- 2.1.2
- Author:
- Arjen Poutsma
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
transformLocation
(String location, jakarta.servlet.http.HttpServletRequest request) Transform the given location string to reflect the given request.protected void
transformLocations
(XPathExpression xPathExpression, Document definitionDocument, jakarta.servlet.http.HttpServletRequest request) Transforms the locations of the given definition document using the given XPath expression.Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
LocationTransformerObjectSupport
public LocationTransformerObjectSupport()
-
-
Method Details
-
transformLocations
protected void transformLocations(XPathExpression xPathExpression, Document definitionDocument, jakarta.servlet.http.HttpServletRequest request) Transforms the locations of the given definition document using the given XPath expression.- Parameters:
xPathExpression
- the XPath expressiondefinitionDocument
- the definition documentrequest
- the request, used to determine the location to transform to
-
transformLocation
protected String transformLocation(String location, jakarta.servlet.http.HttpServletRequest request) 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 ishttp://example.com:80/context/myService.wsdl
, the location will be changed tohttp://example.com:80/context/services/myService
.If the location attribute defined in the WSDL is
/services/myService
, and the request URI for the WSDL ishttp://example.com:8080/context/myService.wsdl
, the location will be changed tohttp://example.com:8080/context/services/myService
.This method is only called when the
transformLocations
property is true.
-