eventReader = xmlInputFactory.createXMLEventReader(content);
}
try {
AmazonWebServiceResponse<T> awsResponse = new AmazonWebServiceResponse<T>();
StaxUnmarshallerContext unmarshallerContext = new StaxUnmarshallerContext(eventReader, response.getHeaders());
unmarshallerContext.registerMetadataExpression("ResponseMetadata/RequestId", 2, ResponseMetadata.AWS_REQUEST_ID);
unmarshallerContext.registerMetadataExpression("requestId", 2, ResponseMetadata.AWS_REQUEST_ID);
registerAdditionalMetadataExpressions(unmarshallerContext);
T result = responseUnmarshaller.unmarshall(unmarshallerContext);
awsResponse.setResult(result);
Map<String, String> metadata = unmarshallerContext.getMetadata();
Map<String, String> responseHeaders = response.getHeaders();
if (responseHeaders != null) {
if (responseHeaders.get("x-amzn-RequestId") != null) {
metadata.put(ResponseMetadata.AWS_REQUEST_ID,
responseHeaders.get("x-amzn-RequestId"));