Skip to content

Instantly share code, notes, and snippets.

@quezacoatl
Created March 5, 2015 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quezacoatl/7f55bc833b103aa7f378 to your computer and use it in GitHub Desktop.
Save quezacoatl/7f55bc833b103aa7f378 to your computer and use it in GitHub Desktop.
AWS SDK 2.0.29 XML parsing issue
source 'https://rubygems.org'
#gem 'nokogiri'
gem 'aws-sdk', '~> 2'
GEM
remote: https://rubygems.org/
specs:
aws-sdk (2.0.29)
aws-sdk-resources (= 2.0.29)
aws-sdk-core (2.0.29)
builder (~> 3.0)
jmespath (~> 1.0)
multi_json (~> 1.0)
multi_xml (~> 0.5)
aws-sdk-resources (2.0.29)
aws-sdk-core (= 2.0.29)
builder (3.2.2)
jmespath (1.0.2)
multi_json (~> 1.0)
multi_json (1.11.0)
multi_xml (0.5.5)
PLATFORMS
ruby
DEPENDENCIES
aws-sdk (~> 2)
require 'bundler/setup'
require 'aws-sdk'
sqs = Aws::SQS::Client.new
shape = sqs.config.api.operation(:receive_message).output
shape = Seahorse::Model::Shapes::Structure.new({
'members' => {
shape.metadata('resultWrapper') => shape.definition,
'ResponseMetadata' => {
'type' => 'structure',
'members' => {
'RequestId' => { 'type' => 'string' }
}
}
}
}, shape_map: shape.shape_map)
xml = "<ReceiveMessageResponse>\n <ReceiveMessageResult>\n </ReceiveMessageResult>\n <ResponseMetadata>\n <RequestId>19643011-2310-45d0-8611-e8eaaccc550e</RequestId>\n </ResponseMetadata>\n</ReceiveMessageResponse>\n"
Aws::Xml::Parser.new(shape).parse(xml)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment