Different Types of Web Services [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I developed a mobile application using PhoneGap, to connect to a database through a web service. Since, I am familiar with the .NET environment, I used a WCF service, or more specifically an Ajax Enabled WCF Service, so that I could call the web service through an Ajax call.
Now, I am an absolute beginner in web services and I don't even know the difference between REST and SOAP web services and whether this Ajax Enable WCF service is SOAP or REST web service. Also, can I develop the same web service using Java?
Can you please recommend a book or a tutorial where I can have a crash course on web services and find an answer for all these questions please?

A web service is simply a definition for how two logically or otherwise separated systems can communicate. REST and SOAP are simply two protocols in which this communication can occur. Think of it in terms of a human language wherein one language requires about 100 syllables to get a message across to a listener while another language allows you pass the same message across in 75 syllables or less.
From the metaphor above, REST will be the slimmer 75 syllable language and SOAP the more elaborate 100+ syllabic language.
Note that the transport mechanism remains the same ( oral or spoken word) which is the same case with web services, I.e. the same protocol (REST or SOAP) can be transmitted over different transport channels http, low level sockets, SMTP etc. You can have an overview here
At the end of the day, the founding principle of web services is interoperability, enabling disparate and technologically different systems communicate via open protocols in a platform agnostic manner. Meaning your WCF based service will basically be able to do the same thing as a java(JAX-WS or RS) web service albeit they'll go about it differently.

Related

where to start java web services? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
From yesterdays i have started learning java web services, have seen many blogs still confuse, about which service is best for practice. either SOAP or Rest?
Please suggest me best service method for request and response.
Thank You.
There is no best, only choices. Choose the one that meets your needs and get on with it. Or simply pick one if you don't know what meets your needs.
REST is a style based on HTTP. It requires a level of knowledge that you probably don't have. I'd recommend starting with SOAP because it's so well supported with tools. Once you're comfortable, learn REST.
I think this article could help you: When to use rest or soap.
Personally I always use SOAP because it uses XML to transport the information, and it is easy to understand the structure of the data you are using in the comunication. Rest hasn't exactly a format to read, so it makes the things more complex to understand.
If you are just starting to learn about Web services I think you should go with SOAP.
Best Answer I found on SO
Both methods are used by many of the large players. It's a matter of preference. My preference is REST because it's simpler to use and understand.
SOAP:
SOAP builds an XML protocol on top of HTTP or sometimes TCP/IP.
SOAP describes functions, and types of data.
SOAP is a successor of XML-RPC and is very similar, but describes a standard way to communicate.
Several programming languages have native support for SOAP, you typically feed it a web service URL and you can call its web service functions without the need of specific code.
Binary data that is sent must be encoded first into a format such as base64 encoded.
Has several protocols and technologies relating to it: WSDL, XSDs, SOAP, WS-Addressing
Representational state transfer (REST):
REST need not be over HTTP but most of my points below will have an HTTP bias.
REST is very lightweight, it says wait a minute, we don't need all of this complexity that SOAP created.
Typically uses normal HTTP methods instead of a big XML format describing everything. For example to obtain a resource you use HTTP GET, to put a resource on the server you use HTTP PUT. To delete a resource on the server you use HTTP DELETE.
REST is a very simple in that it uses HTTP GET, POST and PUT methods to update resources on the server.
REST typically is best used with Resource Oriented Architecture (ROA). In this mode of thinking everything is a resource, and you would operate on these resources.
As long as your programming language has an HTTP library, and most do, you can consume a REST HTTP protocol very easily.
Binary data or binary resources can simply be delivered upon their request.
There are endless debates on REST vs SOAP on google.
My favorite is this one.
Well, REST is more used than SOAP (something like 70% of the webservices, but I can't figure out where those figures come from). So if you want to be a professional developer, it may be more interesting to learn REST.
This question has been asked multiple times on SO over the years. You can find answers at Main differences between SOAP and RESTful web services in java and WSDL vs REST Pros and Cons and Restful vs Other Web Services

What is Websphere? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Googling this question returns lots of results with marketing jargon.
What I am looking for is a summary of what it does, more along these lines What is Maven?
This is the closest I could get.
"WebSphere" in the most abstract sense is a brand encompassing various products, so "a brand" is about as good an answer as you can get.
What one usually refers to when saying "WebSphere", though, is the WebSphere Application Server, which (as the name implies) is an application server - something that runs EJBs and other server-side Java technologies like servlets, JMS, etc. An example of another important player in this space is JBoss AS.
Finally, another possible definition of "WebSphere" is "its creator's biggest technology mistake" ;)
Unlike a regular web server which simply provides clients acces to html-documents, which their browser then displays as websites, an application server allows for programms/scripts to be invoked by requesting websites, which dynamically generate the websites.
In this case the scripts are written in Java. This allows for a lot of the apis provieded in Java to be utilised by your web-application (the website itself is simply the frontend of your webapplication)
So web sphere is an application server from IBM. Simple as that. This tells you what it can do.
Hope that helps.
WebSphere is an application server which supports a lot of advanced functions including load balancing, database connection managing, advanced logging options and many more.
On the other hand it introduces severe overhead, is difficult to administrate and one has to learn a lot to use it effectively. And more often than on other servers you find yourself in JAR hell. Been there.

Need to integrate web applcation with all major ERP and CRM systems [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a web application which needs to interact with all the major CRM and ERP systems in order to send and receive data.
What according to you will be a better approach.
Design this whole logic inside the web application,maybe a component for each interface
Use a ESB.
Please suggest what will be the best approach to implement this, any other workarounds,designs are also welcome.
Web services were pretty much tailor-made to address the issue of communication and integration among many disparate systems, so it seems like that would be the most logical solution.
If you require ordered messaging, guaranteed message delivery, etc then an ESB is probably your best bet. Otherwise your web application should be able to integrate directly with the other systems via web services.
Finally, you will probably want to create components in your web application anyway to encapsulate the logic of each system (doing this now will help to ensure minimal changes are necessary if/when you replace one of the external systems). For example, for a recent integration with an accounting system I created interfaces and abstract classes to generalize the functions inherent to all accounting systems, and then created concrete classes that implemented that functionality for the specific accounting system I was integrating with at the time. The benefit to this is that if my client ever changes accounting systems in the future all I will need to do is create another concrete implementation - I will not need to rewrite the code in my client application.

Remote database access architecture [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Good day. I'm developing a website with the database which is going to be hosted in the cloud using Spring/Hibernate bundle. I also need to develop a desktop application that would be able to manage the remote database. I'm stuck choosing the appropriate method of implementing remote access. JAX-WS, RMI, Spring HttpInvoker or any other method? Which should I choose and why?
I'd choose JAX-WS/SOAP for this particular task.
Unlike binary protocols such as RMI, it goes easily over corporate proxies and firewalls. It has security mechanisms (WS-Security), transaction and session support which I believe is important for database remote management.
It also has better tooling/IDE support than any other remote access method/API/framework.
Create a service layer above dao layer and make it WS. Call WS from your web application and desktop application for using your db actions.
Despite valuable answers of my predecessors, I would like you to analyze how complex system you are bulding and how many environmentally different clients such system would have. I mean, if there would be other applications, written in different technologies than Java involved in it. If it is so, the best solution is JAX-WS. Web services are standarized and can be used among various evironments, not only Java EE. But if you are going to build some very specific system used only by your applications, RMI should be enough.

what is a good java framework for building server applications? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to code a server daemon application that provides some backend functionality. I'd like to stick to Java since I'm pretty familiar with this language and I figure it'd be much easier to just dig into a new framework and not a new language in parallel.
So far I found many promising frameworks, but all of them resemble somehow a webserver. Thing is, I don't want to code a web-application in terms of web-sites so I doubt that I'll need all the webserver-functionality such as templates and this stuff.
What would be a good suggestion for this purpose or would using a regular web-framework such as "play" without the template-stuff be the best choice?
JAX-WS is a standard for creating SOAP web services. Wikipedia link to see what it is about.
For RESTful you would need to make http requests, usually get and post and this type of service works best if you develop a website. From what I understand you don't want this, but still if ever just check the spring framework.
Raw TCP/IP is so much harder and unless you know exactly what you want (performance and optimization wise) you`re better off using a framework.
A webserver is used to implement webservices. A webserver may serve more than html to clients.
I have a personal "stack" using for a long time that is Jetty + RESTEasy and it serves no html at all (only XML and Json).
Javascript + Rest (Glassfish + Jersey for rest). Glassfish – Java EE Full profile certified reference application server (server will used for REST host).

Categories

Resources