channel_advisor 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README +46 -0
  2. data/lib/channel_advisor/admin_service/client.rb +63 -0
  3. data/lib/channel_advisor/admin_service/mapping_registry.rb +206 -0
  4. data/lib/channel_advisor/admin_service/types.rb +175 -0
  5. data/lib/channel_advisor/admin_service.rb +14 -0
  6. data/lib/channel_advisor/auth_handler.rb +21 -0
  7. data/lib/channel_advisor/cart_service/client.rb +79 -0
  8. data/lib/channel_advisor/cart_service/mapping_registry.rb +344 -0
  9. data/lib/channel_advisor/cart_service/types.rb +386 -0
  10. data/lib/channel_advisor/cart_service.rb +14 -0
  11. data/lib/channel_advisor/errors.rb +13 -0
  12. data/lib/channel_advisor/inventory_service/client.rb +223 -0
  13. data/lib/channel_advisor/inventory_service/mapping_registry.rb +1765 -0
  14. data/lib/channel_advisor/inventory_service/types.rb +1708 -0
  15. data/lib/channel_advisor/inventory_service.rb +14 -0
  16. data/lib/channel_advisor/listing_service/client.rb +55 -0
  17. data/lib/channel_advisor/listing_service/mapping_registry.rb +153 -0
  18. data/lib/channel_advisor/listing_service/types.rb +125 -0
  19. data/lib/channel_advisor/listing_service.rb +14 -0
  20. data/lib/channel_advisor/marketplace_ad_service/client.rb +71 -0
  21. data/lib/channel_advisor/marketplace_ad_service/mapping_registry.rb +334 -0
  22. data/lib/channel_advisor/marketplace_ad_service/types.rb +317 -0
  23. data/lib/channel_advisor/marketplace_ad_service.rb +14 -0
  24. data/lib/channel_advisor/message_code.rb +30 -0
  25. data/lib/channel_advisor/order_service/client.rb +111 -0
  26. data/lib/channel_advisor/order_service/mapping_registry.rb +1696 -0
  27. data/lib/channel_advisor/order_service/types.rb +1781 -0
  28. data/lib/channel_advisor/order_service.rb +14 -0
  29. data/lib/channel_advisor/service_proxy.rb +62 -0
  30. data/lib/channel_advisor/shared_requires.rb +11 -0
  31. data/lib/channel_advisor/shipping_service/client.rb +79 -0
  32. data/lib/channel_advisor/shipping_service/mapping_registry.rb +500 -0
  33. data/lib/channel_advisor/shipping_service/types.rb +431 -0
  34. data/lib/channel_advisor/shipping_service.rb +14 -0
  35. data/lib/channel_advisor/store_service/client.rb +55 -0
  36. data/lib/channel_advisor/store_service/mapping_registry.rb +250 -0
  37. data/lib/channel_advisor/store_service/types.rb +180 -0
  38. data/lib/channel_advisor/store_service.rb +14 -0
  39. data/lib/channel_advisor/tax_service/client.rb +55 -0
  40. data/lib/channel_advisor/tax_service/mapping_registry.rb +233 -0
  41. data/lib/channel_advisor/tax_service/types.rb +221 -0
  42. data/lib/channel_advisor/tax_service.rb +14 -0
  43. data/lib/channel_advisor.rb +4 -0
  44. data/spec/integration/inventory_sync_spec.rb +55 -0
  45. data/spec/lib/channel_advisor/admin_service_spec.rb +12 -0
  46. data/spec/lib/channel_advisor/auth_handler_spec.rb +46 -0
  47. data/spec/lib/channel_advisor/cart_service_spec.rb +12 -0
  48. data/spec/lib/channel_advisor/errors_spec.rb +23 -0
  49. data/spec/lib/channel_advisor/inventory_service_spec.rb +12 -0
  50. data/spec/lib/channel_advisor/marketplace_ad_service_spec.rb +12 -0
  51. data/spec/lib/channel_advisor/message_code_spec.rb +40 -0
  52. data/spec/lib/channel_advisor/order_service_spec.rb +12 -0
  53. data/spec/lib/channel_advisor/service_proxy_spec.rb +130 -0
  54. data/spec/lib/channel_advisor/shipping_service_spec.rb +12 -0
  55. data/spec/lib/channel_advisor/store_service_spec.rb +12 -0
  56. data/spec/lib/channel_advisor/tax_service_spec.rb +12 -0
  57. data/spec/spec.opts +2 -0
  58. data/spec/spec_helper.rb +4 -0
  59. metadata +170 -0
