| 1 |
require 'RAA.rb' |
|---|
| 2 |
require 'RAAMappingRegistry.rb' |
|---|
| 3 |
require 'soap/rpc/driver' |
|---|
| 4 |
|
|---|
| 5 |
module WSDL::RAA |
|---|
| 6 |
|
|---|
| 7 |
class RAABaseServicePortType < ::SOAP::RPC::Driver |
|---|
| 8 |
DefaultEndpointUrl = "http://raa.ruby-lang.org/soap/1.0.2/" |
|---|
| 9 |
NsC_002 = "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/" |
|---|
| 10 |
|
|---|
| 11 |
Methods = [ |
|---|
| 12 |
[ XSD::QName.new(NsC_002, "getAllListings"), |
|---|
| 13 |
"", |
|---|
| 14 |
"getAllListings", |
|---|
| 15 |
[ [:retval, "return", ["WSDL::RAA::StringArray", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "StringArray"]] ], |
|---|
| 16 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 17 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 18 |
:faults => {} } |
|---|
| 19 |
], |
|---|
| 20 |
[ XSD::QName.new(NsC_002, "getProductTree"), |
|---|
| 21 |
"", |
|---|
| 22 |
"getProductTree", |
|---|
| 23 |
[ [:retval, "return", ["Hash", "http://xml.apache.org/xml-soap", "Map"]] ], |
|---|
| 24 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 25 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 26 |
:faults => {} } |
|---|
| 27 |
], |
|---|
| 28 |
[ XSD::QName.new(NsC_002, "getInfoFromCategory"), |
|---|
| 29 |
"", |
|---|
| 30 |
"getInfoFromCategory", |
|---|
| 31 |
[ [:in, "category", ["WSDL::RAA::Category", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Category"]], |
|---|
| 32 |
[:retval, "return", ["WSDL::RAA::InfoArray", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "InfoArray"]] ], |
|---|
| 33 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 34 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 35 |
:faults => {} } |
|---|
| 36 |
], |
|---|
| 37 |
[ XSD::QName.new(NsC_002, "getModifiedInfoSince"), |
|---|
| 38 |
"", |
|---|
| 39 |
"getModifiedInfoSince", |
|---|
| 40 |
[ [:in, "timeInstant", ["::SOAP::SOAPDateTime"]], |
|---|
| 41 |
[:retval, "return", ["WSDL::RAA::InfoArray", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "InfoArray"]] ], |
|---|
| 42 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 43 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 44 |
:faults => {} } |
|---|
| 45 |
], |
|---|
| 46 |
[ XSD::QName.new(NsC_002, "getInfoFromName"), |
|---|
| 47 |
"", |
|---|
| 48 |
"getInfoFromName", |
|---|
| 49 |
[ [:in, "productName", ["::SOAP::SOAPString"]], |
|---|
| 50 |
[:retval, "return", ["WSDL::RAA::Info", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "Info"]] ], |
|---|
| 51 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 52 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 53 |
:faults => {} } |
|---|
| 54 |
], |
|---|
| 55 |
[ XSD::QName.new(NsC_002, "getInfoFromOwnerId"), |
|---|
| 56 |
"", |
|---|
| 57 |
"getInfoFromOwnerId", |
|---|
| 58 |
[ [:in, "ownerId", ["::SOAP::SOAPInt"]], |
|---|
| 59 |
[:retval, "return", ["WSDL::RAA::InfoArray", "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.2/", "InfoArray"]] ], |
|---|
| 60 |
{ :request_style => :rpc, :request_use => :encoded, |
|---|
| 61 |
:response_style => :rpc, :response_use => :encoded, |
|---|
| 62 |
:faults => {} } |
|---|
| 63 |
] |
|---|
| 64 |
] |
|---|
| 65 |
|
|---|
| 66 |
def initialize(endpoint_url = nil) |
|---|
| 67 |
endpoint_url ||= DefaultEndpointUrl |
|---|
| 68 |
super(endpoint_url, nil) |
|---|
| 69 |
self.mapping_registry = RAAMappingRegistry::EncodedRegistry |
|---|
| 70 |
self.literal_mapping_registry = RAAMappingRegistry::LiteralRegistry |
|---|
| 71 |
init_methods |
|---|
| 72 |
end |
|---|
| 73 |
|
|---|
| 74 |
private |
|---|
| 75 |
|
|---|
| 76 |
def init_methods |
|---|
| 77 |
Methods.each do |definitions| |
|---|
| 78 |
opt = definitions.last |
|---|
| 79 |
if opt[:request_style] == :document |
|---|
| 80 |
add_document_operation(*definitions) |
|---|
| 81 |
else |
|---|
| 82 |
add_rpc_operation(*definitions) |
|---|
| 83 |
qname = definitions[0] |
|---|
| 84 |
name = definitions[2] |
|---|
| 85 |
if qname.name != name and qname.name.capitalize == name.capitalize |
|---|
| 86 |
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| |
|---|
| 87 |
__send__(name, *arg) |
|---|
| 88 |
end |
|---|
| 89 |
end |
|---|
| 90 |
end |
|---|
| 91 |
end |
|---|
| 92 |
end |
|---|
| 93 |
end |
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
end |
|---|