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 have to create a RESTful web service. But, I was thinking for a generic RESTful web service for SOA. I don't know is it a good or bad idea for RESTful SOA.
How can I create generic web service which also satisfying REST concept.
Quite an endeavour.
At a first thought you would have to provide some kind of abstraction layer over the resources that you would typically expose. And that's just the API. Then you would have to execute custom logic for every resource you access.
The short answer is that it's not worth trying to figure out. Going with the typical solutions we have now is far better than over-generalising REST.
There is no one-size-fits-all.
I totally agree with #Gabriel Ruiu - "There is no one-size-fits-all."
But if you are thinking about building an API kind of thing (maybe a library) using which one could build RESTful Services easily, then you can generalize some of things and expose the features via your API.
Related
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 8 years ago.
Improve this question
I am new to Java environment. I have to create a java utility to extract information from an external application using web-services.For that I need to send an XML request and receive the response. I am browsing around the web and couldn't find any better article. I want to know how to send a XML request and print the request and the response using Java. Any good reference should also help.
Given that you are using Java, you should check out the Java specifications for
JAX-RS: Spec for Java REST services
JAX-WS: Spec for Java XML Web services (this roughly is the SOAP spec)
Both of these topics are extensive. FWIW REST seems to be the style-of-choice today. SOAP was prevalent several years back, but for several reasons (simplicity, ease of implementation), REST has surpassed SOAP. Of course if you have a target web service in mind, the style of the service makes the REST/SOAP choice for you.
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 9 years ago.
Improve this question
I usually write my web services using PHP + Mysql, in a simplified way: reading the POST/GET params, connecting to the MySQL database and finally printing a JSON.
I'd like to check how to do this with a Java server, I've never programmed Java web servers and I'd like to know what should I study to learn to do it
Thanks
I'm supposing here that you have a good understand of java programming.
Fisrtly, I think you should understand java for web.
I recommend this book:
Head First Servlets and JSP
http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596516681/
Then you can learn web services with java:
Java Web Services: Up and Running
http://www.amazon.com/Java-Web-Services-Up-Running/dp/1449365116
Of course, there are many tutorials over the internet as well, but books give you a lot of background information.
I wanna suggest you garner understanding of the two main WebServices Architectures then decide which ones suit your case/use best
REST (GET,PUT,POST,DELETE,PATCH) JAX-RS
http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html
vs SOAP bases JAX-WS
http://docs.oracle.com/javaee/5/tutorial/doc/bnayn.html
Comparing them:
Main differences between SOAP and RESTful web services in java
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 am confused a bit. Is there a documentation which can explain which one is better or whether JNDI itself uses HTTP?
When should I be used JNDI? Does it make sense using JNDI to consume web services, or whether there are better/faster methods to consume web services?
Edit:
Adding a bit more context here. I am currently making a web service calls via HTTP REST. I am trying to understand that by invoking those services by JNDI, will I get any performance improvement?
They aren't in competition for a moment. HTTP is used to communicate with HTTP servers. JNDI is used to communicate with naming services such as LDAP, the RMI registry, COS Naming, DNS, etc.
The overlap is zero.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm developing a web service and as being new to the technology, I did a bit of research on the internet on the infrastructure software/technologies needed. Below are my findings and hope to get your precious opinion:
Application Server - Tomcat6
Web service engine - Axis2
Web service implementation - POJO
Accessing Database MySql - JPA (Only 5 simple tables)
Do they look good to you?
I'm thinking of using EJB3 for point3, but there are a lot of people on the internet (and this forum) saying EJB3 is not worth the effort, POJO will do. What's your view?
Thanks,
Sarah
Might be worth trying on programmers.stackexchange.com as its not specifically a coding question. For my 2 cents, I'd seriously consider whether you wanted to go down the SOAP route (Axis is SOAP only) or whether you should use REST.
Tomcat is usually a good choice for a server, as is MySQL for a DB. If you're going to use JPA, you need to choose a JPA implementation; the obvious one is Hibernate. If you do choose to use REST then I can recommend Jersey, which is Sun's reference implementation.
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 6 years ago.
Improve this question
I want to learn Java WebServices. I read couple of articles on IBM developer works but I think I am getting confused about where to start. My main interest is Restful webservices. Where can i start from? I also prefer book with web service development example based on eclipse platform.
I always find very useful response from this site and always respect the people who responds to all these questions, so as always this time too I am expecting top answers.
Thanks a lot
The Spring Framework has great support for RESTful web services in java. It is a huge library for web development in Java so it might be a bit heavy handed. However, in my experience you eventually end up needing a lot of what's provided by Spring whether you plan on it or not.
http://static.springsource.org/spring/docs/current/reference/mvc.html
So with Spring Web MVC, you can create web controllers that handle requests in a really clean way, something to the effect of (but not tested for exact correctness):
#Controller
public class PetController {
#RequestMapping("/pets/{petId}")
public void findPet(#PathVariable String petId) {
// implementation omitted
}
}
In terms of learning about RESTful web service design, I'd suggest RESTful Web Services by Richardson, Ruby, DHH.