• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring WebApplicationContext Question

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings everybody!

I'm writing a class that will be called via SOAP by a vendor of ours. Using Spring, I was able to get the WebApplicationContext from the HttpServletRequest in my test servlet. However, when my component is called by our vendor, it will be a SOAP call (not servlet). How can I determine the context without using a servlet, and without using HttpServletRequest? Or, can I use HttpServletRequest in classes that do not behave as servlets?
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you give us more background on what your server side code will be like? And how the client code will be invoking your server side code?

Thanks.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey there...

I'm actually the person who wrote the question. I signed up at work but gave JavaRanch my home email address. We're not allowed to check our home email at work, so I asked a co-worker if I could post my question under her name until I was able to login later.

Since my post I was able to figure out a solution. Talking to some other programmers at work who are more familiar with Spring, they recommended using "BeanFactory". Using that I was able to pull in the spring context xml file, and then loading up the bean.

Previously, I had been given an example where the bean is loaded based off an attribute sent in the servlet request object. And being rather new to the whole Java world, it's still a bit uncomfortable for me to stray from the examples I'm given.

Thanks for your reply, but I'm good to go now!
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice to hear that you already found a solution.

But more importantly, thanks for sharing it with us.
 
reply
    Bookmark Topic Watch Topic
  • New Topic