RESCUE - Book Movie - Local stopped DefaultHandlerWrapper after after at after after "2013-01-16" "" "" "Hobbit" "Vienna" null null 1100 null null {"properties":{"call_find":{"perform_search":{"http://localhost:9290/groups/Cinemas//REST/AugeGottes":{"address":{"street":"Nußdorfer Straße 73","zip":"1090","city":"Vienna","state":"Austria"},"vendor":{"name":"Das Auge Gottes Center Wien","phone":"+43-1-3176344","url":"http://www.cineplexx.at/content/kinos/kinodetails.aspx","mail":"village.wienmitte@villagekinos.at"}},"http://localhost:9290/groups/Cinemas//REST/Apollo":{"address":{"street":"Gumpendorferstraße 63","zip":"1060","city":"Vienna","state":"Austria"},"vendor":{"name":"Apollo - Das Kino Wien","phone":"+43-1-5879651","url":"http://www.cineplexx.at/content/kinos/kinodetails.aspx","mail":"village.apollo@villagekinos.at"}},"http://localhost:9290/groups/Cinemas//Soap/SCNHollywood":{"address":{"street":"Ignaz Köck-Straße 1","zip":"1210","city":"Vienna","state":"Austria"},"vendor":{"name":"SCN HollywoodMegaplex","phone":"+43-1-27166790","url":"http://www.hollywood-megaplex.at/scn/index.html","mail":"office@hollywood-megaplex.at"}},"http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino":{"address":{"street":"Gablenzgasse 1-3","zip":"1150","city":"Vienna","state":"Austria"},"vendor":{"name":"Lugner City Kino","phone":"+43-0810-584637","url":"http://www.lugnerkinocity.at/","mail":"office@lugnerkinocity.at"}},"http://localhost:9290/groups/Cinemas//REST/DonauPlexx":{"address":{"street":"Wagramerstraße 79","zip":"1220","city":"Vienna","state":"Austria"},"vendor":{"name":"Cineplexx Doanuplex","phone":"+43-1-2033322","url":"http://www.cineplexx.at/content/kinos/kinodetails.aspx","mail":"village.donauplex@villagekinos.at"}}}},"call_book":{}}} "" "" "" "" "" "" {"http://localhost:9290/groups/Cinemas//REST/AugeGottes":{},"http://localhost:9290/groups/Cinemas//REST/Apollo":{},"http://localhost:9290/groups/Cinemas//Soap/SCNHollywood":{},"http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino":{},"http://localhost:9290/groups/Cinemas//REST/DonauPlexx":{}} "" "16.01.2013" "" "16.01.2013" [] [] [] "" "" "" "" [] [] "" "" "" "" "" http://localhost:9290/groups/Cinemas/ http://localhost:9291/ http://www.cineplexx.at/content/kinos/kinoprogramm.aspx http://www.cineplexx.at/content/kinos/kinoprogramm.aspx http://scn.hollywood-megaplex.at/sinemaweb/service.asmx?WSDL http://scn.hollywood-megaplex.at/sinemaweb/service.asmx http://tickets.lugnerkinocity.at/sinema/service.asmx?WSDL http://tickets.lugnerkinocity.at/sinema/service.asmx http://www.cineplexx.at/content/kinos/kinoprogramm.aspx activity :collect_input, :call, :select, :method => "post", :info => "true", :templates => [ { :uri => 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' }, { :name => 'Cinemas-Input' }, { :lang => 'EN' } ] do |result| data.title = result.data.value('title') data.date = result.data.value('date') data.city = result.data.value('city') end activity :use_repo_cinemas, :call, :services, :info => "true", :service => [ { :serviceoperation => "search_and_book" }, { :injection_handler => endpoints.injection_handler } ], :additional_endpoints => [ { :selector_service => "select" } ], :parameters => [ { :title => data.title }, { :date => data.date } ] activity :create_objects_for_use_repo_cinemas, :manipulate do data.result_use_repo_cinemas = RescueHash.new data.result_use_repo_cinemas['properties'] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_book"] = RescueHash.new endpoints.use_repo_cinemas__selected_cinema = "" data.use_repo_cinemas__show_id = '' data.use_repo_cinemas__list = '' data.use_repo_cinemas__res = '' data.use_repo_cinemas__list_merge = '' data.use_repo_cinemas__number_of_shows = '' data.use_repo_cinemas__endpoint = '' end activity :use_repo_cinemas__call_find, :call, :services, :service => [ { :serviceoperation => "search" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :title => data.title }, { :date => data.date } ], :'call-oid' => 'call_find' activity :create_objects_for_use_repo_cinemas__call_find, :manipulate do data.result_use_repo_cinemas__call_find = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"] = RescueHash.new end activity :use_repo_cinemas__call_find__perform_search, :call, :services, :service => [ { :serviceoperation => "search" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :title => data.title }, { :date => data.date } ], :'call-oid' => 'perform_search' parallel do parallel_branch do activity :create_objects_for_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_Apollo, :manipulate do data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/Apollo"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["street"] = "Gumpendorferstraße 63" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["zip"] = "1060" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["name"] = "Apollo - Das Kino Wien" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["phone"] = "+43-1-5879651" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["mail"] = "village.apollo@villagekinos.at" end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__preparations, :manipulate do datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum = datum end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__Programm, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__service, :method => "get", :parameters => [ { :id => 1 }, { :datum => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum }, { :uhrzeit => "00:00:00" }, { :version => "" } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/Apollo']['status'] = result[1] end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__parse_programm, :manipulate do response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/Apollo") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/Apollo']['list'] = list end activity :remove_objects_of_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_Apollo, :manipulate do endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum") end end parallel_branch do activity :create_objects_for_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_AugeGottes, :manipulate do data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/AugeGottes"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["street"] = "Nußdorfer Straße 73" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["zip"] = "1090" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["name"] = "Das Auge Gottes Center Wien" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["phone"] = "+43-1-3176344" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["mail"] = "village.wienmitte@villagekinos.at" end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__preparations, :manipulate do datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum = datum end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__Programm, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__service, :method => "get", :parameters => [ { :id => 6 }, { :datum => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum }, { :uhrzeit => "00:00:00" }, { :version => "" } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/AugeGottes']['status'] = result[1] end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__parse_programm, :manipulate do response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/AugeGottes") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/AugeGottes']['list'] = list end activity :remove_objects_of_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_AugeGottes, :manipulate do endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum") end end parallel_branch do activity :create_objects_for_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_DonauPlexx, :manipulate do data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["street"] = "Wagramerstraße 79" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["zip"] = "1220" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["name"] = "Cineplexx Doanuplex" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["phone"] = "+43-1-2033322" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["mail"] = "village.donauplex@villagekinos.at" end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__preparations, :manipulate do datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum = datum end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__Programm, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__service, :method => "get", :parameters => [ { :id => 346 }, { :datum => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum }, { :uhrzeit => "00:00:00" }, { :version => "" } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/DonauPlexx']['status'] = result[1] end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__parse_programm, :manipulate do response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/DonauPlexx") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/DonauPlexx']['list'] = list end activity :remove_objects_of_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__REST_DonauPlexx, :manipulate do endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum") end end parallel_branch do activity :create_objects_for_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino, :manipulate do data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl = "http://tickets.lugnerkinocity.at/sinema/service.asmx?WSDL" endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service = "http://tickets.lugnerkinocity.at/sinema/service.asmx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["street"] = "Gablenzgasse 1-3" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["zip"] = "1150" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["name"] = "Lugner City Kino" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["phone"] = "+43-0810-584637" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["url"] = "http://www.lugnerkinocity.at/" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["mail"] = "office@lugnerkinocity.at" end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__FilmInfo, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service, :soap_operation => "FilmInfo", :wsdl => endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl, :parameters => [ { :SearchItem => data.title } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:FilmInfoResult').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = result[1] end choose do alternative (data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status.==(200)) do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__pares_response, :manipulate do soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids to = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 from = data.date resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.find("//film/ID").each do |id| ids << id.text end to = from data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 = to end loop pre_test{(data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids.length.>(0))} do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__get_film_id, :manipulate do ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids id = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id id = ids.pop data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id = id end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__Schedule, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service, :soap_operation => "Schedule", :wsdl => endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl, :parameters => [ { :FilmID => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id }, { :dTo => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 }, { :dFrom => data.date } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:ScheduleResponse').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = result[1] end choose do alternative (data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status.==(200)) do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__search_shows, :manipulate do soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.register_namespace 'tns', "http://sitec.at/Service" resp.find("descendant::tns:show").each do |show| xml << show.dump end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = xml end end otherwise do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__Schedule_Error, :manipulate do error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response puts "An error occured in Schedule_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = error end end end end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__generate_output, :manipulate do xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml list = XML::Smart.string("<list_of_shows/>") xml.each do |e| res = XML::Smart.string(e) node = list.root.add("show") node.add("cinema_uri", "http://localhost:9290/groups/Cinemas/Soap/LugnerCityKino") node.add("show_id", res.find("//id").first.text) node.add("title", res.find("//filmname").first.text) node.add("date", res.find("//date").first.text) node.add("time", res.find("//time").first.text) node.add("hall", res.find("//hall").first.text) end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = xml data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino']['list'] = list end end otherwise do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__FilmInfo_Error, :manipulate do error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response puts "An eror occured in FilmInfo_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = error end end end activity :remove_objects_of_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino, :manipulate do endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl") endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status") end end parallel_branch do activity :create_objects_for_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__Soap_SCNHollywood, :manipulate do data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl = "http://scn.hollywood-megaplex.at/sinemaweb/service.asmx?WSDL" endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service = "http://scn.hollywood-megaplex.at/sinemaweb/service.asmx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["street"] = "Ignaz Köck-Straße 1" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["zip"] = "1210" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["name"] = "SCN HollywoodMegaplex" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["phone"] = "+43-1-27166790" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["url"] = "http://www.hollywood-megaplex.at/scn/index.html" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["mail"] = "office@hollywood-megaplex.at" end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__FilmInfo, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service, :soap_operation => "FilmInfo", :wsdl => endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl, :parameters => [ { :SearchItem => data.title } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:FilmInfoResult').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = result[1] end choose do alternative (data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status.==(200)) do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__pares_response, :manipulate do soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids to = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 from = data.date resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.find("//film/ID").each do |id| ids << id.text end to = from data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 = to end loop pre_test{(data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids.length.>(0))} do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__get_film_id, :manipulate do ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids id = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id id = ids.pop data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id = id end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__Schedule, :call, :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service, :soap_operation => "Schedule", :wsdl => endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl, :parameters => [ { :FilmID => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id }, { :dTo => data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 }, { :dFrom => data.date } ], :'call-oid' => '' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:ScheduleResponse').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = result[1] end choose do alternative (data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status.==(200)) do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__search_shows, :manipulate do soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.register_namespace 'tns', "http://sitec.at/Service" resp.find("descendant::tns:show").each do |show| xml << show.dump end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = xml end end otherwise do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__Schedule_Error, :manipulate do error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response puts "An error occured in Schedule_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = error end end end end activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__generate_output, :manipulate do xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml list = XML::Smart.string("<list_of_shows/>") xml.each do |e| res = XML::Smart.string(e) node = list.root.add("show") node.add("cinema_uri", "http://localhost:9290/groups/Cinemas/Soap/SCNHollywood") node.add("show_id", res.find("//id").first.text) node.add("title", res.find("//filmname").first.text) node.add("date", res.find("//date").first.text) node.add("time", res.find("//time").first.text) node.add("hall", res.find("//hall").first.text) end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = xml data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//Soap/SCNHollywood']['list'] = list end end otherwise do activity :use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__FilmInfo_Error, :manipulate do error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response puts "An eror occured in FilmInfo_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = error end end end activity :remove_objects_of_use_repo_cinemas__call_find__perform_search_service_http___localhost_9290_groups_Cinemas__Soap_SCNHollywood, :manipulate do endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl") endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status") end end end activity :manipulate_from_use_repo_cinemas__call_find__perform_search, :manipulate, nil,data.result_use_repo_cinemas__call_find do |result| properties = data.result_use_repo_cinemas['properties']["call_find"] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas__call_find['list_shows'] = result[0].value('list') end activity :manipulate_from_use_repo_cinemas__call_find, :manipulate, nil,data.result_use_repo_cinemas__call_find do |result| properties = data.result_use_repo_cinemas['properties'] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__list = result[0].value('list') end activity :remove_objects_of_use_repo_cinemas__call_find, :manipulate do data.delete(:"result_use_repo_cinemas__call_find") end activity :use_repo_cinemas__merge_result, :manipulate do list = data.use_repo_cinemas__list m_list = data.use_repo_cinemas__list_merge nos = data.use_repo_cinemas__number_of_shows title = data.title date = data.date xml = XML::Smart.string("<list_of_shows/>") if list.class == Array list.each do |v| l = XML::Smart.string(v) xml.root.add(l.find("//show")) end elsif list.class == String l = XML::Smart.string(list) xml.root.add(l.find("//show")) else raise "Unexpected class of return-value - class: #{list.class}" end m_list = xml.root.dump nos = xml.root.children.length data.use_repo_cinemas__list = list data.use_repo_cinemas__list_merge = m_list data.use_repo_cinemas__number_of_shows = nos end choose do alternative (data.use_repo_cinemas__number_of_shows.>(0)) do activity :use_repo_cinemas__perform_select, :call, :select, :templates => [ { :uri => 'http://localhost:9290/groups/Cinemas//operations/search_and_book/templates/perform_select' }, { :name => 'Select_Show' }, { :lang => 'EN' } ], :method => "post", :info => "true", :parameters => [ { :data => data.use_repo_cinemas__list_merge } ], :'call-oid' => 'perform_select' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__show_id = result[0].value('show_id') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__endpoint = result[0].value('target') data.result_use_repo_cinemas['status'] = result[1] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['movie_title'] = result[0].value('movie_title') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['selected_date'] = result[0].value('date') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['starting_time'] = result[0].value('starting_time') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['hall'] = result[0].value('hall') end activity :use_repo_cinemas__set_selected_endpoint, :manipulate do ep = data.use_repo_cinemas__endpoint selected = endpoints.use_repo_cinemas__selected_cinema selected = ep data.use_repo_cinemas__endpoint = ep endpoints.use_repo_cinemas__selected_cinema = selected end activity :use_repo_cinemas__call_book, :call, :use_repo_cinemas__selected_cinema, :service => [ { :serviceoperation => "book" }, { :injection_handler => endpoints.injection_handler } ], :parameters => [ { :show_id => data.use_repo_cinemas__show_id } ], :'call-oid' => 'call_book' do |result| # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['reservation_id'] = result[0].value('reservation_number') end activity :use_repo_cinemas__set_status_success, :manipulate do status = 200 data.result_use_repo_cinemas['status'] = status end end otherwise do activity :use_repo_cinemas__set_status_failed, :manipulate do status = 404 data.result_use_repo_cinemas['status'] = status end end end activity :manipulate_from_use_repo_cinemas, :manipulate, nil,data.result_use_repo_cinemas do |result| properties = data.result_use_repo_cinemas['properties'] res = result[0] if res['status'] == 200 # Computing service responses data.reservation_number = res['reservation_id'] data.starting_time = res['starting_time'] data.selected_title = res['movie_title'] data.selected_date = res['selected_date'] data.hall = res['hall'] # Computing properties of executed services perf_book = properties['call_book']['perform_book'] data.selected_cinema = " #{perf_book.values[0]['vendor']['name']}\n#{perf_book.values[0]['address']['street']}\n#{perf_book.values[0]['address']['zip']} #{perf_book.values[0]['address']['city']}" end end activity :remove_objects_of_use_repo_cinemas, :manipulate do data.delete(:"result_use_repo_cinemas") data.delete(:"properties_use_repo_cinemas") endpoints.delete(:"use_repo_cinemas__selected_cinema") data.delete(:"use_repo_cinemas__show_id") data.delete(:"use_repo_cinemas__list") data.delete(:"use_repo_cinemas__res") data.delete(:"use_repo_cinemas__list_merge") data.delete(:"use_repo_cinemas__number_of_shows") data.delete(:"use_repo_cinemas__endpoint") end activity :confirm, :call, :select, :method => "post", :info => "true", :templates => [ { :uri => 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' }, { :name => 'Cinemas-Output' }, { :lang => 'EN' } ], :parameters => [ { :title => data.selected_title }, { :date => data.selected_date }, { :time => data.starting_time }, { :hall => data.hall }, { :res_nr => data.reservation_number }, { :cinema => data.selected_cinema } ] 0 undefined post true 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' 'Cinemas-Input' 'EN' data.title = result.data.value('title') data.date = result.data.value('date') data.city = result.data.value('city') true "search_and_book" endpoints.injection_handler "select" data.title data.date data.result_use_repo_cinemas = RescueHash.new data.result_use_repo_cinemas['properties'] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_book"] = RescueHash.new endpoints.use_repo_cinemas__selected_cinema = "" data.use_repo_cinemas__show_id = '' data.use_repo_cinemas__list = '' data.use_repo_cinemas__res = '' data.use_repo_cinemas__list_merge = '' data.use_repo_cinemas__number_of_shows = '' data.use_repo_cinemas__endpoint = '' "search" endpoints.injection_handler data.title data.date data.result_use_repo_cinemas__call_find = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"] = RescueHash.new "search" endpoints.injection_handler data.title data.date data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/Apollo"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["street"] = "Gumpendorferstraße 63" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["zip"] = "1060" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["name"] = "Apollo - Das Kino Wien" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["phone"] = "+43-1-5879651" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/Apollo"]["vendor"]["mail"] = "village.apollo@villagekinos.at" datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum = datum get 1 data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum "00:00:00" "" # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/Apollo']['status'] = result[1] response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/Apollo") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/Apollo']['list'] = list endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_Apollo__datum") data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/AugeGottes"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["street"] = "Nußdorfer Straße 73" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["zip"] = "1090" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["name"] = "Das Auge Gottes Center Wien" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["phone"] = "+43-1-3176344" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/AugeGottes"]["vendor"]["mail"] = "village.wienmitte@villagekinos.at" datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum = datum get 6 data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum "00:00:00" "" # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/AugeGottes']['status'] = result[1] response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/AugeGottes") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/AugeGottes']['list'] = list endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_AugeGottes__datum") data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__service = "http://www.cineplexx.at/content/kinos/kinoprogramm.aspx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["street"] = "Wagramerstraße 79" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["zip"] = "1220" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["name"] = "Cineplexx Doanuplex" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["phone"] = "+43-1-2033322" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["url"] = "http://www.cineplexx.at/content/kinos/kinodetails.aspx" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//REST/DonauPlexx"]["vendor"]["mail"] = "village.donauplex@villagekinos.at" datum = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum d = data.date date = Time.parse(d) datum = "#{date.mday < 10 ? "0#{date.mday}" : date.mday}.#{date.mon < 10 ? "0#{date.mon}" : date.mon}.#{date.year}" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum = datum get 346 data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum "00:00:00" "" # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = result[0].value('').read data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/DonauPlexx']['status'] = result[1] response = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response date = data.date title = data.title date = Date.parse(date) str = CGI::unescapeHTML(response) str.gsub!('&','--amp--') offset = str.index("selected=\"selected\"", str.index("uclKinoprogramm$DDL_Datum")) offset = str.index("value=\"", offset) d = str[offset+7..offset+16] str = str[str.index("<div id=\"uclKinoprogramm_P_Filme\">")..-1] count = 1 offset = 0 while (count != 0) do offset = str.index("div", offset+1) count = count+1 if str[offset-1].chr == "<" count = count-1 if str[offset-1].chr == "/" end str = str[0..offset-3] resp = XML::Smart.string(str) list = XML::Smart.string("<list_of_shows/>") resp.find("//table[descendant::td/a[contains(text(),'#{title}')]]").each do |b| show_title = b.find("child::tr/td[1]/a").first.text.strip show_date = Date.parse(d) if show_date.eql?(date) b.find("child::tr/td[3]/div/table").each do |show| show_hall = show.find("child::tr/td[1]/h4/span").first.text.strip show.find("child::tr/td[2]/span/a[text()]").each do |s| show = list.root.add("show") show.add("cinema_uri", "http://localhost:9290/groups/Cinemas/REST/DonauPlexx") show.add("show_id", s.attributes['href'].gsub('--amp--','&')) show.add("title", show_title) show.add("date", show_date.to_s) show.add("time", s.text) show.add("hall", show_hall) end end end end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response = response data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//REST/DonauPlexx']['list'] = list endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__REST_DonauPlexx__datum") data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl = "http://tickets.lugnerkinocity.at/sinema/service.asmx?WSDL" endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service = "http://tickets.lugnerkinocity.at/sinema/service.asmx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["street"] = "Gablenzgasse 1-3" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["zip"] = "1150" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["name"] = "Lugner City Kino" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["phone"] = "+43-0810-584637" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["url"] = "http://www.lugnerkinocity.at/" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino"]["vendor"]["mail"] = "office@lugnerkinocity.at" FilmInfo endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl data.title # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:FilmInfoResult').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = result[1] soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids to = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 from = data.date resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.find("//film/ID").each do |id| ids << id.text end to = from data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 = to ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids id = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id id = ids.pop data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id = id Schedule endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2 data.date # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:ScheduleResponse').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status = result[1] soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.register_namespace 'tns', "http://sitec.at/Service" resp.find("descendant::tns:show").each do |show| xml << show.dump end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = xml error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response puts "An error occured in Schedule_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = error xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml list = XML::Smart.string("<list_of_shows/>") xml.each do |e| res = XML::Smart.string(e) node = list.root.add("show") node.add("cinema_uri", "http://localhost:9290/groups/Cinemas/Soap/LugnerCityKino") node.add("show_id", res.find("//id").first.text) node.add("title", res.find("//filmname").first.text) node.add("date", res.find("//date").first.text) node.add("time", res.find("//time").first.text) node.add("hall", res.find("//hall").first.text) end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml = xml data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//Soap/LugnerCityKino']['list'] = list error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response puts "An eror occured in FilmInfo_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response = error endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__wsdl") endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__soap_response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__xml") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_ids") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__film_id") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__date2") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_LugnerCityKino__status") data.result_use_repo_cinemas__call_find["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"] = RescueHash.new endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl = "http://scn.hollywood-megaplex.at/sinemaweb/service.asmx?WSDL" endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service = "http://scn.hollywood-megaplex.at/sinemaweb/service.asmx" data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = Array.new data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 = '' data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = '' # Filling the properties-object of the service data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["street"] = "Ignaz Köck-Straße 1" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["zip"] = "1210" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["city"] = "Vienna" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["address"]["state"] = "Austria" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"] = RescueHash.new data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["name"] = "SCN HollywoodMegaplex" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["phone"] = "+43-1-27166790" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["url"] = "http://www.hollywood-megaplex.at/scn/index.html" data.result_use_repo_cinemas['properties']["call_find"]["perform_search"]["http://localhost:9290/groups/Cinemas//Soap/SCNHollywood"]["vendor"]["mail"] = "office@hollywood-megaplex.at" FilmInfo endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl data.title # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:FilmInfoResult').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = result[1] soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids to = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 from = data.date resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.find("//film/ID").each do |id| ids << id.text end to = from data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 = to ids = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids id = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id id = ids.pop data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids = ids data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id = id Schedule endpoints.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2 data.date # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = Array.new result[0].register_namespace 'tns', 'http://sitec.at/Service' result[0].find('descendant::tns:ScheduleResponse').each {|n| data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response << "#{n.dump}"} data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status = result[1] soap = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml resp = XML::Smart.string(CGI::unescapeHTML(soap[0])) resp.register_namespace 'tns', "http://sitec.at/Service" resp.find("descendant::tns:show").each do |show| xml << show.dump end data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = soap data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = xml error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response puts "An error occured in Schedule_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = error xml = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml list = XML::Smart.string("<list_of_shows/>") xml.each do |e| res = XML::Smart.string(e) node = list.root.add("show") node.add("cinema_uri", "http://localhost:9290/groups/Cinemas/Soap/SCNHollywood") node.add("show_id", res.find("//id").first.text) node.add("title", res.find("//filmname").first.text) node.add("date", res.find("//date").first.text) node.add("time", res.find("//time").first.text) node.add("hall", res.find("//hall").first.text) end list = list.root.dump data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml = xml data.result_use_repo_cinemas__call_find['http://localhost:9290/groups/Cinemas//Soap/SCNHollywood']['list'] = list error = data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response puts "An eror occured in FilmInfo_Error" puts error data.use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response = error endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__wsdl") endpoints.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_service") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__soap_response") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__xml") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_ids") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__film_id") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__date2") data.delete(:"use_repo_cinemas__call_find__perform_search__http___localhost_9290_groups_Cinemas__Soap_SCNHollywood__status") properties = data.result_use_repo_cinemas['properties']["call_find"] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas__call_find['list_shows'] = result[0].value('list') properties = data.result_use_repo_cinemas['properties'] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__list = result[0].value('list') data.delete(:"result_use_repo_cinemas__call_find") list = data.use_repo_cinemas__list m_list = data.use_repo_cinemas__list_merge nos = data.use_repo_cinemas__number_of_shows title = data.title date = data.date xml = XML::Smart.string("<list_of_shows/>") if list.class == Array list.each do |v| l = XML::Smart.string(v) xml.root.add(l.find("//show")) end elsif list.class == String l = XML::Smart.string(list) xml.root.add(l.find("//show")) else raise "Unexpected class of return-value - class: #{list.class}" end m_list = xml.root.dump nos = xml.root.children.length data.use_repo_cinemas__list = list data.use_repo_cinemas__list_merge = m_list data.use_repo_cinemas__number_of_shows = nos 'http://localhost:9290/groups/Cinemas//operations/search_and_book/templates/perform_select' 'Select_Show' 'EN' post true data.use_repo_cinemas__list_merge # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__show_id = result[0].value('show_id') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.use_repo_cinemas__endpoint = result[0].value('target') data.result_use_repo_cinemas['status'] = result[1] # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['movie_title'] = result[0].value('movie_title') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['selected_date'] = result[0].value('date') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['starting_time'] = result[0].value('starting_time') # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['hall'] = result[0].value('hall') ep = data.use_repo_cinemas__endpoint selected = endpoints.use_repo_cinemas__selected_cinema selected = ep data.use_repo_cinemas__endpoint = ep endpoints.use_repo_cinemas__selected_cinema = selected "book" endpoints.injection_handler data.use_repo_cinemas__show_id # Dirty, Dirty, Dirty Monkey-Hacking, but I coudln't figure out the JSON Problem with this Object if result[0].class.to_s == "Hash" result[0] = RescueHash.new_from_obj(result[0]) end data.result_use_repo_cinemas['reservation_id'] = result[0].value('reservation_number') status = 200 data.result_use_repo_cinemas['status'] = status status = 404 data.result_use_repo_cinemas['status'] = status properties = data.result_use_repo_cinemas['properties'] res = result[0] if res['status'] == 200 # Computing service responses data.reservation_number = res['reservation_id'] data.starting_time = res['starting_time'] data.selected_title = res['movie_title'] data.selected_date = res['selected_date'] data.hall = res['hall'] # Computing properties of executed services perf_book = properties['call_book']['perform_book'] data.selected_cinema = " #{perf_book.values[0]['vendor']['name']}\n#{perf_book.values[0]['address']['street']}\n#{perf_book.values[0]['address']['zip']} #{perf_book.values[0]['address']['city']}" end data.delete(:"result_use_repo_cinemas") data.delete(:"properties_use_repo_cinemas") endpoints.delete(:"use_repo_cinemas__selected_cinema") data.delete(:"use_repo_cinemas__show_id") data.delete(:"use_repo_cinemas__list") data.delete(:"use_repo_cinemas__res") data.delete(:"use_repo_cinemas__list_merge") data.delete(:"use_repo_cinemas__number_of_shows") data.delete(:"use_repo_cinemas__endpoint") post true 'http://gruppe.wst.univie.ac.at/~ralph/input-forms/cinemas.xsl' 'Cinemas-Output' 'EN' data.selected_title data.selected_date data.hall data.reservation_number data.selected_cinema 2 1 activity : , :call, : , :'call-oid' => ' ' , :manipulate , nil, parallel :wait => do 1 end loop pre_test{ } post_test{ } do 1 end choose do 1 end critical : do 1 end 1 alternative do 1 end 1 otherwise do 1 end 1 parallel_branch do | | 1 end , : => [ ] " " { : => } , do | | 1 end