How to integrate one webapplication (java) with another webapplication(java/.net.php)? - java

I have some doubts regarding web application integration. So Please suggest me possible ways for implementing below functionality.
Lest's say I have one web Application(WebApp1) in Java/.net/PHP and Second web application(WebApp2) in Java. Both web application is deployed on different web servers. and uses the one common database. One web application(WebApp1) has only login form and other web application(WebApp2) has game module. now when User log in from one web Application(WebApp1) with correct credential then it should redirect to other web application(WebApp2).
So Please suggest me how to implement this functionality.
Thanks.

What you need is to implement SSO between your .net/php app and java app, one way to do it is using CAS server .
These links may help to get started: http://jasig.275507.n4.nabble.com/Single-Sign-On-Between-Java-and-Net-App-td3039830.html
https://wiki.jasig.org/display/CASC/Home

Related

Developing app with web and Android client with Java

I'm going to start developing a new simple "X management" kind app, like contact management or events management. What I want to know is which tools would be the best to achieve it in the way I want.
My app needs to be a web app running on a server that has a mysql database to save and retrieve some simple information. This app must have a web client but I want it to be able to be extended to work with an Android app client.
Things I've thought:
I've worked on Java with facelets and JPA travels management app running on a GlassFish server on localhost with a JSF web view, so maybe my web client and the full app could be done with this.
I've worked with web services such as SOAP and REST with Jaxb and xml schemes to retrieve information parsing some webs into xml or json to show on a client .net app. So I've thought I can add to my app, like last topic we talked about, a REST web service layer to easily work as I want, or at least I think it would be easy. If I do this the Android app could share the same app core code but using the REST service.
My question is what could be the best way to do an app with 2 client side in different platforms that could share some code to be easy to extend it moreover to a desktop app. I've talked about these 2 options because I'm a students of computers at university and those are the tools I know, but I can easy learn more. I've also think about just a REST service and create a web and an Android client to work on same service or something like that.
This post is getting long, so here is the summary: What technologies and tools do you think are the best choice to create an java web app that needs to have web and Android client? Also what server, like tomcat, GlassFish or another, should I use? And what about persistence layer? JPA with mysql is the best I know to work with.
Thanks a lot.
P.D: I work with eclipse
From my point of view:
You can use java jersey and java spring both ( java spring as Dependency injection) for creating RESTful Web service. So, In server side you will create endpoint and you can access data from any platform through those endpoint.
Server can be anyone. It's up to you. I always try to use tomcat but tomcat is not a full JavaEE container it's only a servlet container. So if you want to use full JavaEE version then you should use Glassfish.
And yes JPA .It can be easily used in any environment supporting JPA including Java SE applications, Java EE application servers, Enterprise OSGi containers etc.
On the other hand, still choice is yours.

Java Web Service - Has it to be in a new project?

As you can see, I'm really starting learning about Web Services and, in all examples I've seen, a new Web Project is created to implement the Web Service.
In my case, I already have a Web Application implemented and I need a WS to an Android app for this application. So, my question is: can I create the WS in this project or do I have to make a new project for that?
Any help will be apreciated, thanks.
Can I create the WS in this project or do I have to make a new project for that?
It depends on your design. Any web application can be the producer of the web services, so yes, you can use your current web application to host the services. But, there will be more requests to your application since there are new clients apart from internet browsers, so if your application is prepared to handle lots of requests, then do it. IMO it should be a different web application since they have different purposes, even if they use the same business services and data access layers, so if your main web application is undeployed for maintainability purposes, then your web application that hosts the services can be still up and running smoothly.

how to link my new spring framework web application with struts framework web application single sign on (SSO) enabled

I have existing struts web application with Single Sign On. Then I'm going to create a different web application using spring framework. Then want to use the logged in user from struts app to link with new spring app.
Problem: I don't have any idea on how to automatically log in the logged user from struts app to my spring app.
Any guidance is appreciated.
Updates 1: the physical servers are located in the same place but it owns by two different company. However, we are connected and we called it as extranet. Its just like an intranet but in a wider range or network.
Updates 2: I have to add concerning the domain setup. http://www.abc.xxx1.ne.jp/ is the struts web app. http://server1.abc.apac.yyy1/springwebapp/ is the spring web app. It will be cross domain. I've heard from #edwardw that I need to choose federation approach. Any guidance on how to deal with the said approach are highly appreciated.
It depends on whether two web applications of yours reside in the same domain or not.
If yes, then you can use cookie based solution. Your current SSO server must have supported that out of the box. Check its document.
If not, then it is far more complicated. Check your SSO server's document for identity federation and/or federated authentication.
And you may also find this SO question helpful.

Submit xml,saml,... to server in Web service Security

I am developing a web service: Book store and I am going to develop using XML or SAML security.
I prepare a form (using JSP, PHP, ASP, ASP.NET ) with some information like: book, bankaccount, amount,... And submit this form to server. How can I do?
Please tell me step by step.
I think you need to learn a little more about how web services work. Nobody will be submitting a form to the service. They will instead have a piece of code call the web service.
Will you be developing your service in WCF in .NET 3.5 SP1? Please update your question with that detail, or say what other platform you will be using. We will then be able to tell you about the resources you will need to understand the creation of web services on that platform.

Web Service / Forms: Architecture and Framework Question

We have the following architecture in mind:
To an existing application, we would like to add a web service front end.
The web service will be used from a web portal, which runs on a different web server.
So, we will not use a database on this different web server and just forward entries from the web portal to the web service and show what the web service returns.
First question: what do you think about this architecture?
Second question: Can you recommend a java framework for this web server?
On the second question: one possibility is to use WSRP with Java Portlets.

Categories

Resources