<?vsp 
--  
--  $Id: so_s_13_secure_SOAP_client.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
--  
--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
--  project.
--  
--  Copyright (C) 1998-2012 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 result, ses, r varchar;
   r := '';
   if ({?'exec'} = 'Get data')
   {
   declare exit handler for sqlstate '*' { r := __SQL_MESSAGE; goto endf; };
   {
     result := soap_call ('localhost:4433', '/SOAP/', null, 'get_secure_NasdaqQuotes', params, 11, 'cli.p12', 'virt');
   }
   declare exit handler for sqlstate '*' { r := '** no result returned **'; goto endf; };
   {
     r := result[1][1];
     http (r);
     http_xslt (TUTORIAL_XSL_DIR () || '/tutorial/services/so_s_13/sr.xsl', params);
     return 0;
   }
   }
endf:
?>
<html>
<HEAD><link rel="stylesheet" type="text/css" href="../demo.css" /></HEAD>
<body>
<H3>SOAP client secured via SSL</H3>
<?vsp
  if (r <> '')
    http_value (r,'pre');
?>
<form method="post" action="so_s_13_secure_SOAP_client.vsp">
<input type="hidden" name="url" value="http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=">
<table class="tableentry">
<tr><td>1. Enter a symbol to get the stock quotes report</td><td>
<input type="text" name="symbol" size="15" value="MSFT,ORCL"/>
</td></tr>
<tr><td>2. Call the get_NasdaqQuotes</td><td><input type="submit" name="exec" value="Get data"></td></tr>
</table>
</form>

</body>
</html>

