2

I have created a virtual procedure in JBoss Teiid ,i want to call it using odata protocol. I have tried to call it by .....url/odata/PROCEDURE NAME

It is not working .

Can anyone please tell me the corect syntax to call stored procedure in odata.

madhurika
  • 191
  • 1
  • 8
  • could you query metadata by url/odata/$metadata ? – Maya Mar 14 '14 at 15:29
  • yes. We can expose data by odata protocol. – madhurika Mar 17 '14 at 04:25
  • Then, according to https://docs.jboss.org/author/display/TEIID/OData+Translator and https://docs.jboss.org/author/display/TEIID/OData+Support, stored procedure should be mapped to FunctionImport. Did you see the related FunctionImport in $metadata? – Maya Mar 17 '14 at 08:42
  • Hi Maya, Thanks for your reply. Yes, we are able to see the $metadata and also FunctionImport is showing both source and view. So, looks like I just need to provide more info for you. We have a procedure that takes two parameters (both strings). Teiid returns a result set by default. We wanted actual column values to be returned. Hence we added all the required columns as per the query using which we created the stored procedure. Now, we want a odata query through which we can call that stored procedure. http://locahost:8080/odata/vdbname/$metadata works. Now onwards,how do I build query? – madhurika Mar 17 '14 at 09:20

2 Answers2

2

I believe this will work:

http://127.0.0.1:8080/odata/<vdbname>/FunctionImportName?Parameter1Name='Parameter1Value'&Parameter2Name='Parameter2Value'
ehsanullahjan
  • 5,422
  • 4
  • 23
  • 21
0

Try locahost:8080/odata/vdbname/FunctionInportName(Parameter1Name=Parameter1Value, Parameter2Name=Parameter2Value)

Maya
  • 816
  • 6
  • 5
  • http://localhost:8080/odata/vdbname/databasename.schemaname.virtualprocedureview(abc='12345',xyz='pqr') is throwing error that it cant find dbname.schemaname.virtualprocedureview where functionImport contains the name of virtual procedure view – madhurika Mar 17 '14 at 10:33