public class HTTPLocationTemplate extends Object
whttp:location
extension attribute. The template cites an element from
the instance data of the message to be serialized in the request IRI by enclosing the element's
local name in curly braces. The template is then matched against an element in the instance
data and replaced in the HTTP Location string by that element's String value.
For example, the template "{postcode}" is matched to the instance data element <postcode>90210</postcode> and the String value "90210" replaces "{postcode}" in the formatted HTTP Location string.
The WSDL 2.0 HTTP binding extension requires certain encoding be performed on the content of
the HTTP Location string. Templates of the form "{localname}" are called
A template that appears in the HTTP Location String before the first occurrence of '?' is in the URI Path portion of the HTTP Location. One that appears after the first occurrence of '?' is in the URI Query portion.
This class has a single constructor which takes three parameters that indicate the local name of the element cited in the template, whether the template is encoded and whether it appears in the Query portion of the HTTP Location.
The class has the following characteristics:
Constructor and Description |
---|
HTTPLocationTemplate(String name,
boolean isEncoded,
boolean isQuery)
Creates an HTTP Location template that cites the specified element.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns a String representing the local name of the element cited by this template.
|
String |
getValue()
Returns a String representing the value of the element cited by this template.
|
boolean |
isEncoded()
Returns 'true' if the template is encoded, otherwise 'false'.
|
boolean |
isQuery()
Returns 'true' if the template appears in the URI Query portion of the HTTP Location string,
otherwise false.
|
void |
setValue(String value)
Sets the String value of the element cited by this template.
|
public HTTPLocationTemplate(String name, boolean isEncoded, boolean isQuery)
name
- a String representing the local name of the element cited by this template.isEncoded
- a boolean value 'true' if it is an encoded template or 'false' if it is a
raw template.isQuery
- a boolean value 'true' if the template appears in the URI Query portion of the
HTTP Location string or 'false' if it appears in the URI Path.
So 'true' means it appears after first occurrence of '?'.public String getName()
public String getValue()
public void setValue(String value)
value
- the cited element's String valuepublic boolean isEncoded()
public boolean isQuery()
Copyright © 2005–2019 Apache Software Foundation. All rights reserved.