Hi Ricardo,

Have your reviewed the documentation below on publishing stored procedures as 
web services:

        http://docs.openlinksw.com/virtuoso/expwsmodules.html#expwsmodules

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 15 Apr 2014, at 09:52, Ricardo Mendes <ricardo.men...@izone-ks.pt> wrote:

> Hi, how can I publish a REST web service through a Stored Procedure? I read 
> the Virtuoso Server Pages (VSP), but it wasn’t clear to me.
>  
> I create the following procedure:
>  
> create procedure
> "WS"."WS"."/i4m/electricity/average_consumption_by_month.vsp" (IN meterID 
> VARCHAR, IN month_num tinyint, IN year_num SMALLINT)
> returns ANY
> {   
>      RETURN  (SELECT AVG(quantidade)
>           FROM DB.DBA.Electricity_Invoices_Data
>           WHERE (
>                 contadorID =  meterID AND
>                 type = 2 AND
>                 month(observationTime) = month_num AND
>                 year(observationTime) = year_num)
>                 );
> }
>  
>  
>  
> http://openiot.izone.pt:8890/i4m/electricity/average_consumption_by_month.vsp?meterID=1341384&month_num=11&year_num=2013
>  
> The requested active content cannot be displayed due to execution restriction
>  
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to