class InsuredShip def initialize end def calculateEstimatedPrice(shipment_request = ShipmentRequest.new) reset_service_instance @service.headerhandler << ShipmentRequestHeader.new(shipment_request) # add new headers. @service.calculateEstimatedPrice(CalculateEstimatedPrice.new()) puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #{@service.filterchain }" end protected def reset_service_instance @service = G4s.instance.shipping.service # must make a new instance each time. @service.wiredump_dev=STDERR @service.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_NONE @service.filterchain << G4sNamespaceFilter.new puts "gogogo" end end