please ask this question on the user mailing list:
http://www.jboss.org/drools/lists.html

Mark
On 12/02/2010 22:46, Srinivas Doddi wrote:
I am writing this after going through all the archived lists.
 
 My input will be the repository.xml file created from the Guvnor(and stored in SVN), and I have to export it to another(production) guvnor instance.  I am trying to automate the process of "Exporting" the repository.xml file to the Guvnor.
 
I tried using the Browser testing tools like HttpUnit, Selenium but since the front-end is gwt based, I am not successful.   Now I am trying to use HttpURLConnection, but the server is just returning me a status of "500" when I am trying to hit "

http://localhost:12212/drools-guvnor/org.drools.guvnor.Guvnor/backup"

 
I would like to know if anyone did something similar to this? 
 
This is what I am having right now. 
 
String urlString = "http://localhost:12212/drools-guvnor/org.drools.guvnor.Guvnor/backup";
try{
URL url = new URL(urlString);
 conn = (HttpURLConnection) url.openConnection();
 conn.setDoOutput(true);
 conn.setDoInput(true);
 conn.setRequestMethod("POST");
 conn.setRequestProperty("Content-Type", "text/html,application/xhtml+xml,application/xml");
 conn.setRequestProperty("packageImport", "true");
 conn.setRequestProperty("importAsNew", "true");
 String proxyCredentials = username + ":" + password;
 // Configure the connection object to
 String encodedCredentials = new String(new Base64().encode(proxyCredentials.getBytes()), "ASCII");
 encodedCredentials = encodedCredentials.replaceAll("\n", "");
 conn.setRequestProperty("Authorization", "Basic " + encodedCredentials);
 int responseCode = conn.getResponseCode();
 InputStream in = conn.getErrorStream();
}
 
 
Or do we have any Drools API for deployment of repository.xml to the repository? 
 
 
Thank you.
 
SRINIVAS
_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev