Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/v0.1.1'

  • Loading branch information...
commit bfd6fb935269add7bff441f6a6352e9e3ce728c5 2 parents 1eff786 + 2f18c0c
@visoft authored
Showing with 8,200 additions and 790 deletions.
  1. +3 −2 .gitignore
  2. +2 −1  .travis.yml
  3. +6 −0 .yardopts
  4. +102 −0 CHANGELOG.md
  5. +0 −88 CHANGELOG.rdoc
  6. +14 −0 Guardfile
  7. +285 −0 README.md
  8. +0 −259 README.rdoc
  9. +0 −7 Rakefile
  10. +3 −2 features/basic_auth.feature
  11. +7 −6 features/batch_request.feature
  12. +57 −0 features/cassettes/basic_auth_protected_resource.yml
  13. +69 −0 features/cassettes/batch_request_additions.yml
  14. +69 −0 features/cassettes/batch_request_deletes.yml
  15. +69 −0 features/cassettes/batch_request_updates.yml
  16. +46 −0 features/cassettes/clean_database_for_testing.yml
  17. +297 −0 features/cassettes/cucumber_tags/basic_auth.yml
  18. +1,459 −0 features/cassettes/cucumber_tags/batch_request.yml
  19. +326 −0 features/cassettes/cucumber_tags/complex_types.yml
  20. +64 −0 features/cassettes/cucumber_tags/error_handling.yml
  21. +2,025 −0 features/cassettes/cucumber_tags/query_builder.yml
  22. +234 −0 features/cassettes/cucumber_tags/service.yml
  23. +937 −0 features/cassettes/cucumber_tags/service_manage.yml
  24. +647 −0 features/cassettes/cucumber_tags/service_methods.yml
  25. +203 −0 features/cassettes/cucumber_tags/ssl.yml
  26. +337 −0 features/cassettes/cucumber_tags/type_conversion.yml
  27. +65 −0 features/cassettes/service_manage_additions.yml
  28. +58 −0 features/cassettes/service_manage_deletions.yml
  29. +58 −0 features/cassettes/service_manage_deletions_2.yml
  30. +89 −0 features/cassettes/unsecured_metadata.yml
  31. +4 −3 features/complex_types.feature
  32. +14 −0 features/error_handling.feature
  33. +30 −9 features/query_builder.feature
  34. +4 −3 features/service.feature
  35. +6 −5 features/service_manage.feature
  36. +3 −2 features/service_methods.feature
  37. +8 −8 features/ssl.feature
  38. +38 −24 features/step_definitions/service_steps.rb
  39. +1 −3 features/support/env.rb
  40. +3 −2 features/support/hooks.rb
  41. +29 −18 features/support/pickle.rb
  42. +24 −0 features/support/vcr.rb
  43. +16 −17 features/type_conversion.feature
  44. +20 −18 lib/ruby_odata.rb
  45. +7 −6 lib/ruby_odata/association.rb
  46. +6 −7 lib/ruby_odata/class_builder.rb
  47. +4 −0 lib/ruby_odata/exceptions.rb
  48. +11 −0 lib/ruby_odata/helpers.rb
  49. +5 −6 lib/ruby_odata/operation.rb
  50. +4 −5 lib/ruby_odata/property_metadata.rb
  51. +98 −63 lib/ruby_odata/query_builder.rb
  52. +118 −103 lib/ruby_odata/service.rb
  53. +3 −1 lib/ruby_odata/version.rb
  54. +16 −12 ruby_odata.gemspec
  55. +78 −14 spec/query_builder_spec.rb
  56. +83 −83 spec/service_spec.rb
  57. +15 −0 spec/support/sample_service_matcher.rb
  58. 0  test/RubyODataService/RubyODataService/App_Data/.gitkeep
  59. +15 −9 test/blueprints.rb
  60. +5 −1 test/usage_samples/querying.rb
  61. +1 −3 test/usage_samples/sample_data.rb
