Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Updated generator to reflect api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Troels committed Jun 28, 2009
1 parent 5ef50fe commit 8d8b253
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/handsoap/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,16 @@ def compile_service(protocol, *options)
w.puts
w.begin "class #{service_name} < Handsoap::Service"
w.puts "endpoint #{endpoint_name}"
w.begin "on_create_document do |doc|"
w.begin "def on_create_document(doc)"
w.puts "# register namespaces for the request"
w.puts "doc.alias 'tns', '#{@wsdl.target_ns}'"
w.end
w.puts
w.begin "def on_response_document(doc)"
w.puts "# register namespaces for the response"
w.puts "doc.add_namespace 'ns', '#{@wsdl.target_ns}'"
w.end
w.puts
w.puts "# public methods"
@wsdl.interface.operations.each do |operation|
action = binding.actions.find { |a| a.name == operation.name }
Expand Down

0 comments on commit 8d8b253

Please sign in to comment.