With Java, how would I use the JasperServer Reports REST API to deploy an input control to the server? [closed] - rest

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have been unable to get Tibco support to come up with a solution for this, so I am thinking it is not possible, even though they document that it is.
I want to:
deploy an input control to the JasperReports server,
putting it into a specific folder,
using Java and their REST API,
and then list all the input controls back through a HTTP request
(return a full list in json or xml)
Requirements:
Language: Java
API: JasperReports Server REST API
Authentication: POST
Then any HTTP method after the authentication via POST to send a JSON file to the server that defines and deploys the input control.
artifacts:
A single .java file (using built in JDK libraries, or minimal dependencies declared in a pom.xml)
pom.xml
To understand this, I am hoping to find a bare bones solution that uses low level HTTP calls (no frameworks other than any HTTP client in Java).
I have searched, read the manual (it's horrible), many documents, so many things, and logged a support ticket with Tibco, and they are unable to find anyone in the company that can do this.

Related

Can I use REST APIs to remotely launch an application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to launch an application on a remote system from Java. I know the IP address and the location of the executable batch file on the remote system. I am trying to get it done with PSExec but I can't seem to get it to work due to domain issues.
One suggestion was to use REST API instead. I don't see any info on using REST to launch an application. So anyone who can tell me if this is possible?
REST is about resource state manipulation via their representations on the top of stateless communication between client and server. REST is an architectural style and it's protocol independent but, in practice, it's commonly implemented on the top of the HTTP protocol.
Can I use REST APIs to remotely launch an application?
If you can represent your application state as a resource, so you can probably create a REST API to manage it.
In practice, your server can provide a set of URLs to locate the resources and their state can be manipulated via HTTP verbs and representations such as JSON and/or XML.
HTTP headers can be used to exchange some metadata about the request and response while HTTP status code should be used to inform the client regarding the status of the operation.
Keep it stateless by storing all session context in the client.

Rest API and chef [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am working on a project where in I have to build a rest api and will be using chef at the backend. How can the integration between chef and a rest api be done? For eg: I will be having chef recipes on the chef server. So how can these recipes be invoked from the rest api? Also what is the best language that can be used for developing a rest api?
There really isn't much information in your question to go on, but it seems like you may be conflating a few different concepts.
The Chef server is the central location to store your cookbooks and other config data. You do not "invoke cookbooks" on it. Though cookbooks can be uploaded to the Chef server, nodes running the Chef client are the ones that would "invoke" a cookbook. You can read more about the Chef server on the Chef website.
As far as integration between the Chef server and a RESTful API. No such "integration" needs to be done, the server already provides with one. You can see its documentation on the Chef website. You may be specifically interested in the /cookbooks endpoint:
The /cookbooks endpoint has the following methods: GET.
The GET method is used to return a hash of all cookbooks and cookbook versions.
Finally, what the "best" language for a RESTful API is an matter of opinion and depends on your needs. A similar question has been asked and closed for that reason previously.
If you're just getting started, you may also find this question about what RESTful programming is helpful.

Can a REST resource point/wrap another external REST API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to have a URI like this /car/toyota, however I don't want the car resource to map to a database table for example. Instead I would like car to just be resource that is used for information retrieval only (ie. no POST, PUT, or DELETE on it), and /car/toyota/ would retrieve that data somewhere else, say through another REST API on another web server that provides this information.
Is this good design?
This probably belongs on something more like https://softwareengineering.stackexchange.com/
That said, this question depends entirely on the infrastructure of the environment you're making your REST requests on. If you have the ability to control the REST API on the web server providing the information, there's really no reason to wrap that API in another API. All of the call forwarding and potential necessity to translate from one request format to another really just adds un-necessary overhead.
That said, if you're accessing an API that you have no ability to re-format, or if you're accessing an API that you don't want client servers talking to directly, then there's a potential design perk for wrapping a different REST API in your own read only API.
Unfortunately, without having a clear picture of the entire architecture and the problem you're trying to solve, it's pretty difficult to decide if a wrapped API is a good design or not. My only advice is the preferred approach would be to edit the existing API if you can, but that isn't always practical.

Can Google's GWT be hacked? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm planning to make a multiplayer card battle game using Libgdx for the web, it uses the GWT engine for web deployment.
Is this engine secured? Can it be hacked? I don't want to waste my time learning it only if it will be hacked later on.
Thanks.
There is no engine as such. GWT compiles Java code to javascript which is then downloaded and run in the browser. By default this is obfuscated. It is difficult to modify but as the code is available in the browser it is theoretically possible to reverse engineer and modify it.
GWT puts no restrictions on how you implement server side web application code. It provides libraries to help with client to server RPC which you may choose to use or not. That means the server side security is down to you and is as secure as you want to make it.

Does ejabberd support offline file transfers? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am working on an XMPP client, using ejabberd as server.
My question is how can I support offline file transferring?
I only want to do the offline file transferring for image files.
For example,
I can transfer an image to John even if he is offline.
When John comes back online,
the server will send him the image.
How can I do that?
There is currently no extension for XMPP to allow offline file transfers.
Presumably this would need to be supported by the recipient's server, and it would need to be implemented as a server-specific plugin.
Alternatively a project that may be of interest to you is Jabber Disk, which allows you to upload a file via XMPP, and then returns a HTTP URL you can send to people (for example as an offline message).
XMPP had an extension for this - XEP-0129: WebDAV File Transfers - but it is deferred!
I am searching for the same solution. I came across it, but did not find a XMPP server still supporting it.
Still searching for a solution.
We implemented offline file transfer is TextOne mobile client, but we had to do a custom module. There is no good specification for that yet.
However, for a simple need as you have, I think you could implement it purely client side (uploading to an HTTP server) and use XMPP for signaling.