require 'ysm4r/v2/KeywordResearchServiceMappingRegistry' module YSM::KeywordResearchService require 'soap/rpc/driver' class KeywordResearchService < ::SOAP::RPC::Driver DefaultEndpointUrl = "https://USE_ADDRESS_RETURNED_BY_LOCATION_SERVICE/services/V2/KeywordResearchService" Methods = [ [ "", "getPageRelatedKeywords", [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getPageRelatedKeywords"]], ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getPageRelatedKeywordsResponse"]] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal, :faults => {"YSM::KeywordResearchService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} } ], [ "", "getCanonicalKeywords", [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getCanonicalKeywords"]], ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getCanonicalKeywordsResponse"]] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal, :faults => {"YSM::KeywordResearchService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} } ], [ "", "getCommonKeywords", [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getCommonKeywords"]], ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getCommonKeywordsResponse"]] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal, :faults => {"YSM::KeywordResearchService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} } ], [ "", "getRelatedKeywords", [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getRelatedKeywords"]], ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getRelatedKeywordsResponse"]] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal, :faults => {"YSM::KeywordResearchService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} } ], [ "", "getRangeDefinitions", [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getRangeDefinitions"]], ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getRangeDefinitionsResponse"]] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal, :faults => {"YSM::KeywordResearchService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} } ] ] def initialize(endpoint_url = nil) endpoint_url ||= DefaultEndpointUrl super(endpoint_url, nil) self.mapping_registry = DefaultMappingRegistry::EncodedRegistry self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry init_methods end private def init_methods Methods.each do |definitions| opt = definitions.last if opt[:request_style] == :document add_document_operation(*definitions) else add_rpc_operation(*definitions) qname = definitions[0] name = definitions[2] if qname.name != name and qname.name.capitalize == name.capitalize ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| __send__(name, *arg) end end end end end end end