View
5 .gitignore
@@ -1,3 +1,4 @@
+.yardoc
.idea
.idea/*
rerun.txt
@@ -16,6 +17,6 @@ test/applicationhost.config
*ReSharper*
*.suo
obj
-App_Data/
*.pdb
-test/RubyODataService/RubyODataService/bin/*.xml
+test/RubyODataService/RubyODataService/bin/*.xml
+test/RubyODataService/RubyODataService/App_Data/*.sdf
View
3  .travis.yml
@@ -1,4 +1,5 @@
rvm:
- 1.8.7
- 1.9.2
-script: "bundle exec rake spec"
+ - 1.9.3
+script: "bundle exec rake"
View
6 .yardopts
@@ -0,0 +1,6 @@
+--no-cache
+--verbose
+--markup markdown
+--readme README.md
+--hide-void-return
+lib/**/*.rb
View
102 CHANGELOG.md
@@ -0,0 +1,102 @@
+# ruby_odata Change Log
+
+### 0.0.1
+* New Features
+ * Basic CRUD Operations
+ * Query Enhancement: Filters
+ * Query Enhancement: Expands
+
+### 0.0.2
+* New Features
+ * Query Enhancement: Order By (both desc and asc)
+
+### 0.0.3
+* Bug Fixes
+ * Rearranged code to match the gem name. Things were mismatched between odata_ruby and ruby_odata.
+
+### 0.0.4
+* New Features
+ * Query Enhancement: skip
+ * Query Enhancement: top
+ * Ability to perform paging using skip and top together
+ * Updated README with examples for order_by, skip, and top
+
+### 0.0.5
+* Bug Fixes
+ * Works with Ruby 1.9.1
+ * Works with ActiveSupport 3.0.0.beta4
+
+### 0.0.6
+* New Features
+ * Ability to batch saves (Adds, Updates, Deletes); this will help save on network chatter
+
+### 0.0.7
+* New Features
+ * Complex Types are now supported
+ * Support for Edm.Int16, Edm.Int32, Edm.Int64
+ * Support for Edm.Decimal
+ * Support for Edm.DateTime
+
+### 0.0.8
+* New Features
+ * Basic HTTP Authentication (thanks J.D. Mullin)
+ * Modified cucumber tests to setup the test database so you no longer need to copy them yourself
+ * Support for nullable elements returned from the Data Service (m:null ="true")
+* Bug Fixes
+ * ActiveSupport 2.3.x (tested 2.3.11) and 3.0.x (tested 3.0.4) are now supported
+ * Works with Ruby 1.9.2
+
+### 0.0.9
+* New Features
+ * Support for self-signed SSL certificates (thanks J.D. Mullin)
+ * Refactored building classes/collections to only make one call to the service
+ * Added support for a WCF service with lowercase entities (reported by Klaus Rohe)
+* Bug Fixes
+ * Fixed issue with passing a service URL with a trailing slash
+* Other
+ * Cleaned up testing by adding a default task to the Rakefile that runs RSpec and Cucumber
+
+### 0.0.10
+* New Features
+ * Added the ability to pass additional parameters that are appended to the query string for requests
+ * Added initial support for feed customizations (SyndicationTitle and SyndicationSummary)
+ * Enhanced ruby_odata's awareness of classes based on the metadata instead of relying on results that are returned
+* Bug Fixes
+ * Fixed issues with nested collections (eager loading)
+ * Handled ArgumentError on the Time.parse for older versions of Ruby; used DateTime.parse instead if Time.parse fails
+ * Removed the camelize method call when building the root URL for collections (Reported by mkoegel, issue #3 on github)
+ * Handled building results (classes) where the category element is missing but there is a title element instead. (Reported by mkoegel, issue #3 on github in the comments)
+* Other
+ * Change HTTP port to 8989 since 8888 conflicts with the Intel AppStore
+ * Refactored service step for HTTP calls where the service address is defined within the step making it easier to make changes in the future.
+
+### 0.1.0
+* **BREAKING CHANGES**
+ * Previously the ruby_odata `Service.execute` and `Service.save_changes` used to return a single entity object if there was only one result returned. Now, the results are always an Enumerable (except in the case of boolean results like a delete), so if you just need one result, use the `first` method on the result set
+* New Features
+ * Support for partial results (thanks arienmalec)
+ * Added support for single layer inheritance (thanks to [Scott](http://odetocode.com/Blogs/scott/archive/2010/07/11/odata-and-ruby.aspx))
+ * Added support for querying links (see [Issue 10](https://github.com/visoft/ruby_odata/issues/10))
+ * Added support for adding links between entities (add_link)
+ * Added support for lazy loading
+ * Added a convenience method (`first`) for accessing a single result by id
+ * Added basic reflection of the entity model via the ruby_odata service
+ * Added the ability to create ruby_odata models in a specified namespace to prevent conflicts with local models
+ * Added the ability to call function imports exposed by the WCF Data Service
+ * Other
+ * Changed the test project (for Cucumber integration tests) to use SQL Compact 4, Entity Framework 4.1, and WCF Data Services October 2011 CTP
+ * Added [Pickle](https://github.com/ianwhite/pickle) integration to simplify Cucumber step definitions
+
+### 0.1.1
+* New Features
+ * Added the `count` method (to `QueryBuilder`) for returning a count from an OData service
+ * Added the `navigate` method (to `QueryBuilder`) in order to handle filtering of children
+
+* Bug Fixes
+ * Escaped IDs in queries where the ID is a string with spaces
+
+* Other
+ * Goodbye RDoc; Hello Markdown/YARD
+ * Refactored exceptions to use proper error classes
+ * Integrated [Guard](https://github.com/guard/guard) into the test suite for continuous testing
+ * Integrated [VCR](https://github.com/myronmarston/vcr) into test suite in order to run Cucumber steps without running the test server.
View
88 CHANGELOG.rdoc
@@ -1,88 +0,0 @@
-= ruby_odata Change Log
-
-=== 0.0.1
-* New Features
- * Basic CRUD Operations
- * Query Enhancement: Filters
- * Query Enhancement: Expands
-
-=== 0.0.2
-* New Features
- * Query Enhancement: Order By (both desc and asc)
-
-=== 0.0.3
-* Bug Fixes
- * Rearranged code to match the gem name. Things were mismatched between odata_ruby and ruby_odata.
-
-=== 0.0.4
-* New Features
- * Query Enhancement: skip
- * Query Enhancement: top
- * Ability to perform paging using skip and top together
- * Updated README with examples for order_by, skip, and top
-
-=== 0.0.5
-* Bug Fixes
- * Works with Ruby 1.9.1
- * Works with ActiveSupport 3.0.0.beta4
-
-=== 0.0.6
-* New Features
- * Ability to batch saves (Adds, Updates, Deletes); this will help save on network chatter
-
-=== 0.0.7
-* New Features
- * Complex Types are now supported
- * Support for Edm.Int16, Edm.Int32, Edm.Int64
- * Support for Edm.Decimal
- * Support for Edm.DateTime
-
-=== 0.0.8
-* New Features
- * Basic HTTP Authentication (thanks J.D. Mullin)
- * Modified cucumber tests to setup the test database so you no longer need to copy them yourself
- * Support for nullable elements returned from the Data Service (m:null ="true")
-* Bug Fixes
- * ActiveSupport 2.3.x (tested 2.3.11) and 3.0.x (tested 3.0.4) are now supported
- * Works with Ruby 1.9.2
-
-=== 0.0.9
-* New Features
- * Support for self-signed SSL certificates (thanks J.D. Mullin)
- * Refactored building classes/collections to only make one call to the service
- * Added support for a WCF service with lowercase entities (reported by Klaus Rohe)
-* Bug Fixes
- * Fixed issue with passing a service URL with a trailing slash
-* Other
- * Cleaned up testing by adding a default task to the Rakefile that runs RSpec and Cucumber
-
-=== 0.0.10
-* New Features
- * Added the ability to pass additional parameters that are appended to the query string for requests
- * Added initial support for feed customizations (SyndicationTitle and SyndicationSummary)
- * Enhanced ruby_odata's awareness of classes based on the metadata instead of relying on results that are returned
-* Bug Fixes
- * Fixed issues with nested collections (eager loading)
- * Handled ArgumentError on the Time.parse for older versions of Ruby; used DateTime.parse instead if Time.parse fails
- * Removed the camelize method call when building the root URL for collections (Reported by mkoegel, issue #3 on github)
- * Handled building results (classes) where the category element is missing but there is a title element instead. (Reported by mkoegel, issue #3 on github in the comments)
-* Other
- * Change HTTP port to 8989 since 8888 conflicts with the Intel AppStore
- * Refactored service step for HTTP calls where the service address is defined within the step making it easier to make changes in the future.
-
-=== 0.1.0
-* **BREAKING CHANGES**
- * Previously the ruby_odata +Service.execute+ and +Service.save_changes+ used to return a single entity object if there was only one result returned. Now, the results are always an Enumerable (except in the case of boolean results like a delete), so if you just need one result, use the +first+ method on the result set
-* New Features
- * Support for partial results (thanks arienmalec)
- * Added support for single layer inheritance (thanks to http://odetocode.com/Blogs/scott/archive/2010/07/11/odata-and-ruby.aspx)
- * Added support for querying links (see https://github.com/visoft/ruby_odata/issues/10)
- * Added support for adding links between entities (add_link)
- * Added support for lazy loading
- * Added a convenience method (+first+) for accessing a single result by id
- * Added basic reflection of the entity model via the ruby_odata service
- * Added the ability to create ruby_odata models in a specified namespace to prevent conflicts with local models
- * Added the ability to call function imports exposed by the WCF Data Service
-* Other
- * Changed the test project (for Cucumber integration tests) to use SQL Compact 4, Entity Framework 4.1, and WCF Data Services October 2011 CTP
- * Added {Pickle}[https://github.com/ianwhite/pickle] integration to simplify Cucumber step definitions
View
14 Guardfile
@@ -0,0 +1,14 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/ruby_odata/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+end
+
+guard 'cucumber', :all_after_pass => false, :all_on_start => false do
+ watch(%r{^features/.+\.feature$})
+ watch(%r{^features/support/.+$}) { 'features' }
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
+end
View
285 README.md
@@ -0,0 +1,285 @@
+# ruby_odata
+
+The **Open Data Protocol** (OData) is a fantastic way to query and update data over standard Web technologies. The ruby_odata library acts as a consumer of OData services.
+
+[![Build Status](https://secure.travis-ci.org/visoft/ruby_odata.png)](http://travis-ci.org/visoft/ruby_odata)
+
+## Resources
+
+* Source Code (hosted on GitHub): http://github.com/visoft/ruby_odata
+* Documentation (hosted on rdoc.info): http://rdoc.info/projects/visoft/ruby_odata
+* Issue tracking (hosted on GitHub): https://github.com/visoft/ruby_odata/issues
+* Wiki (hosted on GitHub): http://wiki.github.com/visoft/ruby_odata/
+* Gem (hosted on Gemcutter): http://gemcutter.org/gems/ruby_odata
+* Blog articles:
+ * [Introducing a Ruby OData Client Library](http://bit.ly/IntroRubyOData)
+ * [Ruby OData Update v0.0.7](http://bit.ly/ruby_odata007)
+ * [Ruby OData Update v0.0.8](http://bit.ly/ruby_odata008)
+ * [Ruby OData Update v0.0.10](http://bit.ly/ruby_odata0010)
+
+## Installation
+You can install ruby_odata as a gem using:
+
+ gem install ruby_odata
+
+## Usage
+
+### Instantiating the Service
+There are various options that you can pass when creating an instance of the service, these include:
+* username: username for http basic auth
+* password: password for http basic auth
+* verify_ssl: false if no verification, otherwise mode (OpenSSL::SSL::VERIFY_PEER is default)
+* additional_params: a hash of query string params that will be passed on all calls (query, new, update, delete, batch)
+* namespace: a string based namespace to create your objects in. You can specify the namespace using periods as separators (like .NET, for example `VisoftInc.Sample.Models`) or using double colons as separators (like Ruby `VisoftInc::Sample::Models`). By providing a namespace you can prevent naming collisions in your applications.
+
+### Adding
+When you point at a service, an AddTo<EntityName> method is created for you. This method takes in the new entity to create. To commit the change, you need to call the save_changes method on the service. To add a new category for example, you would simply do the following:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
+ new_category = Category.new
+ new_category.Name = "Sample Category"
+ svc.AddToCategories(new_category)
+ category = svc.save_changes
+ puts category.to_json
+
+### Updating
+To update an object, simply pass the modified object to the update_object method on the service. Updating, like adding requires you to call save_changes in order to persist the change. For example:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
+ new_category = Category.new
+ new_category.Name = "Sample Category"
+ svc.AddToCategories(new_category)
+ category = svc.save_changes
+ puts category.to_json
+
+ category.Name = 'Updated Category'
+ svc.update_object(category)
+ result = svc.save_changes
+ puts "Was the category updated? #{result}"
+
+### Deleting
+Deleting an object involves passing the tracked object to the delete_object method on the service. Deleting is another function that involves the save_changes method (to commit the change back to the server). In this example, we'll add a category and then delete it.
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
+ new_category = Category.new
+ new_category.Name = "Sample Category"
+ svc.AddToCategories(new_category)
+ category = svc.save_changes
+ puts category.to_json
+
+ svc.delete_object(category)
+ result = svc.save_changes
+ puts "Was the category deleted? #{result}"
+
+### Add Link
+Adding a linkage between entities can now be performed outside of creation or modification of the objects. See the [OData documents](http://www.odata.org/developers/protocols/operations#CreatingLinksbetweenEntries) for more details.
+To add a link between entities, simply call the `add_link` method on the Service passing the parent object, the name of the navigation property, and the child object. Like all save operations, you need to call `save_changes` to persist the changes.
+
+ svc.add_link(<Parent>, <Navigation Property Name>, <Child>)
+ svc.save_changes
+
+### Querying
+Querying is easy, for example to pull all the categories from the SampleService, you simply can run:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
+ svc.Categories
+ categories = svc.execute
+ puts categories.to_json
+
+You can also expand, add filters, order, skip records, and take only the top X records to the query before executing it. For example:
+
+### Expanding
+Expanding allows you to eagerly load other objects that are children of the root.
+You can use more than one expand on a query.
+For expanding grandchild and lower entities, you must pass in the full path from the root, for example `Products.expand('Orders').expand('Orders/LineItems')`
+
+ # Without expanding the query
+ svc.Products(1)
+ prod1 = svc.execute
+ puts "Without expanding the query"
+ puts "#{prod1.to_json}\n"
+
+ # With expanding the query
+ svc.Products(1).expand('Category')
+ prod1 = svc.execute
+ puts "With expanding the query"
+ puts "#{prod1.to_json}\n"
+
+### Lazy Loading
+If you want to implement lazy loading, the ruby_odata `Service` allows you to perform this. You simply need to call the `load_property` method on the `Service` passing in the object and the navigation property to fill.
+
+ # Without expanding the query
+ svc.Products(1)
+ prod1 = svc.execute.first
+ puts "#{prod1.to_json}\n"
+
+ # Use load_property for lazy loading
+ svc.load_property(prod1, "Category")
+ puts "#{prod1.to_json}\n"
+
+### Filtering
+The syntax for filtering can be found on the [OData Protocol URI Conventions](http://www.odata.org/developers/protocols/uri-conventions#FilterSystemQueryOption) page.
+You can use more than one filter, if you call the filter method multiple times it will before an AND.
+
+ # You can access by ID (but that isn't is a filter)
+ # The syntax is just svc.ENTITYNAME(ID) which is shown in the expanding examples above
+
+ svc.Products.filter("Name eq 'Product 2'")
+ prod = svc.execute
+ puts "Filtering on Name eq 'Product 2'"
+ puts "#{prod.to_json}"
+
+Note you can pass more than one filter in the string, for example (querying Netflix):
+
+ svc.Titles.filter("Rating eq 'PG' and ReleaseYear eq 1980")
+
+Filters can also be chained, by doing this you will create an "and" filter (just like the last example) when it is passed to the server.
+
+ svc.Titles.filter("Rating eq 'PG'").filter("ReleaseYear eq 1980")
+
+
+### Combining Expanding and Filtering
+The query operations follow a [fluent interface](http://en.wikipedia.org/wiki/Fluent_interface), although they can be added by themselves as well as chained
+
+ svc.Products.filter("Name eq 'Product 2'").expand("Category")
+ prod = svc.execute
+ puts "Filtering on Name eq 'Product 2' and expanding"
+ puts "#{prod.to_json}"
+
+### Order By
+You can order the results by properties of your choice, either ascending or descending.
+Order by are similar to `expands` in that you can use more than one of them on a query.
+For expanding grandchild and lower entities, you must pass in the full path from the root like would do on an `expand`
+
+ svc.Products.order_by("Name")
+ products = svc.execute
+
+ # Specifically requesting descending
+ svc.Products.order_by("Name desc")
+ products = svc.execute
+
+ # Specifically requesting ascending
+ svc.Products.order_by("Name asc")
+ products = svc.execute
+
+Like the fiter method, order_by statements can also be chained like so:
+
+ svc.Products.order_by("Name asc").order_by("Price desc")
+
+
+### Skip
+Skip allows you to skip a number of records when querying. This is often used for paging along with `top`.
+
+ svc.Products.skip(5)
+ products = svc.execute # => skips the first 5 items
+
+### Top
+Top allows you only retrieve the top X number of records when querying. This is often used for paging along with `skip`.
+
+ svc.Products.top(5)
+ products = svc.execute # => returns only the first 5 items
+
+### Navigation Property Links Only Query
+OData allows you to [query navigation properties and only return the links for the entities](http://www.odata.org/developers/protocols/uri-conventions#AddressingLinksBetweenEntries) (instead of the data).
+**Note**: You cannot use the `links` method and the `count` method in the same query
+
+ svc.Categories(1).links("Products")
+ product_links = svc.execute # => returns URIs for the products under the Category with an ID of 1
+
+### Advanced Navigation Property Functions
+There are instances where you may need to navigate down a level in order to form the proper query.
+Take for example [Netflix's OData Service](http://developer.netflix.com/docs/oData_Catalog/) and their `Genres` Entity Collection, where you can access a Navigation Property (in this case `Titles` through the `Genre` and filter on it:
+
+ http://odata.netflix.com/Catalog/Genres('Horror%20Movies')/Titles?$filter=Name%20eq'Halloween'
+
+In order to do this within ruby_odata, you can use the `navigate` method of the `QueryBuilder` to drill-down into the Navigation Property. This will allow you to perform `filter`s, `skip`s, `orderby`s, etc. against the children.
+
+ svc = OData::Service.new("http://odata.netflix.com/Catalog")
+ svc.Genres("'Horror Movies'").navigate("Titles").filter("Name eq 'Halloween'")
+ movies = svc.execute
+ movies.each { |m| puts m.Name }
+
+### Count
+Sometimes all you want to do is count records, for that, you can use the `count` method.
+This method can be combined with other options, such as `filter` but cannot be combined with the `links` method.
+
+ svc.Products.count
+ puts svc.execute # => 2
+
+### Partial feeds
+OData allows services to do server-side paging in Atom by defining a next link. The default behavior is to repeatedly consume partial feeds until the result set is complete.
+
+ svc.Partials
+ results = svc.execute # => retrieves all results in the Partials collection
+
+If desired (e.g., because the result set is too large to fit in memory), explicit traversal of partial results can be requested via options:
+
+ svc = OData::Service.new "http://example.com/Example.svc", { :eager_partial => false }
+ svc.Partials
+ results = svc.execute # => retrieves the first set of results returned by the server
+ if svc.partial? # => true if the last result set was a partial result set (i.e., had a next link)
+ results.concat svc.next # => retrieves the next set of results
+ end
+ while svc.partial? # => to retrieve all partial result sets
+ results.concat svc.next
+ end
+
+### Authentication
+Basic HTTP Authentication is supported via sending a username and password as service constructor arguments:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc", { :username => "bob", :password=> "12345" }
+
+### SSL/https Certificate Verification
+The certificate verification mode can be passed in the options hash via the :verify_ssl key. For example, to ignore verification in order to use a self-signed certificate:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "https://127.0.0.1:44300/SampleService/RubyOData.svc", { :verify_ssl => false }
+
+Or an OpenSSL integer constant can be passed as well:
+
+ require 'ruby_odata'
+
+ svc = OData::Service.new "https://127.0.0.1:44300/SampleService/RubyOData.svc", { :verify_ssl => OpenSSL::SSL::VERIFY_PEER }
+
+Default verification is OpenSSL::SSL::VERIFY_PEER. Note due to the way Ruby's Request object implements certificate checking, you CAN NOT pass OpenSSL::SSL::VERIFY_NONE, you must instead pass a boolean false.
+
+## Function Imports / Custom Service Methods
+Function Imports are custom service methods exposed by the WCF Data Service. Each function import will be created as a method on the ruby_odata Service. When you make a call to one of these, they return a result immediately without the need to call `execute` or `save_changes`.
+
+## Reflection
+Instead of relying on looking at the EDMX directly, ruby_odata allows you to perform basic reflection on objects
+### Service Level Methods
+* **Collections** - You can look at the collections exposed by a service by accessing the `collections` method, which is a hash. The key is the name of the collection and the value is the hash with `edmx_type`, which returns the name of the type from the EDMX and `:type`, which is the local type that is created for you
+* **Classes** - To see the generated classes, you can utilize the `classes` method on the service. The return result is a hash where the key is the class name and the value is the class type.
+* **Function Imports** - You can find any function import (custom service methods) exposed by the service by accessing the `function_imports` method. This is a hash where the key is the Function Import name and the value is metadata about the Function Import.
+
+### Class Level Methods
+* **Properties** - You can call the class method `properties` on a generated class to see the method (properties) that were created. The returned result is a hash where the key is the property name and the value is metadata for the property like if it is nullable, the EDM Type, etc.
+
+## Tests
+All of the tests are written using Cucumber going against a sample service (Found in test/RubyODataService/RubyODataService/*).
+The SampleService is an ASP.NET Web Site running a SQL Compact 4 Database, which gets generated at runtime, as well as the ADO.NET Entity Framework 4.1 and WCF Data Services October 2011 CTP. The reason for the CTP is that WCF Data Services currently shipping with .NET 4 doesn't support Entity Framework 4.1's "Code First" approach (e.g. no EDMX, all POCOs)
+In order to run the tests, you need to spin up IIS running a virtual directory of SampleService on port 8989 (http://localhost:8989/SampleService) and another instance running on port 44300.
+
+**NOTE** The ports (8989 and 44300) and webserver (localhost by default) here are customizable thanks to `/features/contants.rb`. Take a look in there for the corresponding environment variables that you can set.
+
+The SampleService requires IIS or IIS Express. IIS Express is a free download from Microsoft and the preferred approach to running the application. Once installed, there is a batch file found in /test called "iisExpress x64.bat" that will spin up the appropriate instances needed for the Cucumber tests. There is a also an "iisExpress x86.bat" file for those of you running a 32-bit machine. The only difference is the path to the Program Files directory. Once you run the batch file, the web server will spin up. To stop the server, use 'Q' and then enter or close the command window.
+
+If you are testing on a Windows machine, you may encounter a problem with using Cucumber and Ruby 1.9.2. You will get a message when you fire up cucumber about missing msvcrt-ruby18.dll. The fix for this is to make sure you have the [RubyInstaller DevKit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) installed, then do the following:
+
+ gem uninstall json
+ gem install json --platform=ruby -v 1.4.6
+
+Once the SampleService is running, from the BASE ruby_odata directory, simply type `rake`, which will run the RSpec and Cucumber specs. You can also run them separately `rake spec` for RSpec and `rake features` for Cucumber.
+
View
259 README.rdoc
@@ -1,259 +0,0 @@
-= ruby_odata
-
-The <b>Open Data Protocol</b> (OData) is a fantastic way to query and update data over standard Web technologies. The ruby_odata library acts as a consumer of OData services.
-
-== Resources
-
-* Source Code (hosted on GitHub): http://github.com/visoft/ruby_odata
-* Documentation (hosted on rdoc.info): http://rdoc.info/projects/visoft/ruby_odata
-* Issue tracking (hosted on GitHub): https://github.com/visoft/ruby_odata/issues
-* Wiki (hosted on GitHub): http://wiki.github.com/visoft/ruby_odata/
-* Gem (hosted on Gemcutter): http://gemcutter.org/gems/ruby_odata
-* Blog articles:
- * {Introducing a Ruby OData Client Library}[http://bit.ly/IntroRubyOData]
- * {Ruby OData Update v0.0.7}[http://bit.ly/ruby_odata007]
- * {Ruby OData Update v0.0.8}[http://bit.ly/ruby_odata008]
- * {Ruby OData Update v0.0.10}[http://bit.ly/ruby_odata0010]
-
-== Installation
-You can install ruby_odata as a gem using:
- gem install ruby_odata
-
-== Usage
-
-=== Instantiating the Service
-There are various options that you can pass when creating an instance of the service, these include:
-* username: username for http basic auth
-* password: password for http basic auth
-* verify_ssl: false if no verification, otherwise mode (OpenSSL::SSL::VERIFY_PEER is default)
-* additional_params: a hash of query string params that will be passed on all calls (query, new, update, delete, batch)
-* namespace: a string based namespace to create your objects in. You can specify the namespace using periods as separators (like .NET, for example <tt>VisoftInc.Sample.Models</tt>) or using double colons as separators (like Ruby <tt>VisoftInc::Sample::Models</tt>). By providing a namespace you can prevent naming collisions in your applications.
-
-=== Adding
-When you point at a service, an AddTo<EntityName> method is created for you. This method takes in the new entity to create. To commit the change, you need to call the save_changes method on the service. To add a new category for example, you would simply do the following:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
- new_category = Category.new
- new_category.Name = "Sample Category"
- svc.AddToCategories(new_category)
- category = svc.save_changes
- puts category.to_json
-
-=== Updating
-To update an object, simply pass the modified object to the update_object method on the service. Updating, like adding requires you to call save_changes in order to persist the change. For example:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
- new_category = Category.new
- new_category.Name = "Sample Category"
- svc.AddToCategories(new_category)
- category = svc.save_changes
- puts category.to_json
-
- category.Name = 'Updated Category'
- svc.update_object(category)
- result = svc.save_changes
- puts "Was the category updated? #{result}"
-
-=== Deleting
-Deleting an object involves passing the tracked object to the delete_object method on the service. Deleting is another function that involves the save_changes method (to commit the change back to the server). In this example, we'll add a category and then delete it.
-
- require 'ruby_odata'
-
- svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
- new_category = Category.new
- new_category.Name = "Sample Category"
- svc.AddToCategories(new_category)
- category = svc.save_changes
- puts category.to_json
-
- svc.delete_object(category)
- result = svc.save_changes
- puts "Was the category deleted? #{result}"
-
-=== Add Link
-Adding a linkage between entities can now be performed outside of creation or modification of the objects. See the {OData documents}[http://www.odata.org/developers/protocols/operations#CreatingLinksbetweenEntries] for more details.
-To add a link between entities, simply call the +add_link+ method on the Service passing the parent object, the name of the navigation property, and the child object. Like all save operations, you need to call +save_changes+ to persist the changes.
-
- svc.add_link(<Parent>, <Navigation Property Name>, <Child>)
- svc.save_changes
-
-=== Querying
-Querying is easy, for example to pull all the categories from the SampleService, you simply can run:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc"
- svc.Categories
- categories = svc.execute
- puts categories.to_json
-
-You can also expand, add filters, order, skip records, and take only the top X records to the query before executing it. For example:
-
-=== Expanding
-Expanding allows you to eagerly load other objects that are children of the root.
-You can use more than one expand on a query.
-For expanding grandchild and lower entities, you must pass in the full path from the root, for example <tt>Products.expand('Orders').expand('Orders/LineItems')</tt>
-
- # Without expanding the query
- svc.Products(1)
- prod1 = svc.execute
- puts "Without expanding the query"
- puts "#{prod1.to_json}\n"
-
- # With expanding the query
- svc.Products(1).expand('Category')
- prod1 = svc.execute
- puts "With expanding the query"
- puts "#{prod1.to_json}\n"
-
-=== Lazy Loading
-If you want to implement lazy loading, the ruby_odata `Service` allows you to perform this. You simply need to call the `load_property` method on the `Service` passing in the object and the navigation property to fill.
-
- # Without expanding the query
- svc.Products(1)
- prod1 = svc.execute.first
- puts "#{prod1.to_json}\n"
-
- # Use load_property for lazy loading
- svc.load_property(prod1, "Category")
- puts "#{prod1.to_json}\n"
-
-=== Filtering
-The syntax for filtering can be found on the {OData Protocol URI Conventions}[http://www.odata.org/developers/protocols/uri-conventions#FilterSystemQueryOption] page.
-You can use more than one filter, if you call the filter method multiple times it will before an AND.
-
- # You can access by ID (but that isn't is a filter)
- # The syntax is just svc.ENTITYNAME(ID) which is shown in the expanding examples above
-
- svc.Products.filter("Name eq 'Product 2'")
- prod = svc.execute
- puts "Filtering on Name eq 'Product 2'"
- puts "#{prod.to_json}"
-
-Note you can pass more than one filter in the string, for example (querying Netflix):
-
- svc.Titles.filter("Rating eq 'PG' and ReleaseYear eq 1980")
-
-Filters can also be chained, by doing this you will create an "and" filter (just like the last example) when it is passed to the server.
-
- svc.Titles.filter("Rating eq 'PG'").filter("ReleaseYear eq 1980")
-
-
-=== Combining Expanding and Filtering
-The query operations follow a {fluent interface}[http://en.wikipedia.org/wiki/Fluent_interface], although they can be added by themselves as well as chained
-
- svc.Products.filter("Name eq 'Product 2'").expand("Category")
- prod = svc.execute
- puts "Filtering on Name eq 'Product 2' and expanding"
- puts "#{prod.to_json}"
-
-=== Order By
-You can order the results by properties of your choice, either ascending or descending.
-Order by are similar to +expands+ in that you can use more than one of them on a query.
-For expanding grandchild and lower entities, you must pass in the full path from the root like would do on an +expand+
-
- svc.Products.order_by("Name")
- products = svc.execute
-
- # Specifically requesting descending
- svc.Products.order_by("Name desc")
- products = svc.execute
-
- # Specifically requesting ascending
- svc.Products.order_by("Name asc")
- products = svc.execute
-
-Like the fiter method, order_by statements can also be chained like so:
-
- svc.Products.order_by("Name asc").order_by("Price desc")
-
-
-=== Skip
-Skip allows you to skip a number of records when querying. This is often used for paging along with +top+.
-
- svc.Products.skip(5)
- products = svc.execute # => skips the first 5 items
-
-=== Top
-Top allows you only retrieve the top X number of records when querying. This is often used for paging along with +skip+.
-
- svc.Products.top(5)
- products = svc.execute # => returns only the first 5 items
-
-=== Navigation Property Links Only Query
-OData allows you to {query navigation properties and only return the links for the entities}[http://www.odata.org/developers/protocols/uri-conventions#AddressingLinksBetweenEntries] (instead of the data)
- svc.Categories(1).links("Products")
- product_links = svc.execute # => returns URIs for the products under the Category with an ID of 1
-
-=== Partial feeds
-OData allows services to do server-side paging in Atom by defining a next link. The default behavior is to repeatedly consume partial feeds until the result set is complete.
-
- svc.Partials
- results = svc.execute # => retrieves all results in the Partials collection
-
-If desired (e.g., because the result set is too large to fit in memory), explicit traversal of partial results can be requested via options:
-
- svc = OData::Service.new "http://example.com/Example.svc", { :eager_partial => false }
- svc.Partials
- results = svc.execute # => retrieves the first set of results returned by the server
- if svc.partial? # => true if the last result set was a partial result set (i.e., had a next link)
- results.concat svc.next # => retrieves the next set of results
- end
- while svc.partial? # => to retrieve all partial result sets
- results.concat svc.next
- end
-
-=== Authentication
-Basic HTTP Authentication is supported via sending a username and password as service constructor arguments:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "http://127.0.0.1:8989/SampleService/RubyOData.svc", { :username => "bob", :password=> "12345" }
-
-=== SSL/https Certificate Verification
-The certificate verification mode can be passed in the options hash via the :verify_ssl key. For example, to ignore verification in order to use a self-signed certificate:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "https://127.0.0.1:44300/SampleService/RubyOData.svc", { :verify_ssl => false }
-
-Or an OpenSSL integer constant can be passed as well:
-
- require 'ruby_odata'
-
- svc = OData::Service.new "https://127.0.0.1:44300/SampleService/RubyOData.svc", { :verify_ssl => OpenSSL::SSL::VERIFY_PEER }
-
-Default verification is OpenSSL::SSL::VERIFY_PEER. Note due to the way Ruby's Request object implements certificate checking, you CAN NOT pass OpenSSL::SSL::VERIFY_NONE, you must instead pass a boolean false.
-
-== Function Imports / Custom Service Methods
-Function Imports are custom service methods exposed by the WCF Data Service. Each function import will be created as a method on the ruby_odata Service. When you make a call to one of these, they return a result immediately without the need to call +execute+ or +save_changes+.
-
-== Reflection
-Instead of relying on looking at the EDMX directly, ruby_odata allows you to perform basic reflection on objects
-=== Service Level Methods
-* *Collections* - You can look at the collections exposed by a service by accessing the +collections+ method, which is a hash. The key is the name of the collection and the value is the hash with +edmx_type+, which returns the name of the type from the EDMX and <tt>:type</tt>, which is the local type that is created for you
-* *Classes* - To see the generated classes, you can utilize the +classes+ method on the service. The return result is a hash where the key is the class name and the value is the class type.
-* <b>Function Imports</b> - You can find any function import (custom service methods) exposed by the service by accessing the +function_imports+ method. This is a hash where the key is the Function Import name and the value is metadata about the Function Import.
-
-=== Class Level Methods
-* *Properties* - You can call the class method +properties+ on a generated class to see the method (properties) that were created. The returned result is a hash where the key is the property name and the value is metadata for the property like if it is nullable, the EDM Type, etc.
-
-== Tests
-All of the tests are written using Cucumber going against a sample service (Found in test/RubyODataService/RubyODataService/*).
-The SampleService is an ASP.NET Web Site running a SQL Compact 4 Database, which gets generated at runtime, as well as the ADO.NET Entity Framework 4.1 and WCF Data Services October 2011 CTP. The reason for the CTP is that WCF Data Services currently shipping with .NET 4 doesn't support Entity Framework 4.1's "Code First" approach (e.g. no EDMX, all POCOs)
-In order to run the tests, you need to spin up IIS running a virtual directory of SampleService on port 8989 (http://localhost:8989/SampleService) and another instance running on port 44300.
-
-*NOTE* The ports (8989 and 44300) and webserver (localhost by default) here are customizable thanks to <tt>/features/contants.rb</tt>. Take a look in there for the corresponding environment variables that you can set.
-
-The SampleService requires IIS or IIS Express. IIS Express is a free download from Microsoft and the preferred approach to running the application. Once installed, there is a batch file found in /test called "iisExpress x64.bat" that will spin up the appropriate instances needed for the Cucumber tests. There is a also an "iisExpress x86.bat" file for those of you running a 32-bit machine. The only difference is the path to the Program Files directory. Once you run the batch file, the web server will spin up. To stop the server, use 'Q' and then enter or close the command window.
-
-If you are testing on a Windows machine, you may encounter a problem with using Cucumber and Ruby 1.9.2. You will get a message when you fire up cucumber about missing msvcrt-ruby18.dll. The fix for this is to make sure you have the {RubyInstaller DevKit}[https://github.com/oneclick/rubyinstaller/wiki/Development-Kit] installed, then do the following:
- gem uninstall json
- gem install json --platform=ruby -v 1.4.6
-
-Once the SampleService is running, from the BASE ruby_odata directory, simply type +rake+, which will run the RSpec and Cucumber specs. You can also run them separately <tt>rake spec</tt> for RSpec and <tt>rake features</tt> for Cucumber.
-
View
7 Rakefile
@@ -1,14 +1,7 @@
-require 'rake/rdoctask'
require 'bundler'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
-Rake::RDocTask.new do |rd|
- rd.main = "README.rdoc"
- rd.rdoc_files.include("README.rdoc", "CHANGELOG.rdoc", "lib/**/*.rb")
- rd.rdoc_dir = 'doc'
-end
-
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
View
5 features/basic_auth.feature
@@ -1,5 +1,6 @@
+@basic_auth
Feature: Service Should Access Basic Auth Protected Resources
-
+
Background:
Given a HTTP BasicAuth ODataService exists using username "admin" and password "passwd"
And blueprints exist for the service
@@ -11,7 +12,7 @@ Scenario: Entity should fill values on protected resource
Given I call "AddToCategories" on the service with a new "Category" object with Name: "Auth Test Category"
And I save changes
And I call "Categories" on the service with args: "1"
- When I run the query
+ When I run the query within a cassette named "basic_auth_protected_resource"
Then the method "Id" on the first result should equal: "1"
And the method "Name" on the first result should equal: "Auth Test Category"
View
13 features/batch_request.feature
@@ -1,8 +1,9 @@
+@batch_request
Feature: Batch request
In order to minimize network traffic
As a user of the library
I want to be able to batch changes (Add/Update/Delete) and persist the batch instead of one at a time
-
+
Background:
Given a HTTP ODataService exists
And blueprints exist for the service
@@ -14,7 +15,7 @@ Scenario: Save Changes should allow for batch additions
Then the save result should equal: "true"
When I call "Products" on the service
And I order by: "Name"
- And I run the query
+ And I run the query within a cassette named "batch_request_additions"
Then the result should be:
| Name |
| Product 1 |
@@ -31,13 +32,13 @@ Scenario: Save Changes should allow for batch updates
And I call "update_object" on the service with the first last query result
When I call "Products" on the service
And I filter the query with: "Name eq 'Product 2'"
- And I run the query
+ And I run the query
And I set "Name" on the first result to "Product 2 - Updated"
And I call "update_object" on the service with the first last query result
When I save changes
When I call "Products" on the service
And I order by: "Name"
- And I run the query
+ And I run the query within a cassette named "batch_request_updates"
Then the result should be:
| Name |
| Product 1 - Updated |
@@ -55,12 +56,12 @@ Scenario: Save Changes should allow for batch deletes
And I call "delete_object" on the service with the first last query result
When I call "Products" on the service
And I filter the query with: "Name eq 'Product 3'"
- And I run the query
+ And I run the query
And I call "delete_object" on the service with the first last query result
When I save changes
When I call "Products" on the service
And I order by: "Name"
- And I run the query
+ And I run the query within a cassette named "batch_request_deletes"
Then the result should be:
| Name |
| Product 1 |
View
57 features/cassettes/basic_auth_protected_resource.yml
@@ -0,0 +1,57 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: http://admin:passwd@win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '1270'
+ Content-Type:
+ - application/atom+xml;type=entry;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=zpifmralioi4qiwd0lg0uqcq; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Sat, 11 Aug 2012 21:36:29 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)</id><category
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
+ /><title /><updated>2012-08-11T21:36:30Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Auth
+ Test Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
+ m:type="Edm.DateTime">2012-08-11T21:36:30.453</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-11T21:36:30.453</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
+ http_version: !!null
+ recorded_at: Sat, 11 Aug 2012 21:36:30 GMT
+recorded_with: VCR 2.2.4
View
69 features/cassettes/batch_request_additions.yml
@@ -0,0 +1,69 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products?$orderby=Name
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '2706'
+ Content-Type:
+ - application/atom+xml;type=feed;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=f4m0q12lgd4twvpgowaich4j; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:14 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products</id><title
+ type="text">Products</title><updated>2012-08-07T21:43:15Z</updated><link rel="self"
+ title="Products" href="Products" /><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Product
+ 1</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:14.983</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:14.983</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(2)/Category"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">2</d:Id><d:Name>Product
+ 2</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">25.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">2</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:14.983</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:14.983</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry></feed>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:14 GMT
+recorded_with: VCR 2.2.4
View
69 features/cassettes/batch_request_deletes.yml
@@ -0,0 +1,69 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products?$orderby=Name
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '2702'
+ Content-Type:
+ - application/atom+xml;type=feed;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=qafny5qbazxvbtg3q0znew3e; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:15 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products</id><title
+ type="text">Products</title><updated>2012-08-07T21:43:16Z</updated><link rel="self"
+ title="Products" href="Products" /><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
+ /><title /><updated>2012-08-07T21:43:16Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Product
+ 1</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:16.11</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:16.11</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(4)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(4)/Category"
+ /><title /><updated>2012-08-07T21:43:16Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>Product
+ 4</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">75.50</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">4</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:16.11</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:16.11</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry></feed>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:16 GMT
+recorded_with: VCR 2.2.4
View
69 features/cassettes/batch_request_updates.yml
@@ -0,0 +1,69 @@
+---
+http_interactions:
+- request:
+ method: get
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products?$orderby=Name
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '2728'
+ Content-Type:
+ - application/atom+xml;type=feed;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=xbi0rweg5uqzhtmxau31f0my; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:15 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products</id><title
+ type="text">Products</title><updated>2012-08-07T21:43:15Z</updated><link rel="self"
+ title="Products" href="Products" /><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Product
+ 1 - Updated</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">100.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:15.453</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:15.453</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry><entry><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(2)/Category"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">2</d:Id><d:Name>Product
+ 2 - Updated</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">100.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">2</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:43:15.453</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:43:15.453</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry></feed>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:15 GMT
+recorded_with: VCR 2.2.4
View
46 features/cassettes/clean_database_for_testing.yml
@@ -0,0 +1,46 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/CleanDatabaseForTesting
+ body:
+ encoding: ASCII-8BIT
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Length:
+ - '0'
+ Content-Type:
+ - application/x-www-form-urlencoded
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 204
+ message: No Content
+ headers:
+ Cache-Control:
+ - no-cache
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=o4ege2gplbuvzbgrt4ij0bku; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:47:39 GMT
+ body:
+ encoding: US-ASCII
+ string: ''
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:47:40 GMT
+recorded_with: VCR 2.2.4
View
297 features/cassettes/cucumber_tags/basic_auth.yml
@@ -0,0 +1,297 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: http://admin:passwd@win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories
+ body:
+ encoding: ASCII-8BIT
+ string: ! '{"Name":"Auth Test Category","AuditFields":{"CreatedBy":"Machinist"}}'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '69'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 201
+ message: Created
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '1278'
+ Content-Type:
+ - application/atom+xml;type=entry;charset=utf-8
+ Location:
+ - http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=b5h3vo0kbga5mdcgu2nfisos; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:21:24 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)</id><category
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
+ /><title /><updated>2012-08-07T21:21:25Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Auth
+ Test Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
+ m:type="Edm.DateTime">2012-08-07T21:21:25.296875Z</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:21:25.296875Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:21:25 GMT
+- request:
+ method: get
+ uri: http://admin:passwd@win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '1270'
+ Content-Type:
+ - application/atom+xml;type=entry;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=vqh02cwip2bvnmgt4smeb5ok; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:21:24 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/Categories(1)</id><category
+ term="RubyODataService.Category" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Category" href="Categories(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products"
+ type="application/atom+xml;type=feed" title="Products" href="Categories(1)/Products"
+ /><title /><updated>2012-08-07T21:21:25Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Auth
+ Test Category</d:Name><d:AuditFields m:type="RubyODataService.AuditFields"><d:CreateDate
+ m:type="Edm.DateTime">2012-08-07T21:21:25.297</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:21:25.297</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:21:25 GMT
+- request:
+ method: get
+ uri: http://admin:bad_pwd@win7dev:8989/SampleService/BasicAuth/RubyOData.svc/$metadata
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 401
+ message: Unauthorized
+ headers:
+ Content-Type:
+ - text/html
+ Server:
+ - Microsoft-IIS/7.5
+ Www-Authenticate:
+ - Basic
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:21:24 GMT
+ Content-Length:
+ - '1218'
+ body:
+ encoding: US-ASCII
+ string: ! "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html
+ xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>401 - Unauthorized:
+ Access is denied due to invalid credentials.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana,
+ Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px
+ 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;}
+ \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0
+ 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0
+ 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div
+ id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div
+ class=\"content-container\"><fieldset>\r\n <h2>401 - Unauthorized: Access
+ is denied due to invalid credentials.</h2>\r\n <h3>You do not have permission
+ to view this directory or page using the credentials that you supplied.</h3>\r\n
+ </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:21:25 GMT
+- request:
+ method: get
+ uri: http://admin:passwd@win7dev:8989/SampleService/BasicAuth/RubyOData.svc/$metadata
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 200
+ message: OK
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '4055'
+ Content-Type:
+ - application/xml;charset=utf-8
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=qdj1en0bcagvrdhule4xjvxg; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:21:24 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices
+ m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema
+ Namespace="RubyODataService" xmlns="http://schemas.microsoft.com/ado/2008/09/edm"><EntityType
+ Name="Product"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32"
+ Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
+ /><Property Name="Name" Type="Edm.String" MaxLength="4000" FixedLength="false"
+ Unicode="true" /><Property Name="Description" Type="Edm.String" MaxLength="4000"
+ FixedLength="false" Unicode="true" /><Property Name="Price" Type="Edm.Decimal"
+ Nullable="false" Precision="18" Scale="2" /><Property Name="DiscontinuedDate"
+ Type="Edm.DateTime" /><Property Name="CategoryId" Type="Edm.Int32" Nullable="false"
+ /><Property Name="AuditFields" Type="RubyODataService.AuditFields" Nullable="false"
+ /><NavigationProperty Name="Category" Relationship="RubyODataService.Category_Products"
+ ToRole="Category_Products_Source" FromRole="Category_Products_Target" /></EntityType><ComplexType
+ Name="AuditFields"><Property Name="CreateDate" Type="Edm.DateTime" Nullable="false"
+ /><Property Name="ModifiedDate" Type="Edm.DateTime" Nullable="false" /><Property
+ Name="CreatedBy" Type="Edm.String" MaxLength="4000" FixedLength="false" Unicode="true"
+ /></ComplexType><EntityType Name="Category"><Key><PropertyRef Name="Id" /></Key><Property
+ Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
+ xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property
+ Name="Name" Type="Edm.String" MaxLength="4000" FixedLength="false" Unicode="true"
+ /><Property Name="AuditFields" Type="RubyODataService.AuditFields" Nullable="false"
+ /><NavigationProperty Name="Products" Relationship="RubyODataService.Category_Products"
+ ToRole="Category_Products_Target" FromRole="Category_Products_Source" /></EntityType><EntityType
+ Name="EdmMetadata"><Key><PropertyRef Name="Id" /></Key><Property Name="Id"
+ Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
+ /><Property Name="ModelHash" Type="Edm.String" MaxLength="4000" FixedLength="false"
+ Unicode="true" /></EntityType><Association Name="Category_Products"><End Type="RubyODataService.Product"
+ Role="Category_Products_Target" Multiplicity="*" /><End Type="RubyODataService.Category"
+ Role="Category_Products_Source" Multiplicity="1"><OnDelete Action="Cascade"
+ /></End><ReferentialConstraint><Principal Role="Category_Products_Source"><PropertyRef
+ Name="Id" /></Principal><Dependent Role="Category_Products_Target"><PropertyRef
+ Name="CategoryId" /></Dependent></ReferentialConstraint></Association><EntityContainer
+ Name="RubyODataContext" m:IsDefaultEntityContainer="true"><EntitySet Name="Products"
+ EntityType="RubyODataService.Product" /><EntitySet Name="Categories" EntityType="RubyODataService.Category"
+ /><EntitySet Name="EdmMetadatas" EntityType="RubyODataService.EdmMetadata"
+ /><AssociationSet Name="Category_Products" Association="RubyODataService.Category_Products"><End
+ Role="Category_Products_Target" EntitySet="Products" /><End Role="Category_Products_Source"
+ EntitySet="Categories" /></AssociationSet><FunctionImport Name="CleanDatabaseForTesting"
+ m:HttpMethod="POST" /><FunctionImport Name="EntityCategoryWebGet" ReturnType="Collection(RubyODataService.Category)"
+ EntitySet="Categories" m:HttpMethod="GET" /><FunctionImport Name="CategoryNames"
+ ReturnType="Collection(Edm.String)" m:HttpMethod="GET" /><FunctionImport Name="FirstCategoryId"
+ ReturnType="Edm.Int32" m:HttpMethod="GET" /><FunctionImport Name="EntitySingleCategoryWebGet"
+ ReturnType="RubyODataService.Category" EntitySet="Categories" m:HttpMethod="GET"><Parameter
+ Name="id" Type="Edm.Int32" /></FunctionImport></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:21:25 GMT
+- request:
+ method: get
+ uri: http://win7dev:8989/SampleService/BasicAuth/RubyOData.svc/$metadata
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 401
+ message: Unauthorized
+ headers:
+ Content-Type:
+ - text/html
+ Server:
+ - Microsoft-IIS/7.5
+ Www-Authenticate:
+ - Basic
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:21:24 GMT
+ Content-Length:
+ - '1218'
+ body:
+ encoding: US-ASCII
+ string: ! "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html
+ xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>401 - Unauthorized:
+ Access is denied due to invalid credentials.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana,
+ Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px
+ 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;}
+ \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0
+ 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0
+ 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div
+ id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div
+ class=\"content-container\"><fieldset>\r\n <h2>401 - Unauthorized: Access
+ is denied due to invalid credentials.</h2>\r\n <h3>You do not have permission
+ to view this directory or page using the credentials that you supplied.</h3>\r\n
+ </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:21:25 GMT
+recorded_with: VCR 2.2.4
View
1,459 features/cassettes/cucumber_tags/batch_request.yml
@@ -0,0 +1,1459 @@
+---
+http_interactions:
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_wrza-bjm5-truu
+
+ Content-Type: multipart/mixed;boundary=changeset_oe8a-51ec-8853
+
+
+ --changeset_oe8a-51ec-8853
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ DELETE http://win7dev:8989/SampleService/RubyOData.svc/Products(2) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+
+
+ --changeset_oe8a-51ec-8853
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ DELETE http://win7dev:8989/SampleService/RubyOData.svc/Products(3) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+
+
+
+
+ --changeset_oe8a-51ec-8853--
+
+ --batch_wrza-bjm5-truu--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_wrza-bjm5-truu
+ Content-Length:
+ - '529'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '748'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_e0aea672-4b22-4da9-a589-1d64bf392d6a
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=csvfe1gmgawhmrnockgo2iai; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:41:54 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_e0aea672-4b22-4da9-a589-1d64bf392d6a\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_5c9a708a-ddc5-480a-a8bd-48c3ab8da54c\r\n\r\n--changesetresponse_5c9a708a-ddc5-480a-a8bd-48c3ab8da54c\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_5c9a708a-ddc5-480a-a8bd-48c3ab8da54c\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_5c9a708a-ddc5-480a-a8bd-48c3ab8da54c--\r\n--batchresponse_e0aea672-4b22-4da9-a589-1d64bf392d6a--\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:41:54 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
+ body:
+ encoding: ASCII-8BIT
+ string: ! '{"Name":"Product 2","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
+ 0010","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - application/json
+ Content-Length:
+ - '180'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 201
+ message: Created
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '1436'
+ Content-Type:
+ - application/atom+xml;type=entry;charset=utf-8
+ Location:
+ - http://win7dev:8989/SampleService/RubyOData.svc/Products(2)
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=iufirzwsimdkjtcuez2ipifn; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:41:54 GMT
+ body:
+ encoding: US-ASCII
+ string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
+ xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
+ /><link rel="edit" title="Product" href="Products(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
+ type="application/atom+xml;type=entry" title="Category" href="Products(2)/Category"
+ /><title /><updated>2012-08-07T21:41:54Z</updated><author><name /></author><content
+ type="application/xml"><m:properties><d:Id m:type="Edm.Int32">2</d:Id><d:Name>Product
+ 2</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
+ m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">2</d:CategoryId><d:AuditFields
+ m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:41:54.953125Z</d:CreateDate><d:ModifiedDate
+ m:type="Edm.DateTime">2012-08-07T21:41:54.953125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:41:54 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_3okz-2mtj-qkjy
+
+ Content-Type: multipart/mixed;boundary=changeset_ffs2-0y82-ap0e
+
+
+ --changeset_ffs2-0y82-ap0e
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 3","Description":"Test Widget","Price":"25.00","Category":{"Name":"Category
+ 0011","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_ffs2-0y82-ap0e
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 4","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
+ 0012","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_ffs2-0y82-ap0e
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ PUT http://win7dev:8989/SampleService/RubyOData.svc/Products(1) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 1 - Updated","Description":"Test Widget","Price":"75.5","AuditFields":{"CreatedBy":"Machinist","CreateDate":"2012-08-07T21:41:54.657","ModifiedDate":"2012-08-07T21:41:54.657"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(1)"},"Id":1,"DiscontinuedDate":null,"CategoryId":1}
+
+ --changeset_ffs2-0y82-ap0e
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ DELETE http://win7dev:8989/SampleService/RubyOData.svc/Products(2) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+
+
+
+
+ --changeset_ffs2-0y82-ap0e--
+
+ --batch_3okz-2mtj-qkjy--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_3okz-2mtj-qkjy
+ Content-Length:
+ - '1719'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '4350'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_50333c91-0a4f-42c5-9890-fb1a7d529723
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=uixf0em1pxmgxzyw0j3qmb4e; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:41:54 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_50333c91-0a4f-42c5-9890-fb1a7d529723\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5\r\n\r\n--changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(3)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(3)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(3)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(3)/Category\"
+ /><title /><updated>2012-08-07T21:41:55Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">3</d:Id><d:Name>Product
+ 3</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">25.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">3</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:41:55.0625Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:41:55.0625Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(4)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(4)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(4)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(4)/Category\"
+ /><title /><updated>2012-08-07T21:41:55Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">4</d:Id><d:Name>Product
+ 4</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">50.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">4</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:41:55.0625Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:41:55.0625Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_37ac540f-9af8-457d-94fd-04be49f141b5--\r\n--batchresponse_50333c91-0a4f-42c5-9890-fb1a7d529723--\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:41:54 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_48oh-g969-yxqy
+
+ Content-Type: multipart/mixed;boundary=changeset_kjgs-xssh-rjpp
+
+
+ --changeset_kjgs-xssh-rjpp
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 1","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
+ 0001","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_kjgs-xssh-rjpp
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 2","Description":"Test Widget","Price":"25.00","Category":{"Name":"Category
+ 0002","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+
+
+ --changeset_kjgs-xssh-rjpp--
+
+ --batch_48oh-g969-yxqy--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_48oh-g969-yxqy
+ Content-Length:
+ - '969'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '3878'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_127734df-0d45-48a2-bb5d-aef7a738c28e
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=sxgxpcqlok2m1xbq2wb1mfe2; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:14 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_127734df-0d45-48a2-bb5d-aef7a738c28e\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_217833d8-def6-4659-bd89-9606566ee605\r\n\r\n--changesetresponse_217833d8-def6-4659-bd89-9606566ee605\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(1)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(1)/Category\"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">1</d:Id><d:Name>Product
+ 1</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">50.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">1</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:43:14.984375Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:43:14.984375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_217833d8-def6-4659-bd89-9606566ee605\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(2)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(2)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(2)/Category\"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">2</d:Id><d:Name>Product
+ 2</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">25.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">2</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:43:14.984375Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:43:14.984375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_217833d8-def6-4659-bd89-9606566ee605--\r\n--batchresponse_127734df-0d45-48a2-bb5d-aef7a738c28e--\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:14 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_8vhp-dtx1-hjrw
+
+ Content-Type: multipart/mixed;boundary=changeset_yvjs-14q8-nb5k
+
+
+ --changeset_yvjs-14q8-nb5k
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 1","Description":"Test Widget","Price":"100.00","Category":{"Name":"Category
+ 0003","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_yvjs-14q8-nb5k
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 2","Description":"Test Widget","Price":"100.00","Category":{"Name":"Category
+ 0004","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+
+
+ --changeset_yvjs-14q8-nb5k--
+
+ --batch_8vhp-dtx1-hjrw--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_8vhp-dtx1-hjrw
+ Content-Length:
+ - '971'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '3880'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_0f25ae1c-f035-4668-a98e-e26ca6d59926
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=5smpy2dfpc11sis2rr2xsqbv; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:14 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_0f25ae1c-f035-4668-a98e-e26ca6d59926\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_e732252b-9ef0-4354-96a6-bf6f2f41b049\r\n\r\n--changesetresponse_e732252b-9ef0-4354-96a6-bf6f2f41b049\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(1)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(1)/Category\"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">1</d:Id><d:Name>Product
+ 1</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">100.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">1</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:43:15.453125Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:43:15.453125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_e732252b-9ef0-4354-96a6-bf6f2f41b049\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(2)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(2)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(2)/Category\"
+ /><title /><updated>2012-08-07T21:43:15Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">2</d:Id><d:Name>Product
+ 2</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">100.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">2</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:43:15.453125Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:43:15.453125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_e732252b-9ef0-4354-96a6-bf6f2f41b049--\r\n--batchresponse_0f25ae1c-f035-4668-a98e-e26ca6d59926--\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:15 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_9uz7-6w6j-u096
+
+ Content-Type: multipart/mixed;boundary=changeset_n78u-fr40-zs2r
+
+
+ --changeset_n78u-fr40-zs2r
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ PUT http://win7dev:8989/SampleService/RubyOData.svc/Products(1) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 1 - Updated","Description":"Test Widget","Price":"100.0","AuditFields":{"CreatedBy":"Machinist","CreateDate":"2012-08-07T21:43:15.453","ModifiedDate":"2012-08-07T21:43:15.453"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(1)"},"Id":1,"DiscontinuedDate":null,"CategoryId":1}
+
+ --changeset_n78u-fr40-zs2r
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ PUT http://win7dev:8989/SampleService/RubyOData.svc/Products(2) HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 2 - Updated","Description":"Test Widget","Price":"100.0","AuditFields":{"CreatedBy":"Machinist","CreateDate":"2012-08-07T21:43:15.453","ModifiedDate":"2012-08-07T21:43:15.453"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(2)"},"Id":2,"DiscontinuedDate":null,"CategoryId":2}
+
+
+
+ --changeset_n78u-fr40-zs2r--
+
+ --batch_9uz7-6w6j-u096--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_9uz7-6w6j-u096
+ Content-Length:
+ - '1259'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '748'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_a882e427-ac6a-433c-b4c9-ec2f4a7e69bb
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=13klfcxbx3mb3dvnsxncgid2; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:15 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_a882e427-ac6a-433c-b4c9-ec2f4a7e69bb\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_02ab7f4e-8ca2-4071-9f2f-bc39585acaf6\r\n\r\n--changesetresponse_02ab7f4e-8ca2-4071-9f2f-bc39585acaf6\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_02ab7f4e-8ca2-4071-9f2f-bc39585acaf6\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204
+ No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion:
+ 1.0;\r\n\r\n\r\n--changesetresponse_02ab7f4e-8ca2-4071-9f2f-bc39585acaf6--\r\n--batchresponse_a882e427-ac6a-433c-b4c9-ec2f4a7e69bb--\r\n"
+ http_version: !!null
+ recorded_at: Tue, 07 Aug 2012 21:43:15 GMT
+- request:
+ method: post
+ uri: http://win7dev:8989/SampleService/RubyOData.svc/$batch
+ body:
+ encoding: ASCII-8BIT
+ string: ! '--batch_27vi-97pd-gwk9
+
+ Content-Type: multipart/mixed;boundary=changeset_kt35-2kvq-6fh9
+
+
+ --changeset_kt35-2kvq-6fh9
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 1","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
+ 0005","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_kt35-2kvq-6fh9
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 2","Description":"Test Widget","Price":"100.00","Category":{"Name":"Category
+ 0006","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_kt35-2kvq-6fh9
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 3","Description":"Test Widget","Price":"75.50","Category":{"Name":"Category
+ 0007","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+ --changeset_kt35-2kvq-6fh9
+
+ Content-Type: application/http
+
+ Content-Transfer-Encoding: binary
+
+
+ POST http://win7dev:8989/SampleService/RubyOData.svc/Products HTTP/1.1
+
+ Accept-Charset: utf-8
+
+ Content-Type: application/json;charset=utf-8
+
+
+ {"Name":"Product 4","Description":"Test Widget","Price":"75.50","Category":{"Name":"Category
+ 0008","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}
+
+
+
+ --changeset_kt35-2kvq-6fh9--
+
+ --batch_27vi-97pd-gwk9--'
+ headers:
+ Accept:
+ - ! '*/*; q=0.5, application/xml'
+ Accept-Encoding:
+ - gzip, deflate
+ Content-Type:
+ - multipart/mixed; boundary=batch_27vi-97pd-gwk9
+ Content-Length:
+ - '1796'
+ User-Agent:
+ - Ruby
+ response:
+ status:
+ code: 202
+ message: Accepted
+ headers:
+ Cache-Control:
+ - no-cache
+ Content-Length:
+ - '7489'
+ Content-Type:
+ - multipart/mixed; boundary=batchresponse_9d2ef03d-c017-4095-a2c5-afde0d84ac3d
+ Server:
+ - Microsoft-IIS/7.5
+ Set-Cookie:
+ - ASP.NET_SessionId=mhideuzzwkhbcr2vmrj3thmn; path=/; HttpOnly
+ X-Content-Type-Options:
+ - nosniff
+ Dataserviceversion:
+ - 1.0;
+ X-Aspnet-Version:
+ - 4.0.30319
+ X-Powered-By:
+ - ASP.NET
+ Date:
+ - Tue, 07 Aug 2012 21:43:15 GMT
+ body:
+ encoding: US-ASCII
+ string: ! "--batchresponse_9d2ef03d-c017-4095-a2c5-afde0d84ac3d\r\nContent-Type:
+ multipart/mixed; boundary=changesetresponse_dd4b9425-5e1d-424a-8076-7b35380f059d\r\n\r\n--changesetresponse_dd4b9425-5e1d-424a-8076-7b35380f059d\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(1)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(1)/Category\"
+ /><title /><updated>2012-08-07T21:43:16Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">1</d:Id><d:Name>Product
+ 1</d:Name><d:Description>Test Widget</d:Description><d:Price m:type=\"Edm.Decimal\">50.00</d:Price><d:DiscontinuedDate
+ m:type=\"Edm.DateTime\" m:null=\"true\" /><d:CategoryId m:type=\"Edm.Int32\">1</d:CategoryId><d:AuditFields
+ m:type=\"RubyODataService.AuditFields\"><d:CreateDate m:type=\"Edm.DateTime\">2012-08-07T21:43:16.109375Z</d:CreateDate><d:ModifiedDate
+ m:type=\"Edm.DateTime\">2012-08-07T21:43:16.109375Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>\r\n--changesetresponse_dd4b9425-5e1d-424a-8076-7b35380f059d\r\nContent-Type:
+ application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 201
+ Created\r\nDataServiceVersion: 1.0;\r\nContent-Type: application/atom+xml;type=entry;charset=utf-8\r\nX-Content-Type-Options:
+ nosniff\r\nCache-Control: no-cache\r\nLocation: http://win7dev:8989/SampleService/RubyOData.svc/Products(2)\r\n\r\n<?xml
+ version=\"1.0\" encoding=\"utf-8\"?><entry xml:base=\"http://win7dev:8989/SampleService/RubyOData.svc/\"
+ xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\"
+ xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"
+ xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(2)</id><category
+ term=\"RubyODataService.Product\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\"
+ /><link rel=\"edit\" title=\"Product\" href=\"Products(2)\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category\"
+ type=\"application/atom+xml;type=entry\" title=\"Category\" href=\"Products(2)/Category\"
+ /><title /><updated>2012-08-07T21:43:16Z</updated><author><name /></author><content
+ type=\"application/xml\"><m:properties><d:Id m:type=\"Edm.Int32\">2</d:Id><d:Name>Product
+