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 "


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";
URL url = new URL(urlString);
 conn = (HttpURLConnection) url.openConnection();
 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.