Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Real Time Projects usage in SOAP webservices  RSS feed

 
Tanishka chandrasekaran
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Iam new to Java Web services world. I Have read about SOAP and WSDL and gone through examples to understand it by concept wise.
But can someone help me understand why one prefers using the web services ? Cant we acheive the same functionality using normal java classes?
Also it will be greatful if someone can share the real time experience with webservices and its usage?

Please help.

 
sachin naikwadi
Greenhorn
Posts: 7
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
go through below url, you will find all relevant information

http://javapostsforlearning.blogspot.in/2013/03/soap-web-service-tutorial.html
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
meenakshi chandrasekaran wrote:But can someone help me understand why one prefers using the web services ? Cant we acheive the same functionality using normal java classes?

What do you mean by "normal Java class"? WS are implemented using Java classes - which happen to have some annotations that WS-enables them (assuming the JAX-WS or JAX-RS API are used). Where do you see the difference?
 
Tanishka chandrasekaran
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I mean what is the purpose of webservices .. Can someone help me with real time examples..
Iam able to understand the concept and not able to map to real world scenraio and its usage.
Can someone help me with examples?

 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you write your code, you try and make it modular and re-usuable. So, lets say you write such a component ("a unit of work") for project A and it is successfully integrated and supported by a set of integration/unit tests. Job done for project A.

Now, imagine that project comes along, project B and wishes to perform the same unit of work that you wrote for project A. Would you simply copy the code from project A to project B? I hope not. Wouldn't it be nice if this project could simply call your original component and ask it to perform the unit of work for them in a simple and standardised manner. Wouldn't it be even better if the new system didn't have to worry about compatibility issues with your component, as long as it adhered to an agreed contract (the WSDL for your web service). Wouldn't it be nice if you could use existing resources to call this component (local network or internet).

Hopefully, this gives you an idea about the benefits of web services. Once you have covered SOAP, you may also want to look at REST which is the preferred choice of web service these days.
 
Sujeeth Pakala
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,

Explained very well.

I like to add some strength to your below point

Wouldn't it be even better if the new system didn't have to worry about compatibility issues with your component


A well standard service contract must not have compatibility issues or any type of data transformation. Key is to eliminate data transformations. This helps to achieve one of the strategic goal of SOA "Intrinsic Interoperability"

 
Tanishka chandrasekaran
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the above reply James. This really helps.
Is it possible for you to provide a real time examples if you used any in your projects.
Just wanted to understand in real time scenario.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you mean by real time there.

Anyway, the last project I worked with SOAP was a central repository for the police to collate data about road traffic accidents - data such as number of vehicles involved, driver details, weather conditions and witness statements. We developed web services that allowed the police to create, update and report on the data via a GUI and a mobile app.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!