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

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.

Related

How to create web server to provide data to Android application

I'm not new to programming, but I have never created any server applications. I wish to a create server that provides data to an Android application, for example using a JSON string by POST/GET http requests that saves some data. I want to use Java EE, but I am unsure whether that is possible. I found tutorials that provide web browser pages, but I don't need this. Can somebody advise me?
As you are looking for simple JSON data representation, I would recommend going through a RESTful backend service and when it says REST in a Java Enterprise Edition, it says JAX-RS (RESTful Java specification) and its base implementation reference: Jersey.
It should not be the perfect place to detail how to implement a simple JSON backed service using Jersey, but going through the site references you should gain the basic knowledge on how to go for your first simple REST service.

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

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

Confused with Web Services vs Websites (REST, JAX-RS, Servlets, etc)

I'm trying to understand the difference between Web Services and Websites.
In college, I learned how to build a website up by writing servlets and JSPs. However, I want to build"websites" using methods that people are using right now.
But I'm confused with the term of Web Services / Websites.
I was reading on JAX-RS, and it seems that JAX-RS is used for web services, and then I figured out there's a server side and client side. Does it mean that this application was created to communicate with each other using HTTP? An example is chat room that communicates through HTTP port? Then does this have nothing to do with creating website?
Does this means that JAX-RS is not used for building websites?
I'm being confused over this topic already. Can someone point me to the right direction?
Thanks
Website you have developed using JSP and Servlet can be categorized as a fully fledged web application where there is a backend (database, etc) and a UI front end for user interaction.
Webservices on the other hand are a set of services exposed through a set of URL or URI which doesn't necessarily have a UI front end for direct user interaction. More like an API.
For Example, Facebook can be considered as a dynamic website and Facebook Developer API which provides different services for third party (such as authentication, friends list, messages etc) can be considered as web service.
I was reading on JAX-RS, and it seems that JAX-RS is used for web services, and then I figured out there's a server side and client side
Yes JAX-RS is mostly used in web services and web services do have a client side. This client is mostly another application written to call the web service and rarely has user interaction.
Does this means that JAX-RS is not used for building websites?
No it is possible to use JAX-RS to build websites also. If you layer your web services using JAX-RS and then create web pages with Javascript or Flex or some other client to consume and produce for those JAX-RS web services then you can build a web site.
JAX-RS is a specification for RESTful Web Services with Java.
A service provides certain operations(server side). A client consumes the operations of a service. So a website could be a client of a service.
A web site can be used to collect and send data to services as well as display the results.
For example you login to a website to purchase a flight. The website asks for date of departure, departure city/state, destination city/state. Once you enter this information the website collects this data and builds a request and invokes some service. In return the service responds with flights that meet your date and destination requirements. The site parses this information and displays this data for you to choose the desired flight.
The website provides a user experience suitable for the data retrieved/displayed.
The web service enables the passing of this data via a defined request/response.

Java and Spring back-end with Ruby (RhoMobile) front-end security

I am currently building a mobile application using RhoMobile. The application will simply be calling a bunch of REST web services. The back-end REST services are written in Java + Spring. I was wondering what the security considerations are. Our requirements are very simple, we need a secure way for a user to log in with the application, and only then be able to call the web services.
Does anyone have any experience with marrying these technologies. And what are my options. At the moment I am looking at either using Spring Security or Shiro, but just wondering if anyone has better experience.
Just as a note, we will be using JSON for all communication.
I have my backend web server running a Ruby On Rails application.
I communicate using JSON and HTTP Basic Authentication. In this type of authentication it is needed only to pass a header with the user name and the password encoded.
It is not the best way to achieve security, because if someone is monitoring your network traffic he could discover your credentials, but it could be a simple solution.

Generate SOAP Web Service client forms (Java)

I have a Web Service accessible via SOAP. Let's assume it provides a method with the signature
sayHello(String name)
Of course, I have the WSDL describing the Web Service.
What I want to do now is to generate a client web application (war archive) with a GUI that provides a form to enter the parameter for the Web Service method. In case of the example, the form must just allow to enter the value for the "name" parameter. Then, a SOAP message must be assembled and sent to the WS.
Is there any way or any framework to generate such a webapp automatically!? The actual kind of the resulting webapp is not important, it may be a GWT webapp, JSF, plain Servlet with JSP or whatever. Even a plain HTML/JavaScript client app would be OK.
I mean, there are tools to generate CRUD forms out of data models, so there must be tools to create forms for Web Services, too...
I've been googling around for a long time, but the only thing I've found is a feature of Eclipse: http://www.eclipse.org/webtools/jst/components/ws/M3/tutorials/WebServiceClient.html . Basically, this does what I want, but I'm looking for a more ..hm.. elegant way to do this ;-)
Thanks in advance,
Frank
What you are looking for is (I think) similar to what this site seems to do: link soaptest
As far as I know there is no framework that supports this out of the box.
All frameworks support the automatic generation of client stubs and artifacts and application developers use that to implement their functionality.
In your case create the HTML interface your self to test the web service.
Only .NET web services provide similar tool for testing link text
If I remember correctly, Netbeans provides simple web pages to test the functionality of web services methods (methods offered by the server). You can find a decent amount of guides showing you how to create wevservice clients on youtube. It is a relatively straight forward process.
If it is just for testing the web service: go for soapUI. It's a standalone application and (to my opinion) a must for every SOAP engineer.

Categories

Resources