method
dump_porttype
v1_8_7_72 -
Show latest stable
-
0 notes -
Class: WSDL::SOAP::CGIStubCreator
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
dump_porttype(name)
private
Hide source
# File lib/wsdl/soap/cgiStubCreator.rb, line 36 def dump_porttype(name) class_name = create_class_name(name) methoddef, types = MethodDefCreator.new(@definitions).dump(name) mr_creator = MappingRegistryCreator.new(@definitions) c1 = XSD::CodeGen::ClassDef.new(class_name) c1.def_require("soap/rpc/cgistub") c1.def_require("soap/mapping/registry") c1.def_const("MappingRegistry", "::SOAP::Mapping::Registry.new") c1.def_code(mr_creator.dump(types)) c1.def_code "Methods = [\n\#{methoddef.gsub(/^/, \" \")}\n]\n" c2 = XSD::CodeGen::ClassDef.new(class_name + "App", "::SOAP::RPC::CGIStub") c2.def_method("initialize", "*arg") do "super(*arg)\nservant = \#{class_name}.new\n\#{class_name}::Methods.each do |definitions|\nopt = definitions.last\nif opt[:request_style] == :document\n@router.add_document_operation(servant, *definitions)\nelse\n@router.add_rpc_operation(servant, *definitions)\nend\nend\nself.mapping_registry = \#{class_name}::MappingRegistry\nself.level = Logger::Severity::ERROR\n" end c1.dump + "\n" + c2.dump + format("\#{class_name}App.new('app', nil).start\n") end