Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newbie question: one war with two interfaces

 
marzio logiudice
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I've just started working with webservices. I've got an existing project, implementing a webservice interface (e.g. Service1) with the following methods: method1, method2, method3.

I need to create a second interface Service2 and move method2 and method3 to it, while Service1 will still expose method1.

How can i have both interfaces in the same war file? I've tried to create the second one, but can't get the correct wsdl.

Any help/suggestion/hint?
Thanks
 
marzio logiudice
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words, I would like to deploy one war file, but access two different web interfaces:

http://myaddress/Service1
http://myaddress/Service2

according to the needs.
Is it possible?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, its possible.
In one war you can publish more than one webservices.
If you were able to publish Service1 webservice with method1-2-3, you should be do the same with Service2 wewbserivce with method 2-3 alone.

Please let us to know what webservice plugin you are using, like aixs or jwsdp etc ? This will help to reply clearly.
 
marzio logiudice
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said I'm kind of new in this area.

I guess the plugin is XFire, the service is based on the Spring framework and Hibernate for persistence.

I need to publish two interfaces because the persistence layer can remain the same (each service will access the db and does not need to interact with the other)

Thanks for your guidance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic