I have web service based web application with front build in angularjs and web service built on grails. Now I need to add a wiki app to integrate into the existing application. I want to use XWiki as a service. So is it possible to extract out only the API from XWiki with my own user credentials and roles to work with. I can't seem to figure out these issues with current documentation.
Also can you suggest other lightweight alternatives to Xwiki which supports REST ???
Yes you can extract data from XWiki very easily using the REST API, see http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI
Another strategy is to write the AngularJS app directly inside XWiki. There are some examples available here:
AngularJS Demo: http://extensions.xwiki.org/xwiki/bin/view/Extension/AngularJSDemo
AngularJS Todo app: https://github.com/xwiki-contrib/application-angular-todo
Small AngularJS app that does a live rendering of wiki markup: https://github.com/xwiki-contrib/angular-rendering
Hope it helps
Related
I understand how to call an SSRS (SQL Server Reporting Services) PDF report through a URL from an Angular web app but what I'm trying to do is call our app's Java Spring Boot REST API to fetch the SSRS report instead. We'd like to do this because we have an iOS app (and other apps coming) that use our REST API and would like to retrieve this SSRS PDF report also. Additionally, the Java fetches some data from other microservices to pass on to the SSRS report as parameters, so it makes sense to centralize the generation of this report in our REST API.
My question is
how to do this in Java Spring Boot?
I can't find much online on how to achieve this. Our REST API is also running in a Linux cloud environment. So we'd need to provide authentication of some kind for a Windows user I'd image. The best I can find online is this and I'm wondering if this could be the right approach?
https://examples.javacodegeeks.com/core-java/net/authenticator/access-password-protected-url-with-authenticator/
I have an web project which is using angular 2 on front end and java spring 4 on server side. I am somewhat new to angular 2. I wanted to use angular universal for prerendering. How can i able to achieve it?
is there any tutorial which explains it with Java on server side?
Is there any other library that will help me out?
Fortunately their's a library (Angularj-Universal) or a solution for rendering Angular4 applications on the server side (Spring Boot or Java EE) and sending them to the browser as 'already-bootstraped' application.
Angularj-Universal library is a server side rendering for Spring Boot and Angular4 based on the J2V8 library, also you can implement your own render implementation.
On the home page of this project you will find a useful guides step-by-step on how to create angular application from scratch and integrate it with Spring Boot using #angular/cli
Angular 2 Universal works with nodejs/asp.net only.
You could use java server for rest api and separate nodejs server for pre-rendering or play with v8 jni bindings.
https://github.com/angular/universal#getting-started
Unfortunately there are not much support available for now.
Angular Universal was originally built to work with a node.js back-end. There are adapters for most popular node.js server-side frameworks such as Express or Hapi.js. In addition to node.js, however, Angular Universal has ASP.NET Core support. In the near future we hope to add support for Java, PHP and Python.
-Related page-
You can follow this issues (spring boot support & java backend) on github.
Additionally, check out this libraries;
J2V8 A Highly Efficient JS Runtime For Java
Java's Nashorn Javascript engine (link1)
Not sure if you are looking for this but here is something that might help you
Since you want to deploy your angular app within spring-boot app follow these steps
Create a public folder under resources in your spring-boot project
ng-build --prod, type this command on you angular project which will create a dist folder under your angular project directory
copy files from you dist folder and place it in public folder under resources of your spring-boot project.
This will help you run your angular-app under spring-boot.
I am new here. I would need some advice on this issue.
I have a well developed java web application deployed on openshift and connected with mySQL.
i am new in android development. Currently, i have to develop an native android application that talks to my openshift application for the data in mySQL. I understand that to do this, i have to create a RESTful web service on my web app and my android application would call the web service.
My questions would be
1. Where can i get started to develop a restful web service, is there any simple-to-understand resources to get me started? I understand that creating a restful web service from scratch would be tedious and having a framework will help in creating a web service better. Please advice me on this
Is there any sample projects/tutorial out there that guide me how to write a restful api to link between my web app and android app?
To create a restful web service, it is using json to parse the information over, is there any guide on this? I'm not very good at json. Would be good if there is an tutorial
Thank you for the guidance in advance! Feeling lost on how to get it started despite reading the getting started on android 1001 times!
If your code is in Java, I suggest you look into Spring MVC framework. Its one of the widely used frameworks for Java.
You could look into Volley examples here.
Volley is recommended for HTTP calls in Android.
To create JSON response to be sent by your server, you could look into Google's GSON library. To parse JSON web response into Java objects in your Android code, you could use any of the ORMs. GreenDAO is a stable open-source library for this purpose.
I have already generated the files using wsdl2Java and created the proxy client in JAVA.I am using Apache CXF framework and using Maven as Build Management tool. I can run the JAVA application and consume the service using JAVA. There is no problem with JAVA implementation.
The need is I need to invoke and request the same web service from PHP or JSP file and display the result in PHP or JSP file. I would like to use the present JAVA code. I don't know how to invoke the JAVA code from PHP or JSP page.
Please help me with the solutions.
You have created a web service, so your design should be centered around that. For Java programs (including JSP's) you can use the generated client classes to access the web service. For PHP I would recommend using one of the many SOAP client libraries to process and consume your WSDL. You might want to take a look at wsdl2php, NuSoap, or SoapClient.
I'm trying to create a simple web service application where I can retrieve a collection of strings and store them into a data store on the AppEngine server.
I have knowledge in Java and barely any knowledge of Java Servlets and its WAR standards.
I would like to at least have some direction on how to create a web service using the Java technology AppEngine provides. I've searched but the articles are sparse and too lengthy while not providing any simple solutions.
I'd love it if I can create a web service using Java's annotations just like you can do in .NET with attributes.
I'd appreciate links to articles and guidance a full source answer is not required but would be appreciated.
No python based answers please.
IMO, there is no simple solution to build a Web Service on GAE with Java.
But, it's still achievable. Let's start with the Web Services we want to build.
In common usage the term refers to
clients and servers that communicate
over the Hypertext Transfer Protocol
(HTTP) protocol used on the web. Such
services tend to fall into one of two
camps: Big Web Services and
RESTful Web Services.
"Big Web Services" use SOAP/RPC format and RESTful Web Services use REST style one. You can read more about SOAP vs REST.
There are lots of Java open source Web Services frameworks out there. Most of them are generally based on the Java API for XML Web Services (JAX-WS), part of the Java EE platform.
JAX-WS is not supported by Google App Engine as specified in the list Will it play in App Engine. So forget about the "cool Java's annotations".
But, Restlet seems compatible with GAE. So if you think REST could be an option for you, I would go ahead and take a look at the Hello World tutorial of Restlet. Then, I'd go ahead and read the article on how to integrate Restlet with GAE.