Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9240091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:07:46+00:00 2026-06-18T08:07:46+00:00

I want to use spring web-scoped beans in web-service written on AXIS2 framework. How

  • 0

I want to use spring web-scoped beans in web-service written on AXIS2 framework.
How to configure it?
Axis2 and Spring documentation disagree with each other.

Axis2 documentation says:

For the purpose of this example, we'll configure Spring via a WAR file's web.xml. Let's add a context-param and a listener:
<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

Spring documentation says:

When using a Servlet 2.4+ web container, with requests processed outside of Spring's DispatcherServlet (e.g. when using JSF or Struts), you need to add the following javax.servlet.ServletRequestListener to the declarations in your web application's 'web.xml' file.
<web-app>
  ...
  <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  </listener>
  ...
</web-app>

When I use Axis2-recommended ContextLoaderListener with Spring web-scoped beans I got on deploy

java.lang.IllegalStateException: No thread-bound request found: Are
you referring to request attributes outside of an actual web request,
or processing a request outside of the originally receiving thread? If
you are actually operating within a web request and still receive this
message, your code is probably running outside of
DispatcherServlet/DispatcherPortlet: In this case, use
RequestContextListener or RequestContextFilter to expose the current
request.

When I use Spring-recommeded RequestContextListener I got running Web-service with fault on requests:

        <faultstring>The SERVICE_OBJECT_SUPPLIER parameter is not specified.</faultstring>

In other words: how to configure AXIS2 with Spring and RequestContextListener?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:07:48+00:00Added an answer on June 18, 2026 at 8:07 am

    No such functionality in AXIS2. See request https://issues.apache.org/jira/browse/AXIS2-5467 “Extend Spring support to accept web-scoped beans” for detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use two different Spring web contexts , each have own contextConfig,
I want to create a web app that will use wicket, hibernate and spring
I want to use Spring 3 for validation. In the reference documentation, section 6.2
I want to use @PreAuthorize annotation on service methods with Spring Security. One of
I want to use both ContextLoaderListener (so that I can pass Spring Beans to
Is there a way to use my SOAP web service(spring-ws, java) as a XML
So I'm using Spring Web Flow on a project and want to make use
i currently build an application use spring as framework. and i want to test
I want to use my Spring Beans in my JSF application, letting Spring inject
I want to use multiple view resolvers in my web app based on spring

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.