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 8679113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:53:23+00:00 2026-06-12T20:53:23+00:00

We have a Spring 3 MVC webapplication, and we are trying to expand it

  • 0

We have a Spring 3 MVC webapplication, and we are trying to expand it with Web Services.

I have now tried with JAX-WS Web-services, annotating WebService and WebMethod on the appropriate places.
I do have a dispatcher mapped in my web.xml. This is the standard spring DispatcherServlet. And its config: dispatcher-servlet.xml is working perfectly fine for the MVC stuff.

The problem comes when I try to expose the WebServices. I do this by adding the following bean to the dispatcher-servlet.xml:

<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
    <property name="baseAddress" value="http://localhost:8080/service/" />
</bean>

If this bean is added. Then the WebServices works perfectly, but all the MVC stuff stops working.

So my second try was to create 2 dispatchers. One named mvc-dispatcher and one webservice-dispatcher. Each of them mapped to respectivly /mvc and /ws. And then put only the SimpleJaxWsServiceExporter in the webservice-config and only the standard MVC stuff in the other one.
But still the same problems.
I can only get the MVC to work if I disable/comment-out the web-service dispatcher.

I cant belive this is supposed to be so complicated… What am I not getting?

Any help would be greatly appriciated.
I cant find any decent tutorials doing JAX-WS and spring 3 MVC…

Thanks in advance!

  • 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-12T20:53:25+00:00Added an answer on June 12, 2026 at 8:53 pm

    I’m assuming by dispatcher you mean a spring dispatcher, I’d recommend against that. Just have the JAX-WS be a different servlet on it’s own, i.e.

    https://cxf.apache.org/docs/a-simple-jax-ws-service.html

    Then if you need to allow Spring beans to be injected extend SpringBeanAutowiringSupport as in this example.

    How to make an @WebService spring aware

    Hope this helps!

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

Sidebar

Related Questions

I'm trying to write a web application using Spring MVC. I have a configuration
I have a Spring MVC web application which provides RESTful web services via a
I have a localized spring mvc based web application, that has an externalized messages
I'm creating a web application using spring mvc. I have started to incorporate the
I am new to Spring MVC . I have a web application. I have
I have a Spring MVC application trying to use a rich domain model, with
I have a Spring Web MVC application that I'd like to serve a large,
I have a forum like web application written in Asp.net MVC. I'm trying to
I have a Spring MVC web application with the following in web.xml: <filter> <filter-name>foo</filter-name>
i am trying to create and run a simple Spring 3.1 mvc web application

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.