-2

I am new to webservices and just wanted to know the importance of SOAP-webservices. I tried looking for answer on the web but didint got any proper answer. I am a spring developer and curious to understand Spring support on webservices (@WebService annotation) I am aware about Spring annotation @Service. So what advantage we get when we use @WebService annotation. As per my understanding webservices are used to expose your service method or business logic to outside world so that any one can invoke it and get the service. But I want to know that when one should @Service annotation and when to use @Webservice annotation. Means which services can be exposed to outside world.

One advantage which I think using webservices is our View and controller layer can really remain less dependent on service layer if we use webservice. Anytime we are unhappy with view and controller we can change them and still use our good old business webservices.Am I correct? If my understanding is correct then I have one more question here then How can I prevent unauthorize access to my webservices? since anyone can invoke a webservice..

Kindly forgive

if I have asked too many question.

Need help as I am a newbie.

Bhavik Ambani
  • 6,464
  • 14
  • 53
  • 86
Rajesh
  • 2,822
  • 8
  • 41
  • 68
  • 1
    Personally, I would break this question into multiple parts. It is broad enough to write an essay and probably it would get very subjective to some extent. – Alessandro Santini Dec 19 '12 at 07:04

2 Answers2

0

Did you look here and here and finally here?

Specifcally about spring: refer this.

Community
  • 1
  • 1
Azodious
  • 13,563
  • 1
  • 33
  • 68
0

1) The Spring Reference Documentation (19.5.6 Exporting standalone web services using JAX-WS) is clear about the @WebService annotation:

Spring's SimpleJaxWsServiceExporter detects all @WebService annotated beans in the Spring application context, exporting them through the default JAX-WS server (the JDK 1.6 HTTP server).

So if you annotate your class only with @Service it will not get exported.

2) You are right about the separation of Service and WebService.

Ralph
  • 115,440
  • 53
  • 279
  • 370