HOW PUT restclient-cli-2.3.3-jar-with-dependencies.jar

232 views
Skip to first unread message

vetal

unread,
Oct 28, 2011, 9:38:23 AM10/28/11
to rest-client
Hello!
How to PUT xml and GET with restclient-cli-2.3.3-jar-with-
dependencies.jar in command-line!!!
Only command-line.
I tested UI version –it is OK, but I need to run in command-line


Example:

java -jar <REST_CLIENT.JAR> <login> <password> PUT
http://bsmgw.bms.consulting.com/opr-console/rest/9.10/event_list/6eea76ae-ff22-71e0-0431-ac10016b0000
update2.xml

I try:

C:\test\REST>java -jar restclient-cli-2.3.3-jar-with-dependencies.jar
org.wiztools.restclient.CliMain -o C:\test\REST\ output.rcq

No read access: C:\test\REST\org.wiztools.restclient.CliMain
[Fatal Error] output.rcq:1:1: Premature end of file.
org.wiztools.restclient.XMLException: Premature end of file.
at
org.wiztools.restclient.XMLUtil.getDocumentFromFile(XMLUtil.java:528)
at
org.wiztools.restclient.XMLUtil.getRequestFromXMLFile(XMLUtil.java:
577)
at org.wiztools.restclient.cli.CliMain.main(CliMain.java:128)
Caused by: nu.xom.ParsingException: Premature end of file. at line 1,
column 1 in file:///C:/test/REST/output.rcq
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at
org.wiztools.restclient.XMLUtil.getDocumentFromFile(XMLUtil.java:525)
... 2 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
... 6 more

Subhash Chandran

unread,
Oct 28, 2011, 10:12:47 AM10/28/11
to rest-...@googlegroups.com
You have to first record the request using the REST Client UI and save the request. After saving the request, you will be able to execute the saved request from command-line.

Subhash.


--
You received this message because you are subscribed to the Google Groups "rest-client" group.
To post to this group, send email to rest-...@googlegroups.com.
To unsubscribe from this group, send email to rest-client...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rest-client?hl=en.




--
Regards,
Subhash Chandran S

Founder http://FileIt.in/
Reply all
Reply to author
Forward
0 new messages