ruby_odata 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -2
- data/.travis.yml +2 -1
- data/.yardopts +6 -0
- data/CHANGELOG.md +102 -0
- data/Guardfile +14 -0
- data/README.md +285 -0
- data/Rakefile +0 -7
- data/features/basic_auth.feature +3 -2
- data/features/batch_request.feature +7 -6
- data/features/cassettes/basic_auth_protected_resource.yml +57 -0
- data/features/cassettes/batch_request_additions.yml +69 -0
- data/features/cassettes/batch_request_deletes.yml +69 -0
- data/features/cassettes/batch_request_updates.yml +69 -0
- data/features/cassettes/clean_database_for_testing.yml +46 -0
- data/features/cassettes/cucumber_tags/basic_auth.yml +297 -0
- data/features/cassettes/cucumber_tags/batch_request.yml +1459 -0
- data/features/cassettes/cucumber_tags/complex_types.yml +326 -0
- data/features/cassettes/cucumber_tags/error_handling.yml +64 -0
- data/features/cassettes/cucumber_tags/query_builder.yml +2025 -0
- data/features/cassettes/cucumber_tags/service.yml +234 -0
- data/features/cassettes/cucumber_tags/service_manage.yml +937 -0
- data/features/cassettes/cucumber_tags/service_methods.yml +647 -0
- data/features/cassettes/cucumber_tags/ssl.yml +203 -0
- data/features/cassettes/cucumber_tags/type_conversion.yml +337 -0
- data/features/cassettes/service_manage_additions.yml +65 -0
- data/features/cassettes/service_manage_deletions.yml +58 -0
- data/features/cassettes/service_manage_deletions_2.yml +58 -0
- data/features/cassettes/unsecured_metadata.yml +89 -0
- data/features/complex_types.feature +4 -3
- data/features/error_handling.feature +14 -0
- data/features/query_builder.feature +30 -9
- data/features/service.feature +4 -3
- data/features/service_manage.feature +6 -5
- data/features/service_methods.feature +3 -2
- data/features/ssl.feature +8 -8
- data/features/step_definitions/service_steps.rb +38 -24
- data/features/support/env.rb +1 -3
- data/features/support/hooks.rb +3 -2
- data/features/support/pickle.rb +29 -18
- data/features/support/vcr.rb +24 -0
- data/features/type_conversion.feature +16 -17
- data/lib/ruby_odata/association.rb +7 -6
- data/lib/ruby_odata/class_builder.rb +6 -7
- data/lib/ruby_odata/exceptions.rb +4 -0
- data/lib/ruby_odata/helpers.rb +11 -0
- data/lib/ruby_odata/operation.rb +5 -6
- data/lib/ruby_odata/property_metadata.rb +4 -5
- data/lib/ruby_odata/query_builder.rb +98 -63
- data/lib/ruby_odata/service.rb +118 -103
- data/lib/ruby_odata/version.rb +3 -1
- data/lib/ruby_odata.rb +20 -18
- data/ruby_odata.gemspec +16 -12
- data/spec/query_builder_spec.rb +78 -14
- data/spec/service_spec.rb +83 -83
- data/spec/support/sample_service_matcher.rb +15 -0
- data/test/RubyODataService/RubyODataService/App_Data/.gitkeep +0 -0
- data/test/blueprints.rb +15 -9
- data/test/usage_samples/querying.rb +5 -1
- data/test/usage_samples/sample_data.rb +1 -3
- metadata +213 -39
- data/CHANGELOG.rdoc +0 -88
- data/README.rdoc +0 -259
@@ -0,0 +1,326 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
6
|
+
body:
|
7
|
+
encoding: ASCII-8BIT
|
8
|
+
string: ! '{"Name":"Widget 0016","Description":"Test Widget","Price":"75.5","AuditFields":{"CreatedBy":"This
|
9
|
+
Test","CreateDate":"2012-08-07T20:02:58.983","ModifiedDate":"2012-08-07T20:02:58.983"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(1)"},"Id":1,"DiscontinuedDate":null,"CategoryId":1}'
|
10
|
+
headers:
|
11
|
+
Accept:
|
12
|
+
- ! '*/*; q=0.5, application/xml'
|
13
|
+
Accept-Encoding:
|
14
|
+
- gzip, deflate
|
15
|
+
Content-Type:
|
16
|
+
- application/json
|
17
|
+
Content-Length:
|
18
|
+
- '314'
|
19
|
+
User-Agent:
|
20
|
+
- Ruby
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 204
|
24
|
+
message: No Content
|
25
|
+
headers:
|
26
|
+
Cache-Control:
|
27
|
+
- no-cache
|
28
|
+
Server:
|
29
|
+
- Microsoft-IIS/7.5
|
30
|
+
Set-Cookie:
|
31
|
+
- ASP.NET_SessionId=msq4rvz1zd3a0mxrxxka1es1; path=/; HttpOnly
|
32
|
+
X-Content-Type-Options:
|
33
|
+
- nosniff
|
34
|
+
Dataserviceversion:
|
35
|
+
- 1.0;
|
36
|
+
X-Aspnet-Version:
|
37
|
+
- 4.0.30319
|
38
|
+
X-Powered-By:
|
39
|
+
- ASP.NET
|
40
|
+
Date:
|
41
|
+
- Tue, 07 Aug 2012 20:02:59 GMT
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ''
|
45
|
+
http_version: !!null
|
46
|
+
recorded_at: Tue, 07 Aug 2012 20:03:00 GMT
|
47
|
+
- request:
|
48
|
+
method: post
|
49
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
|
50
|
+
body:
|
51
|
+
encoding: ASCII-8BIT
|
52
|
+
string: ! '{"Name":"Widget 0015","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
|
53
|
+
0016","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
|
54
|
+
headers:
|
55
|
+
Accept:
|
56
|
+
- ! '*/*; q=0.5, application/xml'
|
57
|
+
Accept-Encoding:
|
58
|
+
- gzip, deflate
|
59
|
+
Content-Type:
|
60
|
+
- application/json
|
61
|
+
Content-Length:
|
62
|
+
- '182'
|
63
|
+
User-Agent:
|
64
|
+
- Ruby
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 201
|
68
|
+
message: Created
|
69
|
+
headers:
|
70
|
+
Cache-Control:
|
71
|
+
- no-cache
|
72
|
+
Content-Length:
|
73
|
+
- '1438'
|
74
|
+
Content-Type:
|
75
|
+
- application/atom+xml;type=entry;charset=utf-8
|
76
|
+
Location:
|
77
|
+
- http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
78
|
+
Server:
|
79
|
+
- Microsoft-IIS/7.5
|
80
|
+
Set-Cookie:
|
81
|
+
- ASP.NET_SessionId=hhsyabbmbtx03fr133q13szz; path=/; HttpOnly
|
82
|
+
X-Content-Type-Options:
|
83
|
+
- nosniff
|
84
|
+
Dataserviceversion:
|
85
|
+
- 1.0;
|
86
|
+
X-Aspnet-Version:
|
87
|
+
- 4.0.30319
|
88
|
+
X-Powered-By:
|
89
|
+
- ASP.NET
|
90
|
+
Date:
|
91
|
+
- Tue, 07 Aug 2012 21:21:29 GMT
|
92
|
+
body:
|
93
|
+
encoding: US-ASCII
|
94
|
+
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
95
|
+
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
96
|
+
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
97
|
+
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
98
|
+
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
99
|
+
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
100
|
+
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
101
|
+
/><title /><updated>2012-08-07T21:21:29Z</updated><author><name /></author><content
|
102
|
+
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
103
|
+
0015</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
|
104
|
+
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
105
|
+
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:29.703125Z</d:CreateDate><d:ModifiedDate
|
106
|
+
m:type="Edm.DateTime">2012-08-07T21:21:29.703125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
107
|
+
http_version: !!null
|
108
|
+
recorded_at: Tue, 07 Aug 2012 21:21:29 GMT
|
109
|
+
- request:
|
110
|
+
method: post
|
111
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
|
112
|
+
body:
|
113
|
+
encoding: ASCII-8BIT
|
114
|
+
string: ! '{"Name":"Widget 0016","Description":"Test Widget","Price":"50.00","Category":{"Name":"Category
|
115
|
+
0017","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
|
116
|
+
headers:
|
117
|
+
Accept:
|
118
|
+
- ! '*/*; q=0.5, application/xml'
|
119
|
+
Accept-Encoding:
|
120
|
+
- gzip, deflate
|
121
|
+
Content-Type:
|
122
|
+
- application/json
|
123
|
+
Content-Length:
|
124
|
+
- '182'
|
125
|
+
User-Agent:
|
126
|
+
- Ruby
|
127
|
+
response:
|
128
|
+
status:
|
129
|
+
code: 201
|
130
|
+
message: Created
|
131
|
+
headers:
|
132
|
+
Cache-Control:
|
133
|
+
- no-cache
|
134
|
+
Content-Length:
|
135
|
+
- '1438'
|
136
|
+
Content-Type:
|
137
|
+
- application/atom+xml;type=entry;charset=utf-8
|
138
|
+
Location:
|
139
|
+
- http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
140
|
+
Server:
|
141
|
+
- Microsoft-IIS/7.5
|
142
|
+
Set-Cookie:
|
143
|
+
- ASP.NET_SessionId=ffup2xitk1zqkpf1ac2zxl1g; path=/; HttpOnly
|
144
|
+
X-Content-Type-Options:
|
145
|
+
- nosniff
|
146
|
+
Dataserviceversion:
|
147
|
+
- 1.0;
|
148
|
+
X-Aspnet-Version:
|
149
|
+
- 4.0.30319
|
150
|
+
X-Powered-By:
|
151
|
+
- ASP.NET
|
152
|
+
Date:
|
153
|
+
- Tue, 07 Aug 2012 21:21:29 GMT
|
154
|
+
body:
|
155
|
+
encoding: US-ASCII
|
156
|
+
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
157
|
+
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
158
|
+
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
159
|
+
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
160
|
+
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
161
|
+
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
162
|
+
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
163
|
+
/><title /><updated>2012-08-07T21:21:30Z</updated><author><name /></author><content
|
164
|
+
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
165
|
+
0016</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
|
166
|
+
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
167
|
+
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:30.203125Z</d:CreateDate><d:ModifiedDate
|
168
|
+
m:type="Edm.DateTime">2012-08-07T21:21:30.203125Z</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
169
|
+
http_version: !!null
|
170
|
+
recorded_at: Tue, 07 Aug 2012 21:21:30 GMT
|
171
|
+
- request:
|
172
|
+
method: get
|
173
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
174
|
+
body:
|
175
|
+
encoding: US-ASCII
|
176
|
+
string: ''
|
177
|
+
headers:
|
178
|
+
Accept:
|
179
|
+
- ! '*/*; q=0.5, application/xml'
|
180
|
+
Accept-Encoding:
|
181
|
+
- gzip, deflate
|
182
|
+
User-Agent:
|
183
|
+
- Ruby
|
184
|
+
response:
|
185
|
+
status:
|
186
|
+
code: 200
|
187
|
+
message: OK
|
188
|
+
headers:
|
189
|
+
Cache-Control:
|
190
|
+
- no-cache
|
191
|
+
Content-Length:
|
192
|
+
- '1430'
|
193
|
+
Content-Type:
|
194
|
+
- application/atom+xml;type=entry;charset=utf-8
|
195
|
+
Server:
|
196
|
+
- Microsoft-IIS/7.5
|
197
|
+
Set-Cookie:
|
198
|
+
- ASP.NET_SessionId=q331g3vrlmziuoor4lgo3wii; path=/; HttpOnly
|
199
|
+
X-Content-Type-Options:
|
200
|
+
- nosniff
|
201
|
+
Dataserviceversion:
|
202
|
+
- 1.0;
|
203
|
+
X-Aspnet-Version:
|
204
|
+
- 4.0.30319
|
205
|
+
X-Powered-By:
|
206
|
+
- ASP.NET
|
207
|
+
Date:
|
208
|
+
- Tue, 07 Aug 2012 21:21:29 GMT
|
209
|
+
body:
|
210
|
+
encoding: US-ASCII
|
211
|
+
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
212
|
+
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
213
|
+
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
214
|
+
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
215
|
+
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
216
|
+
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
217
|
+
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
218
|
+
/><title /><updated>2012-08-07T21:21:30Z</updated><author><name /></author><content
|
219
|
+
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
220
|
+
0016</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
|
221
|
+
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
222
|
+
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:30.203</d:CreateDate><d:ModifiedDate
|
223
|
+
m:type="Edm.DateTime">2012-08-07T21:21:30.203</d:ModifiedDate><d:CreatedBy>Machinist</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
224
|
+
http_version: !!null
|
225
|
+
recorded_at: Tue, 07 Aug 2012 21:21:30 GMT
|
226
|
+
- request:
|
227
|
+
method: put
|
228
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
229
|
+
body:
|
230
|
+
encoding: ASCII-8BIT
|
231
|
+
string: ! '{"Name":"Widget 0016","Description":"Test Widget","Price":"50.0","AuditFields":{"CreatedBy":"This
|
232
|
+
Test","CreateDate":"2012-08-07T21:21:30.203","ModifiedDate":"2012-08-07T21:21:30.203"},"__metadata":{"uri":"http://win7dev:8989/SampleService/RubyOData.svc/Products(1)"},"Id":1,"DiscontinuedDate":null,"CategoryId":1}'
|
233
|
+
headers:
|
234
|
+
Accept:
|
235
|
+
- ! '*/*; q=0.5, application/xml'
|
236
|
+
Accept-Encoding:
|
237
|
+
- gzip, deflate
|
238
|
+
Content-Type:
|
239
|
+
- application/json
|
240
|
+
Content-Length:
|
241
|
+
- '314'
|
242
|
+
User-Agent:
|
243
|
+
- Ruby
|
244
|
+
response:
|
245
|
+
status:
|
246
|
+
code: 204
|
247
|
+
message: No Content
|
248
|
+
headers:
|
249
|
+
Cache-Control:
|
250
|
+
- no-cache
|
251
|
+
Server:
|
252
|
+
- Microsoft-IIS/7.5
|
253
|
+
Set-Cookie:
|
254
|
+
- ASP.NET_SessionId=xnc5st3ouic4cqvhtjuxknps; path=/; HttpOnly
|
255
|
+
X-Content-Type-Options:
|
256
|
+
- nosniff
|
257
|
+
Dataserviceversion:
|
258
|
+
- 1.0;
|
259
|
+
X-Aspnet-Version:
|
260
|
+
- 4.0.30319
|
261
|
+
X-Powered-By:
|
262
|
+
- ASP.NET
|
263
|
+
Date:
|
264
|
+
- Tue, 07 Aug 2012 21:21:30 GMT
|
265
|
+
body:
|
266
|
+
encoding: US-ASCII
|
267
|
+
string: ''
|
268
|
+
http_version: !!null
|
269
|
+
recorded_at: Tue, 07 Aug 2012 21:21:30 GMT
|
270
|
+
- request:
|
271
|
+
method: get
|
272
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products(1)
|
273
|
+
body:
|
274
|
+
encoding: US-ASCII
|
275
|
+
string: ''
|
276
|
+
headers:
|
277
|
+
Accept:
|
278
|
+
- ! '*/*; q=0.5, application/xml'
|
279
|
+
Accept-Encoding:
|
280
|
+
- gzip, deflate
|
281
|
+
User-Agent:
|
282
|
+
- Ruby
|
283
|
+
response:
|
284
|
+
status:
|
285
|
+
code: 200
|
286
|
+
message: OK
|
287
|
+
headers:
|
288
|
+
Cache-Control:
|
289
|
+
- no-cache
|
290
|
+
Content-Length:
|
291
|
+
- '1430'
|
292
|
+
Content-Type:
|
293
|
+
- application/atom+xml;type=entry;charset=utf-8
|
294
|
+
Server:
|
295
|
+
- Microsoft-IIS/7.5
|
296
|
+
Set-Cookie:
|
297
|
+
- ASP.NET_SessionId=3m0mzj44claxcnmtdr3yokrn; path=/; HttpOnly
|
298
|
+
X-Content-Type-Options:
|
299
|
+
- nosniff
|
300
|
+
Dataserviceversion:
|
301
|
+
- 1.0;
|
302
|
+
X-Aspnet-Version:
|
303
|
+
- 4.0.30319
|
304
|
+
X-Powered-By:
|
305
|
+
- ASP.NET
|
306
|
+
Date:
|
307
|
+
- Tue, 07 Aug 2012 21:21:30 GMT
|
308
|
+
body:
|
309
|
+
encoding: US-ASCII
|
310
|
+
string: <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://win7dev:8989/SampleService/RubyOData.svc/"
|
311
|
+
xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
|
312
|
+
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
|
313
|
+
xmlns:gml="http://www.opengis.net/gml"><id>http://win7dev:8989/SampleService/RubyOData.svc/Products(1)</id><category
|
314
|
+
term="RubyODataService.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
|
315
|
+
/><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Category"
|
316
|
+
type="application/atom+xml;type=entry" title="Category" href="Products(1)/Category"
|
317
|
+
/><title /><updated>2012-08-07T21:21:30Z</updated><author><name /></author><content
|
318
|
+
type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>Widget
|
319
|
+
0016</d:Name><d:Description>Test Widget</d:Description><d:Price m:type="Edm.Decimal">50.00</d:Price><d:DiscontinuedDate
|
320
|
+
m:type="Edm.DateTime" m:null="true" /><d:CategoryId m:type="Edm.Int32">1</d:CategoryId><d:AuditFields
|
321
|
+
m:type="RubyODataService.AuditFields"><d:CreateDate m:type="Edm.DateTime">2012-08-07T21:21:30.203</d:CreateDate><d:ModifiedDate
|
322
|
+
m:type="Edm.DateTime">2012-08-07T21:21:30.203</d:ModifiedDate><d:CreatedBy>This
|
323
|
+
Test</d:CreatedBy></d:AuditFields></m:properties></content></entry>
|
324
|
+
http_version: !!null
|
325
|
+
recorded_at: Tue, 07 Aug 2012 21:21:30 GMT
|
326
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://win7dev:8989/SampleService/RubyOData.svc/Products
|
6
|
+
body:
|
7
|
+
encoding: ASCII-8BIT
|
8
|
+
string: ! '{"Name":"Widget 0017","Description":"Test Widget","Price":"","Category":{"Name":"Category
|
9
|
+
0018","AuditFields":{"CreatedBy":"Machinist"}},"AuditFields":{"CreatedBy":"Machinist"}}'
|
10
|
+
headers:
|
11
|
+
Accept:
|
12
|
+
- ! '*/*; q=0.5, application/xml'
|
13
|
+
Accept-Encoding:
|
14
|
+
- gzip, deflate
|
15
|
+
Content-Type:
|
16
|
+
- application/json
|
17
|
+
Content-Length:
|
18
|
+
- '177'
|
19
|
+
User-Agent:
|
20
|
+
- Ruby
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 400
|
24
|
+
message: Bad Request
|
25
|
+
headers:
|
26
|
+
Cache-Control:
|
27
|
+
- private
|
28
|
+
Content-Length:
|
29
|
+
- '1210'
|
30
|
+
Content-Type:
|
31
|
+
- application/xml
|
32
|
+
Server:
|
33
|
+
- Microsoft-IIS/7.5
|
34
|
+
Set-Cookie:
|
35
|
+
- ASP.NET_SessionId=kw41qeekwnltvdgzfqkfsptr; path=/; HttpOnly
|
36
|
+
X-Content-Type-Options:
|
37
|
+
- nosniff
|
38
|
+
Dataserviceversion:
|
39
|
+
- 1.0;
|
40
|
+
X-Aspnet-Version:
|
41
|
+
- 4.0.30319
|
42
|
+
X-Powered-By:
|
43
|
+
- ASP.NET
|
44
|
+
Date:
|
45
|
+
- Tue, 07 Aug 2012 21:21:30 GMT
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: ! "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><error
|
49
|
+
xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><code></code><message
|
50
|
+
xml:lang=\"en-US\">Error processing request stream. Error encountered in converting
|
51
|
+
the value from request payload for property 'Price' to type 'Decimal', which
|
52
|
+
is the property's expected type. See inner exception for more detail.</message><innererror><message>Input
|
53
|
+
string was not in a correct format.</message><type>System.FormatException</type><stacktrace>
|
54
|
+
\ at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&
|
55
|
+
number, NumberFormatInfo info, Boolean parseDecimal)
\n at System.Number.ParseDecimal(String
|
56
|
+
value, NumberStyles options, NumberFormatInfo numfmt)
\n at System.Convert.ToDecimal(String
|
57
|
+
value, IFormatProvider provider)
\n at System.String.System.IConvertible.ToDecimal(IFormatProvider
|
58
|
+
provider)
\n at System.Convert.ChangeType(Object value, Type conversionType,
|
59
|
+
IFormatProvider provider)
\n at System.Data.Services.Serializers.JsonDeserializer.ConvertValues(Object
|
60
|
+
value, String propertyName, Type typeToBeConverted, DataServiceProviderWrapper
|
61
|
+
provider)</stacktrace></innererror></error>"
|
62
|
+
http_version: !!null
|
63
|
+
recorded_at: Tue, 07 Aug 2012 21:21:31 GMT
|
64
|
+
recorded_with: VCR 2.2.4
|