@@ -0,0 +1,431 @@
1
+ module ChannelAdvisor; module ShippingServiceSOAP
2
+
3
+
4
+ # {http://api.channeladvisor.com/webservices/}APIResultOfShippingRateResult
5
+ # status - ChannelAdvisor::ShippingServiceSOAP::ResultStatus
6
+ # messageCode - SOAP::SOAPInt
7
+ # message - SOAP::SOAPString
8
+ # data - SOAP::SOAPString
9
+ # resultData - ChannelAdvisor::ShippingServiceSOAP::ShippingRateResult
10
+ class APIResultOfShippingRateResult
11
+ attr_accessor :status
12
+ attr_accessor :messageCode
13
+ attr_accessor :message
14
+ attr_accessor :data
15
+ attr_accessor :resultData
16
+
17
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
18
+ @status = status
19
+ @messageCode = messageCode
20
+ @message = message
21
+ @data = data
22
+ @resultData = resultData
23
+ end
24
+ end
25
+
26
+ # {http://api.channeladvisor.com/webservices/}ShippingRateResult
27
+ # shippingDetailList - ChannelAdvisor::ShippingServiceSOAP::ArrayOfShippingItemBase
28
+ class ShippingRateResult
29
+ attr_accessor :shippingDetailList
30
+
31
+ def initialize(shippingDetailList = nil)
32
+ @shippingDetailList = shippingDetailList
33
+ end
34
+ end
35
+
36
+ # {http://api.channeladvisor.com/webservices/}ArrayOfShippingItemBase
37
+ class ArrayOfShippingItemBase < ::Array
38
+ end
39
+
40
+ # {http://api.channeladvisor.com/webservices/}ShippingItemBase
41
+ # carrierName - SOAP::SOAPString
42
+ # className - SOAP::SOAPString
43
+ # shippingCost - SOAP::SOAPDecimal
44
+ class ShippingItemBase
45
+ attr_accessor :carrierName
46
+ attr_accessor :className
47
+ attr_accessor :shippingCost
48
+
49
+ def initialize(carrierName = nil, className = nil, shippingCost = nil)
50
+ @carrierName = carrierName
51
+ @className = className
52
+ @shippingCost = shippingCost
53
+ end
54
+ end
55
+
56
+ # {http://api.channeladvisor.com/webservices/}APICredentials
57
+ # developerKey - SOAP::SOAPString
58
+ # password - SOAP::SOAPString
59
+ class APICredentials
60
+ attr_accessor :developerKey
61
+ attr_accessor :password
62
+
63
+ def initialize(developerKey = nil, password = nil)
64
+ @developerKey = developerKey
65
+ @password = password
66
+ end
67
+ end
68
+
69
+ # {http://api.channeladvisor.com/webservices/}APIResultOfArrayOfShippingCarrier
70
+ # status - ChannelAdvisor::ShippingServiceSOAP::ResultStatus
71
+ # messageCode - SOAP::SOAPInt
72
+ # message - SOAP::SOAPString
73
+ # data - SOAP::SOAPString
74
+ # resultData - ChannelAdvisor::ShippingServiceSOAP::ArrayOfShippingCarrier
75
+ class APIResultOfArrayOfShippingCarrier
76
+ attr_accessor :status
77
+ attr_accessor :messageCode
78
+ attr_accessor :message
79
+ attr_accessor :data
80
+ attr_accessor :resultData
81
+
82
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
83
+ @status = status
84
+ @messageCode = messageCode
85
+ @message = message
86
+ @data = data
87
+ @resultData = resultData
88
+ end
89
+ end
90
+
91
+ # {http://api.channeladvisor.com/webservices/}ArrayOfShippingCarrier
92
+ class ArrayOfShippingCarrier < ::Array
93
+ end
94
+
95
+ # {http://api.channeladvisor.com/webservices/}ShippingCarrier
96
+ # carrierID - SOAP::SOAPInt
97
+ # classID - SOAP::SOAPInt
98
+ # carrierName - SOAP::SOAPString
99
+ # carrierCode - SOAP::SOAPString
100
+ # classCode - SOAP::SOAPString
101
+ # className - SOAP::SOAPString
102
+ class ShippingCarrier
103
+ attr_accessor :carrierID
104
+ attr_accessor :classID
105
+ attr_accessor :carrierName
106
+ attr_accessor :carrierCode
107
+ attr_accessor :classCode
108
+ attr_accessor :className
109
+
110
+ def initialize(carrierID = nil, classID = nil, carrierName = nil, carrierCode = nil, classCode = nil, className = nil)
111
+ @carrierID = carrierID
112
+ @classID = classID
113
+ @carrierName = carrierName
114
+ @carrierCode = carrierCode
115
+ @classCode = classCode
116
+ @className = className
117
+ end
118
+ end
119
+
120
+ # {http://api.channeladvisor.com/webservices/}APIResultOfBoolean
121
+ # status - ChannelAdvisor::ShippingServiceSOAP::ResultStatus
122
+ # messageCode - SOAP::SOAPInt
123
+ # message - SOAP::SOAPString
124
+ # data - SOAP::SOAPString
125
+ # resultData - SOAP::SOAPBoolean
126
+ class APIResultOfBoolean
127
+ attr_accessor :status
128
+ attr_accessor :messageCode
129
+ attr_accessor :message
130
+ attr_accessor :data
131
+ attr_accessor :resultData
132
+
133
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
134
+ @status = status
135
+ @messageCode = messageCode
136
+ @message = message
137
+ @data = data
138
+ @resultData = resultData
139
+ end
140
+ end
141
+
142
+ # {http://api.channeladvisor.com/webservices/}OrderShipmentList
143
+ # shipmentList - ChannelAdvisor::ShippingServiceSOAP::ArrayOfOrderShipment
144
+ class OrderShipmentList
145
+ attr_accessor :shipmentList
146
+
147
+ def initialize(shipmentList = nil)
148
+ @shipmentList = shipmentList
149
+ end
150
+ end
151
+
152
+ # {http://api.channeladvisor.com/webservices/}ArrayOfOrderShipment
153
+ class ArrayOfOrderShipment < ::Array
154
+ end
155
+
156
+ # {http://api.channeladvisor.com/webservices/}OrderShipment
157
+ # orderId - SOAP::SOAPInt
158
+ # clientOrderIdentifier - SOAP::SOAPString
159
+ # shipmentType - ChannelAdvisor::ShippingServiceSOAP::ShipmentTypeEnum
160
+ # partialShipment - ChannelAdvisor::ShippingServiceSOAP::PartialShipmentContents
161
+ # fullShipment - ChannelAdvisor::ShippingServiceSOAP::FullShipmentContents
162
+ class OrderShipment
163
+ attr_accessor :orderId
164
+ attr_accessor :clientOrderIdentifier
165
+ attr_accessor :shipmentType
166
+ attr_accessor :partialShipment
167
+ attr_accessor :fullShipment
168
+
169
+ def initialize(orderId = nil, clientOrderIdentifier = nil, shipmentType = nil, partialShipment = nil, fullShipment = nil)
170
+ @orderId = orderId
171
+ @clientOrderIdentifier = clientOrderIdentifier
172
+ @shipmentType = shipmentType
173
+ @partialShipment = partialShipment
174
+ @fullShipment = fullShipment
175
+ end
176
+ end
177
+
178
+ # {http://api.channeladvisor.com/webservices/}PartialShipmentContents
179
+ # shipmentContents - ChannelAdvisor::ShippingServiceSOAP::ShipmentContents
180
+ # dateShippedGMT - SOAP::SOAPDateTime
181
+ # carrierCode - SOAP::SOAPString
182
+ # classCode - SOAP::SOAPString
183
+ # trackingNumber - SOAP::SOAPString
184
+ # shipmentCost - SOAP::SOAPDecimal
185
+ # shipmentTaxCost - SOAP::SOAPDecimal
186
+ # insuranceCost - SOAP::SOAPDecimal
187
+ class PartialShipmentContents
188
+ attr_accessor :shipmentContents
189
+ attr_accessor :dateShippedGMT
190
+ attr_accessor :carrierCode
191
+ attr_accessor :classCode
192
+ attr_accessor :trackingNumber
193
+ attr_accessor :shipmentCost
194
+ attr_accessor :shipmentTaxCost
195
+ attr_accessor :insuranceCost
196
+
197
+ def initialize(shipmentContents = nil, dateShippedGMT = nil, carrierCode = nil, classCode = nil, trackingNumber = nil, shipmentCost = nil, shipmentTaxCost = nil, insuranceCost = nil)
198
+ @shipmentContents = shipmentContents
199
+ @dateShippedGMT = dateShippedGMT
200
+ @carrierCode = carrierCode
201
+ @classCode = classCode
202
+ @trackingNumber = trackingNumber
203
+ @shipmentCost = shipmentCost
204
+ @shipmentTaxCost = shipmentTaxCost
205
+ @insuranceCost = insuranceCost
206
+ end
207
+ end
208
+
209
+ # {http://api.channeladvisor.com/webservices/}ShipmentContents
210
+ # lineItemList - ChannelAdvisor::ShippingServiceSOAP::ArrayOfLineItem
211
+ class ShipmentContents
212
+ attr_accessor :lineItemList
213
+
214
+ def initialize(lineItemList = nil)
215
+ @lineItemList = lineItemList
216
+ end
217
+ end
218
+
219
+ # {http://api.channeladvisor.com/webservices/}ArrayOfLineItem
220
+ class ArrayOfLineItem < ::Array
221
+ end
222
+
223
+ # {http://api.channeladvisor.com/webservices/}LineItem
224
+ # sKU - SOAP::SOAPString
225
+ # quantity - SOAP::SOAPInt
226
+ class LineItem
227
+ attr_accessor :sKU
228
+ attr_accessor :quantity
229
+
230
+ def initialize(sKU = nil, quantity = nil)
231
+ @sKU = sKU
232
+ @quantity = quantity
233
+ end
234
+ end
235
+
236
+ # {http://api.channeladvisor.com/webservices/}FullShipmentContents
237
+ # dateShippedGMT - SOAP::SOAPDateTime
238
+ # carrierCode - SOAP::SOAPString
239
+ # classCode - SOAP::SOAPString
240
+ # trackingNumber - SOAP::SOAPString
241
+ # shipmentCost - SOAP::SOAPDecimal
242
+ # shipmentTaxCost - SOAP::SOAPDecimal
243
+ # insuranceCost - SOAP::SOAPDecimal
244
+ class FullShipmentContents
245
+ attr_accessor :dateShippedGMT
246
+ attr_accessor :carrierCode
247
+ attr_accessor :classCode
248
+ attr_accessor :trackingNumber
249
+ attr_accessor :shipmentCost
250
+ attr_accessor :shipmentTaxCost
251
+ attr_accessor :insuranceCost
252
+
253
+ def initialize(dateShippedGMT = nil, carrierCode = nil, classCode = nil, trackingNumber = nil, shipmentCost = nil, shipmentTaxCost = nil, insuranceCost = nil)
254
+ @dateShippedGMT = dateShippedGMT
255
+ @carrierCode = carrierCode
256
+ @classCode = classCode
257
+ @trackingNumber = trackingNumber
258
+ @shipmentCost = shipmentCost
259
+ @shipmentTaxCost = shipmentTaxCost
260
+ @insuranceCost = insuranceCost
261
+ end
262
+ end
263
+
264
+ # {http://api.channeladvisor.com/webservices/}APIResultOfString
265
+ # status - ChannelAdvisor::ShippingServiceSOAP::ResultStatus
266
+ # messageCode - SOAP::SOAPInt
267
+ # message - SOAP::SOAPString
268
+ # data - SOAP::SOAPString
269
+ # resultData - SOAP::SOAPString
270
+ class APIResultOfString
271
+ attr_accessor :status
272
+ attr_accessor :messageCode
273
+ attr_accessor :message
274
+ attr_accessor :data
275
+ attr_accessor :resultData
276
+
277
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
278
+ @status = status
279
+ @messageCode = messageCode
280
+ @message = message
281
+ @data = data
282
+ @resultData = resultData
283
+ end
284
+ end
285
+
286
+ # {http://api.channeladvisor.com/webservices/}ResultStatus
287
+ class ResultStatus < ::String
288
+ Failure = ResultStatus.new("Failure")
289
+ Success = ResultStatus.new("Success")
290
+ end
291
+
292
+ # {http://api.channeladvisor.com/webservices/}ShipmentTypeEnum
293
+ class ShipmentTypeEnum < ::String
294
+ Full = ShipmentTypeEnum.new("Full")
295
+ Partial = ShipmentTypeEnum.new("Partial")
296
+ end
297
+
298
+ # {http://api.channeladvisor.com/webservices/}GetShippingRateList
299
+ # accountID - SOAP::SOAPString
300
+ # cartID - SOAP::SOAPInt
301
+ # street - SOAP::SOAPString
302
+ # city - SOAP::SOAPString
303
+ # state - SOAP::SOAPString
304
+ # postalCode - SOAP::SOAPString
305
+ # country - SOAP::SOAPString
306
+ class GetShippingRateList
307
+ attr_accessor :accountID
308
+ attr_accessor :cartID
309
+ attr_accessor :street
310
+ attr_accessor :city
311
+ attr_accessor :state
312
+ attr_accessor :postalCode
313
+ attr_accessor :country
314
+
315
+ def initialize(accountID = nil, cartID = nil, street = nil, city = nil, state = nil, postalCode = nil, country = nil)
316
+ @accountID = accountID
317
+ @cartID = cartID
318
+ @street = street
319
+ @city = city
320
+ @state = state
321
+ @postalCode = postalCode
322
+ @country = country
323
+ end
324
+ end
325
+
326
+ # {http://api.channeladvisor.com/webservices/}GetShippingRateListResponse
327
+ # getShippingRateListResult - ChannelAdvisor::ShippingServiceSOAP::APIResultOfShippingRateResult
328
+ class GetShippingRateListResponse
329
+ attr_accessor :getShippingRateListResult
330
+
331
+ def initialize(getShippingRateListResult = nil)
332
+ @getShippingRateListResult = getShippingRateListResult
333
+ end
334
+ end
335
+
336
+ # {http://api.channeladvisor.com/webservices/}GetShippingCarrierList
337
+ # accountID - SOAP::SOAPString
338
+ class GetShippingCarrierList
339
+ attr_accessor :accountID
340
+
341
+ def initialize(accountID = nil)
342
+ @accountID = accountID
343
+ end
344
+ end
345
+
346
+ # {http://api.channeladvisor.com/webservices/}GetShippingCarrierListResponse
347
+ # getShippingCarrierListResult - ChannelAdvisor::ShippingServiceSOAP::APIResultOfArrayOfShippingCarrier
348
+ class GetShippingCarrierListResponse
349
+ attr_accessor :getShippingCarrierListResult
350
+
351
+ def initialize(getShippingCarrierListResult = nil)
352
+ @getShippingCarrierListResult = getShippingCarrierListResult
353
+ end
354
+ end
355
+
356
+ # {http://api.channeladvisor.com/webservices/}OrderShipped
357
+ # accountID - SOAP::SOAPString
358
+ # orderID - SOAP::SOAPInt
359
+ # dateShippedGMT - SOAP::SOAPDateTime
360
+ # carrierCode - SOAP::SOAPString
361
+ # classCode - SOAP::SOAPString
362
+ # trackingNumber - SOAP::SOAPString
363
+ class OrderShipped
364
+ attr_accessor :accountID
365
+ attr_accessor :orderID
366
+ attr_accessor :dateShippedGMT
367
+ attr_accessor :carrierCode
368
+ attr_accessor :classCode
369
+ attr_accessor :trackingNumber
370
+
371
+ def initialize(accountID = nil, orderID = nil, dateShippedGMT = nil, carrierCode = nil, classCode = nil, trackingNumber = nil)
372
+ @accountID = accountID
373
+ @orderID = orderID
374
+ @dateShippedGMT = dateShippedGMT
375
+ @carrierCode = carrierCode
376
+ @classCode = classCode
377
+ @trackingNumber = trackingNumber
378
+ end
379
+ end
380
+
381
+ # {http://api.channeladvisor.com/webservices/}OrderShippedResponse
382
+ # orderShippedResult - ChannelAdvisor::ShippingServiceSOAP::APIResultOfBoolean
383
+ class OrderShippedResponse
384
+ attr_accessor :orderShippedResult
385
+
386
+ def initialize(orderShippedResult = nil)
387
+ @orderShippedResult = orderShippedResult
388
+ end
389
+ end
390
+
391
+ # {http://api.channeladvisor.com/webservices/}SubmitOrderShipmentList
392
+ # accountID - SOAP::SOAPString
393
+ # shipmentList - ChannelAdvisor::ShippingServiceSOAP::OrderShipmentList
394
+ class SubmitOrderShipmentList
395
+ attr_accessor :accountID
396
+ attr_accessor :shipmentList
397
+
398
+ def initialize(accountID = nil, shipmentList = nil)
399
+ @accountID = accountID
400
+ @shipmentList = shipmentList
401
+ end
402
+ end
403
+
404
+ # {http://api.channeladvisor.com/webservices/}SubmitOrderShipmentListResponse
405
+ # submitOrderShipmentListResult - ChannelAdvisor::ShippingServiceSOAP::APIResultOfBoolean
406
+ class SubmitOrderShipmentListResponse
407
+ attr_accessor :submitOrderShipmentListResult
408
+
409
+ def initialize(submitOrderShipmentListResult = nil)
410
+ @submitOrderShipmentListResult = submitOrderShipmentListResult
411
+ end
412
+ end
413
+
414
+ # {http://api.channeladvisor.com/webservices/}Ping
415
+ class Ping
416
+ def initialize
417
+ end
418
+ end
419
+
420
+ # {http://api.channeladvisor.com/webservices/}PingResponse
421
+ # pingResult - ChannelAdvisor::ShippingServiceSOAP::APIResultOfString
422
+ class PingResponse
423
+ attr_accessor :pingResult
424
+
425
+ def initialize(pingResult = nil)
426
+ @pingResult = pingResult
427
+ end
428
+ end
429
+
430
+
431
+ end; end
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'shared_requires.rb'))
2
+ ['types.rb', 'mapping_registry.rb', 'client.rb'].each do |required|
3
+ require File.expand_path(File.join(File.dirname(__FILE__), 'shipping_service', required))
4
+ end
5
+
6
+ module ChannelAdvisor
7
+ class ShippingService
8
+ include ChannelAdvisor::ServiceProxy
9
+ define_service_methods(
10
+ ChannelAdvisor::ShippingServiceSOAP,
11
+ ChannelAdvisor::ShippingServiceSOAP::ShippingServiceSoap
12
+ )
13
+ end
14
+ end
@@ -0,0 +1,55 @@
1
+ module ChannelAdvisor::StoreServiceSOAP
2
+
3
+ class StoreServiceSoap < ::SOAP::RPC::Driver
4
+ DefaultEndpointUrl = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/StoreService.asmx"
5
+
6
+ Methods = [
7
+ [ "http://api.channeladvisor.com/webservices/GetSearchAnalysisStats",
8
+ "getSearchAnalysisStats",
9
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetSearchAnalysisStats"]],
10
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetSearchAnalysisStatsResponse"]] ],
11
+ { :request_style => :document, :request_use => :literal,
12
+ :response_style => :document, :response_use => :literal,
13
+ :faults => {} }
14
+ ],
15
+ [ "http://api.channeladvisor.com/webservices/Ping",
16
+ "ping",
17
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "Ping"]],
18
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "PingResponse"]] ],
19
+ { :request_style => :document, :request_use => :literal,
20
+ :response_style => :document, :response_use => :literal,
21
+ :faults => {} }
22
+ ]
23
+ ]
24
+
25
+ def initialize(endpoint_url = nil)
26
+ endpoint_url ||= DefaultEndpointUrl
27
+ super(endpoint_url, nil)
28
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
29
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
30
+ init_methods
31
+ end
32
+
33
+ private
34
+
35
+ def init_methods
36
+ Methods.each do |definitions|
37
+ opt = definitions.last
38
+ if opt[:request_style] == :document
39
+ add_document_operation(*definitions)
40
+ else
41
+ add_rpc_operation(*definitions)
42
+ qname = definitions[0]
43
+ name = definitions[2]
44
+ if qname.name != name and qname.name.capitalize == name.capitalize
45
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
46
+ __send__(name, *arg)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+
55
+ end