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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:55:42+00:00 2026-05-26T01:55:42+00:00

I’m trying to get a simple Spring.NET webservice working with MVC3 but although there

  • 0

I’m trying to get a simple Spring.NET webservice working with MVC3 but although there are no errors, and I can see from the logs that Spring is deploying it, I can’t htt the correct URL for my web service at all.

I think I’ve followed the example (that comes with Spring.NET) correctly. Mine differs in that I’m not doing any AOP weaving on my service. As far as I can tell, it should work…. but doesn’t.

Here’s my service class (very basic)

public interface IHelloService
{
    string SayHello();
}

public class HelloService : IHelloService
{
    public String SayHello()
    {
        return "Hello";
    }
}

And here’s my config

<!-- Web services -->
<object id="HelloService" type="Munch.Service.Web.HelloService, Munch.Service"/>

<!-- Exports contact service (weaved or not) as a web service. -->
<object id="HelloWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
  <property name="TargetName" value="HelloService"/>
  <property name="Namespace" value="http://Munch.Service.Web/HelloService"/>
  <property name="Description" value="Hello Web Services"/>
  <property name="TypeAttributes">
    <list>
      <object type="System.Web.Script.Services.ScriptServiceAttribute, System.Web.Extensions"/>
    </list>
  </property>
</object>

I would expect to be able to access my web service at something like http://localhost:8080/Munch/HelloWebService.asmx but no joy with any of the variations I have tried. Is there a way to find out what web services have been deployed (some debug page perhaps)?

The example that comes with Spring does actually work(!) so I know it’s possible to get a working Spring WS on my machine, I just can’t see where I’ve gone wrong.

  • 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-05-26T01:55:42+00:00Added an answer on May 26, 2026 at 1:55 am

    I was able to use to publish your HelloService in the spring.net Spring.Mvc3QuickStart that ships with spring.net 1.3.2.

    These were the things I had to do to get it to work:

    1. Add the service configuration to the spring.net mvc context
    2. Add all asmx resources to routes.IgnoreRoute
    3. Add the Spring.Web.Services.WebServiceHandlerFactory from Spring.Web, as bbaia had commented on your question

    I suspect you’ve forgotten to add all asmx resources to routes.IgnoreRoute.

    Step-by-step

    Start with the Spring.Mvc3QuickStart example application that ships with Spring.Net 1.3.2.

    Reference the project that contains the HelloService class from your question.

    Add a file ~/Config/services.xml to the project, containing your service configuration:

    <object id="HelloService" type="Munch.Service.Web.HelloService, Munch.Service"/>
    
    <object id="HelloWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
      <property name="TargetName" value="HelloService"/>
      <property name="Namespace" value="http://Munch.Service.Web/HelloService"/>
      <property name="Description" value="Hello Web Services"/>
      <property name="TypeAttributes">
        <list>
          <object type="System.Web.Script.Services.ScriptServiceAttribute, System.Web.Extensions"/>
        </list>
      </property>
    </object>
    

    In Global.asax, add

    routes.IgnoreRoute("{resource}.asmx/{*pathInfo}");
    

    to RegisterRoutes. This will tell the asp.net mvc handler to leave requests to asmx resources alone.

    In web.config, add the following http handler:

    <system.web>
      <!-- ... -->
      <httpHandlers>
        <add verb="*" path="*.asmx" type="Spring.Web.Services.WebServiceHandlerFactory, Spring.Web" />
      </httpHandlers>
      <!-- ... -->
    

    In web.config, add your service configuration to the spring context:

    <spring>
      <context>
        <resource uri="file://~/Config/controllers.xml" />
        <resource uri="file://~/Config/services.xml" />
      </context>
    </spring>
    

    When you run the application from Visual Studio, you should be able to view the service at http://localhost:12345/HelloWebService.asmx (replace 12345 with you dev port).

    Notes

    I’m unfamiliar with asp.net-mvc, so there might be better ways to configure it than I’ve suggested.

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.