handlers/mantis_issue_delete_relationship_v1/handler/init.rb
def execute
    begin
      # Build and send a SOAP request for the 'mc_issue_add' method (namespaced with
      # 'wsdl') of the configured soap endpoint by setting the 'input' body parameter.
      #
      # If there was a problem executing the SOAP request, a Savon::SOAP::Fault
      # (indicating a Web Service exception was raised) or a Savon::HTTP::Error
      # (indicating there was a problem communicating with the server) will be
      # raised.
		
      response = @client.request 'wsdl:mc_issue_relationship_delete' do |soap_message|
        # Set the enumeration parameter to the one selected during Task node
        # configuration.  We need to prefix the parameter with a namespace since
        # it does not have a namespaced element to inherit from.
        soap_message.body = {
			'username' => @info_values['username'], 'password' => @info_values['password'], 'issue_id' => @parameters['issue_id'].to_i, 'relationship_id' => @parameters['relationship_id']
		}
      end
    # Rescue the error that is raised if we were unable to connect to the web
    # service server.
    rescue Errno::ECONNREFUSED
      # Re-raise a more intelligent error message (but maintain the original error backtrace).
      raise Errno::ECONNREFUSED, "Unable to connect to the web service endpoint: #{@url}", $!.backtrace
    # Rescue communication errors.
    rescue Savon::HTTP::Error
      # Re-raise a more intelligent error message (but maintain the original error type and backtrace).
      raise StandardError, "There was a problem calling the web service: #{$!.to_s}", $!.backtrace
    # Rescue exceptions raised by the web service
    rescue Savon::SOAP::Fault
      # Re-raise a more intelligent error message (but maintain the original error type and backtrace).
      raise StandardError, "There was a problem executing the web method: #{$!.to_s}", $!.backtrace
    end

    # In order to process the result, we will first convert the Savon::Response
    # object into a hash, then retrieve the desired value.
    res = response.to_hash[:mc_issue_relationship_delete_response][:return]

    # Build and return the results
    <<-RESULTS
    <results>
      <result name="Mantis_Issue_Relationship_Delete_Success">#{res}</result>
    </results>
    RESULTS
  end
# This is a required method that is automatically called by the Kinetic Task
# Engine.
#
# ==== Returns
# A String representing the return variable results.
This is a required method that is automatically called by the Kinetic Task
Engine.

Returns
A String representing the return variable results.
This is a required method that is automatically called by the Kinetic Task Engine . Returns A String representing the return variable results .
def execute
    begin
       If there was a problem executing the SOAP request, a Savon::SOAP::Fault
       (indicating a Web Service exception was raised) or a Savon::HTTP::Error
       (indicating there was a problem communicating with the server) will be
       raised.
      response = @client.request 'wsdl:mc_issue_relationship_delete' do |soap_message|
         Set the enumeration parameter to the one selected during Task node
         configuration.  We need to prefix the parameter with a namespace since
         it does not have a namespaced element to inherit from.
        soap_message.body = {
			'username' => @info_values['username'], 'password' => @info_values['password'], 'issue_id' => @parameters['issue_id'].to_i, 'relationship_id' => @parameters['relationship_id']
		}
      end
     Rescue the error that is raised if we were unable to connect to the web
     service server.
    rescue Errno::ECONNREFUSED
       Re-raise a more intelligent error message (but maintain the original error backtrace).
      raise Errno::ECONNREFUSED, "Unable to connect to the web service endpoint: {@url}", $!.backtrace
     Rescue communication errors.
    rescue Savon::HTTP::Error
       Re-raise a more intelligent error message (but maintain the original error type and backtrace).
      raise StandardError, "There was a problem calling the web service: {$!.to_s}", $!.backtrace
     Rescue exceptions raised by the web service
    rescue Savon::SOAP::Fault
       Re-raise a more intelligent error message (but maintain the original error type and backtrace).
      raise StandardError, "There was a problem executing the web method: {$!.to_s}", $!.backtrace
    end
     In order to process the result, we will first convert the Savon::Response
     object into a hash, then retrieve the desired value.
    res = response.to_hash[:mc_issue_relationship_delete_response][:return]
     Build and return the results
    <<-RESULTS
    <results>
      <result name="Mantis_Issue_Relationship_Delete_Success">{res}</result>
    </results>
    RESULTS
  end
def execute begin response = @client . request 'wsdl:mc_issue_relationship_delete' do | soap_message | soap_message . body = { 'username' => @info_values [ 'username' ] , 'password' => @info_values [ 'password' ] , 'issue_id' => @parameters [ 'issue_id' ] . to_i , 'relationship_id' => @parameters [ 'relationship_id' ] } end rescue Errno :: ECONNREFUSED raise Errno :: ECONNREFUSED , "Unable to connect to the web service endpoint: #{@url}" , $! . backtrace rescue Savon :: HTTP :: Error raise StandardError , "There was a problem calling the web service: #{$!.to_s}" , $! . backtrace rescue Savon :: SOAP :: Fault raise StandardError , "There was a problem executing the web method: #{$!.to_s}" , $! . backtrace end res = response . to_hash [ :mc_issue_relationship_delete_response ] [ :return ] <<-RESULTS 
    <results>
      <result name="Mantis_Issue_Relationship_Delete_Success"> #{ res } </result>
    </results>
     RESULTS end
This is a required method that is automatically called by the Kinetic Task
Engine.
This is a required method that is automatically called by the Kinetic Task Engine .
# Build and send a SOAP request for the 'mc_issue_add' method (namespaced with # 'wsdl') of the configured soap endpoint by setting the 'input' body parameter. # # If there was a problem executing the SOAP request, a Savon::SOAP::Fault # (indicating a Web Service exception was raised) or a Savon::HTTP::Error # (indicating there was a problem communicating with the server) will be # raised. # Set the enumeration parameter to the one selected during Task node # configuration.  We need to prefix the parameter with a namespace since # it does not have a namespaced element to inherit from. # Rescue the error that is raised if we were unable to connect to the web # service server. # Re-raise a more intelligent error message (but maintain the original error backtrace). # Rescue communication errors. # Re-raise a more intelligent error message (but maintain the original error type and backtrace). # Rescue exceptions raised by the web service # Re-raise a more intelligent error message (but maintain the original error type and backtrace). # In order to process the result, we will first convert the Savon::Response # object into a hash, then retrieve the desired value. # Build and return the results