def _call_xml_operation(op_sym, body, extract=nil)
      @operation = _operation(op_sym)
      @operation.body = body
      @response = operation.call

      # Check for http errors?

      # Handle faults (before extracting data)
      _envelope.xpath("soap:Body/soap:Fault", namespaces).each do | fault |
        raise Exception, fault.to_s
      end
      
      # Extract data
      if extract.respond_to?(:call)
        @xml = extract.call(response)
      else
        @xml = response.raw
      end
      
      # Handle errors

      ng = Nokogiri.XML(xml)
      ng.xpath("/data/errors/error").each do | error |
        if error.key?("code")
          case error["code"].to_i
          when 4
            raise NodataException
          end
          #<error code="2">max response reached</error>
          #<error code="3">authentification error</error>
          #<error code="9">start date upper than end date</error>
        else
          raise Exception, error
        end
      end
      
      # Validation - only :getXml
      if [:getXml].include? op_sym
        # Validation against getXSD schema does not work: ["Element 'data': No matching global declaration available for the validation root."]
        # See https://github.com/npolar/argos-ruby/commit/219e4b3761e5265f8f9e8b924bcfc23607902428 for the fix
        schema = Nokogiri::XML::Schema(File.read("#{__dir__}/_xsd/argos-data.xsd"))
        v = schema.validate(ng)
        if v.any?
          log.debug "#{v.size} errors: #{v.map{|v|v.to_s}.uniq.to_json}"
        end
      end
      

      # Convert XML to Hash
      nori = Nori.new
      nori.parse(xml)
    end
def _call_xml_operation(op_sym, body, extract=nil)
      @operation = _operation(op_sym)
      @operation.body = body
      @response = operation.call

      # Check for http errors?

      # Handle faults (before extracting data)
      _envelope.xpath("soap:Body/soap:Fault", namespaces).each do | fault |
        raise Exception, fault.to_s
      end
      
      # Extract data
      if extract.respond_to?(:call)
        @xml = extract.call(response)
      else
        @xml = response.raw
      end
      
      # Handle errors

      ng = Nokogiri.XML(xml)
      ng.xpath("/data/errors/error").each do | error |
        if error.key?("code")
          case error["code"].to_i
          when 4
            raise NodataException
          end
          #<error code="2">max response reached</error>
          #<error code="3">authentification error</error>
          #<error code="9">start date upper than end date</error>
        else
          raise Exception, error
        end
      end
      
      # Validation - only :getXml
      if [:getXml].include? op_sym
        # Validation against getXSD schema does not work: ["Element 'data': No matching global declaration available for the validation root."]
        # See https://github.com/npolar/argos-ruby/commit/219e4b3761e5265f8f9e8b924bcfc23607902428 for the fix
        schema = Nokogiri::XML::Schema(File.read("#{__dir__}/_xsd/argos-data.xsd"))
        v = schema.validate(ng)
        if v.any?
          log.debug "#{v.size} errors: #{v.map{|v|v.to_s}.uniq.to_json}"
        end
      end
      

      # Convert XML to Hash
      nori = Nori.new
      nori.parse(xml)
    end
Build and call @operation, set @response, @request, and @xml
 @raise on faults
 @return [Hash]