<?vsp 
--  
--  $Id$
--  
--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
--  project.
--  
--  Copyright (C) 1998-2018 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 := '';
   declare exit handler for sqlstate '*' { r := __SQL_MESSAGE; goto endf; };
   {
     -- When hosted in dav we set the 'Content' value to empty, because string_session will crate problems
     for (declare i int,i:=0;i<length(params);i:=i+2)
       if (params[i] = 'Content')
         params[i+1] := '';
     result := soap_call (sprintf ('localhost:%s', server_http_port ()), '/ord', null, {?'oper'}, params);
   }
   declare exit handler for sqlstate '*' { r := '** no result returned **'; goto endf; };
   {
     r := replace(result[1][1],'><','>\n<');
   }
endf:
?>
<html>
<body>
<H3>SOAP response</H3>
<pre><?vsp http_value (r); ?></pre>
<p><a href="so_s_6_sample_1.vsp">New call</a><br /></p>
</body>
</html>

