This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Axis2 WebService Using Spring

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web service package called 'TestService.aar' deployed in 'axis2.war/WEB-INF/services'. Each web-method of my service has following code;



Currently as you can see, I am creating an object of a ServiceFactory class (present under axis2.war/WEB-INF/lib directory as an independent JAR) in each web-method which can be re-factored and improved. Following are my options;

1) One way is to make my 'ServiceFactory' instance static (singleton) and all will use single instance. (Not recommended as my code will run in an Application Server like jBoss, WAS, WL and GS and it can cause problems)
2) The other way is to introduce Spring and make my WebSerice class springaware. I followed the instructions under 'Wihtout ServletContext' part of the link http://axis.apache.org/axis2/java/core/docs/spring.html but I am unable to implement it successfully.

Can some provide me a simple example from which I can achieve my target. I just want all my services deployed as '*.aar' within axis2.war to access my ServiceFactory class which is deployed as 'jar' in 'axis2/WEB-INF/lib'.

Your comments and help will be appreciated,

Thanks

--

SJunejo

 
Sheeraz Junejo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any luck?
 
Villains always have antidotes. They're funny that way. Here's an antidote disquised as a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!