Class LocationTransformerObjectSupport

java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.transport.http.LocationTransformerObjectSupport
Direct Known Subclasses:
WsdlDefinitionHandlerAdapter, XsdSchemaHandlerAdapter

public abstract class LocationTransformerObjectSupport extends TransformerObjectSupport
Abstract base class for WsdlDefinitionHandlerAdapter and XsdSchemaHandlerAdapter that transforms XSD and WSDL location attributes.
Since:
2.1.2
Author:
Arjen Poutsma
  • 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 expression
      definitionDocument - the definition document
      request - 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 is http://example.com:80/context/myService.wsdl, the location will be changed to http://example.com:80/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.