}
private ResponseProperties getResponsePropertiesFrom(MimeResponse mimeResponse, String producerURLAsString)
{
final List<NamedString> clientAttributes = mimeResponse.getClientAttributes();
final ResponseProperties properties;
if (ParameterValidation.existsAndIsNotEmpty(clientAttributes))
{
try
{
// make sure the URL is valid
new URL(producerURLAsString);
}
catch (MalformedURLException e)
{
// shouldn't happen
throw new RuntimeException(e);
}
properties = new ResponseProperties();
for (NamedString attribute : clientAttributes)
{
final String name = attribute.getName();
final String value = attribute.getValue();
if (javax.portlet.MimeResponse.MARKUP_HEAD_ELEMENT.equals(name))
{
final Element element = PayloadUtils.parseFromXMLString(value);
properties.getMarkupHeaders().addValue(name, element);
}
else
{
properties.getTransportHeaders().addValue(name, value);
}
}
}
else
{