<?vsp 
--  
--  $Id$
--  
--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
--  project.
--  
--  Copyright (C) 1998-2024 OpenLink Software
--  
--  This project is free software; you can redistribute it and/or modify it
--  under the terms of the GNU General Public License as published by the
--  Free Software Foundation; only version 2 of the License, dated June 1991.
--  
--  This program is distributed in the hope that it will be useful, but
--  WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--  General Public License for more details.
--  
--  You should have received a copy of the GNU General Public License along
--  with this program; if not, write to the Free Software Foundation, Inc.,
--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--  
--  


  declare url any;
  url := {?'wsdl'};

  if ({?'xecute'} is not null)
    {
      declare exit handler for sqlstate '*' {
	set_qualifier ('DB');
	resignal;
       };
      set_qualifier ('WSDLDEMO');
      DB.DBA.WSDLTEST_IMPORT (url);
      set_qualifier ('DB');
      http_request_status ('HTTP/1.1 302 Found');
      http_header ('Location: /WSDLDemo/services.vsmx\r\n');
    }
  if ({?'clear'} is not null)
    {
      for select G_OBJECT from sys_grants, sys_users where G_OP = 32 and G_USER = U_ID and U_NAME = 'WSDL_DEMO'
	do
          {
            delete from DB.DBA.SYS_SOAP_UDT_PUB where SUP_CLASS = G_OBJECT and SUP_HOST = '*ini*'
		and SUP_LHOST = '*ini*' and SUP_END_POINT = '/WSDLDemo';
	  }
    }

?>


<html>
<HEAD><link rel="stylesheet" type="text/css" href="../demo.css" /></HEAD>
<body>
<H3>Simple WSDL test service</H3>
<form method="POST" action="wsdl_import.vsp">
<table class="tableentry">
<tr>
  <td>Enter the target WSDL URL</td>
  <td><input type="text" name="wsdl" value="http://soap.amazon.com/schemas2/AmazonWebServices.wsdl" size="65"></td>
</tr>
<!--tr>
  <td>Clear cache</td>
  <td><input type="checkbox" name="cache"></td>
</tr-->
<tr>
  <td>Import</td>
  <td><input type="submit" name="xecute" value="Import&Test"></td>
</tr>
<tr>
  <td>Clear cache</td>
  <td><input type="submit" name="clear" value="Clear"></td>
</tr>
</table>
</form>
</body>
</html>
