<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Groovy Script</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>Groovy Script</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=</id>
  <updated>2013-06-19T02:47:42Z</updated>
  <dc:date>2013-06-19T02:47:42Z</dc:date>
  <entry>
    <title>RE: Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7522453" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7522453</id>
    <updated>2012-10-11T13:00:59Z</updated>
    <published>2012-10-11T13:00:59Z</published>
    <summary type="html">Thanks a lot :)
It worked !!!
thanks</summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-10-11T13:00:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7489304" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7489304</id>
    <updated>2012-10-10T12:22:00Z</updated>
    <published>2012-10-10T12:22:00Z</published>
    <summary type="html">We followed the example and built a simple program using RESTClient as u said but i'm still having this error
 
"The following fields are invalid:
Script Source: Invalid input"
 
i removed both the imports and it seems that as soon as the statment below is added, the above mentioned error comes up
 
def http = new RESTClient('http://.... URL for Webservice....')
 
On removing this line of code, the script works fine. We have tested the script outside socialminer and it works fine. According to troubleshooting documents the error is generally caused by the file being saved in Rich text format but we are sure that it is not the case here as we have written the script in Eclipse IDE. So any idea about what is causing this error ?
 
Thanks !</summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-10-10T12:22:00Z</dc:date>
  </entry>
  <entry>
    <title>RE: Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7446413" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7446413</id>
    <updated>2012-10-09T12:32:10Z</updated>
    <published>2012-10-09T12:32:10Z</published>
    <summary type="html">Hi !
As you suggested we had built REST based web service for extracting data from the database and a groovy script for accessing the web service and reading the data. The script seems fine but due to these imports
 
import groovyx.net.http.HttpResponseDecorator
import groovyx.net.http.RESTClient
 
 we got an "Invalid Input" error. I've read the Social Miner API, it says that RESTClient is allowed. So any idea about the error and why exactly are these import causing the problem.

 
Thanks</summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-10-09T12:32:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7370197" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7370197</id>
    <updated>2012-10-05T12:50:13Z</updated>
    <published>2012-10-05T12:50:13Z</published>
    <summary type="html">Hi
 
Thanks for the reply. Since the Sql package is not allowed, we were looking for alternatives. We were thinking of creating a Webservice using c# and then accessing the data using SOAP client in the groovy script. Any idea if that would be allowed or would we face similar restrictions again ?
 
Thanks</summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-10-05T12:50:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7333066" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7333066</id>
    <updated>2012-10-04T07:27:56Z</updated>
    <published>2012-10-04T07:27:56Z</published>
    <summary type="html"> 


Hi,
 
Thanks for your reply! Our script right now is just fetching some data from sql server 2008. The code is like this- 
 
import groovy.sql.Sql
 
sql = Sql.newInstance(
                           "jdbc:sqlserver://192.168.1.xx;databaseName=abcd;user=username;password=pass",       
                                    “username",
                                    “password"
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
)
 
  sql.eachRow('Select * from tablename') 
  {
   var[i] = it.fieldname
   i = i+1
  }
 
I went through the SocialMiner API, which says that certain SQL commands were not allowed. So are such queries allowed ?
because it seems a very basic SQL query where i am fetching data from some table and nothing else.
 
Thanks


 </summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-10-04T07:27:56Z</dc:date>
  </entry>
  <entry>
    <title>Groovy Script</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7111423" />
    <author>
      <name>Rusheel Jain</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7111423</id>
    <updated>2012-09-27T09:55:34Z</updated>
    <published>2012-09-27T09:55:34Z</published>
    <summary type="html">Hello,
We were working with groovy script in social miner and were trying to access a database for tagging. For this we were importing "groovy.sql.Sql". The script works fine when tested with Eclipse. But after deploying the script in SocialMiner we got an exception - 
java.lang.SecurityException: Importing [groovy.sql.Sql] is not allowed.

So is importing this file not allowed ? Any alternatives regarding the same would be helpful.
Thanks !</summary>
    <dc:creator>Rusheel Jain</dc:creator>
    <dc:date>2012-09-27T09:55:34Z</dc:date>
  </entry>
</feed>

