[rules-users] Uploading JAR using REST

rjr201 rich.j.riley at gmail.com
Mon Feb 11 09:09:52 EST 2013


Ok, so I have this working now. You have to push a string of the form: 

import ObjectName
import anotherObjectName

To:

http://127.0.0.1:8080/guvnor-5.5.0.Final-jboss-as-7.0/org.drools.guvnor.Guvnor/webdav/packages/{packageName}/drools

The following code worked for me: 

String guvnorExtension =
"guvnor-5.5.0.Final-jboss-as-7.0/org.drools.guvnor.Guvnor/"
final WebClient client = WebClient.create("localhost:8080/", "auth", "auth",
null);
client.path(guvnorExtension + "webdav/packages/packagename/drools");
client.accept("text/plaintext");
String classImport = "import ObjectName\nimport AnotherObjectName";
Response response = client.put(classImport);

On first inspection everything else seems to be still working ok after doing
this. Will report back if I find anything else has broken as a result. 

Cheers,
Rich. 



--
View this message in context: http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-tp4022115p4022202.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list