org.apache.ode.axis2.util
Class UrlReplacementTransformer
java.lang.Object
org.apache.ode.axis2.util.UrlReplacementTransformer
public class UrlReplacementTransformer
- extends java.lang.Object
This encoder applies urlReplacement as defined by the WSDL specification.
Surrounding characters for parts may be parentheses '()' or braces '{}'. Pattern with parentheses is look up first, if found then it's replaced with the part value, else the pattern with braces is look up.
Escaping Considerations
Replacement and default values are escaped. All characters except unreserved (as defined by rfc2396) are escaped.
unreserved = alphanum | mark
mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
Rfc2396 is used to be compliant with java.net.URI.
Method Summary |
java.lang.String |
transform(java.lang.String baseUri,
java.util.Map<java.lang.String,org.w3c.dom.Element> values)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UrlReplacementTransformer
public UrlReplacementTransformer()
transform
public java.lang.String transform(java.lang.String baseUri,
java.util.Map<java.lang.String,org.w3c.dom.Element> values)
- Parameters:
baseUri
- - the base uri template containing part names enclosed within single curly bracesvalues
- - a map, the key is a part name (without curly braces), the value the replacement value for the part name. If the value is not a simple type, it will be skipped.
- Returns:
- the encoded uri
- Throws:
java.lang.IllegalArgumentException
- if a replacement value is null in the map or if a part pattern is found more than once