Spring Web Services Framework

org.springframework.ws.transport.http
Class LocationTransformerObjectSupport

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by 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 Summary
LocationTransformerObjectSupport()
           
 
Method Summary
protected  String transformLocation(String location, HttpServletRequest request)
          Transform the given location string to reflect the given request.
protected  void transformLocations(XPathExpression xPathExpression, Document definitionDocument, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationTransformerObjectSupport

public LocationTransformerObjectSupport()
Method Detail

transformLocations

protected void transformLocations(XPathExpression xPathExpression,
                                  Document definitionDocument,
                                  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,
                                   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.


Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.