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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:00:45+00:00 2026-05-27T22:00:45+00:00

I’m trying to make a sample SOAP web service using Spring-WS and JAXB and

  • 0

I’m trying to make a sample SOAP web service using Spring-WS and JAXB and I have an ugly exception and I can’t figure it out why.

I’m using jetty as a server with the following configuration:

enter image description here

When I access the wsdl from a browser with the address: http://localhost:8080/loginService/loginService.wsdl I can see the wsdl. The interesting thing is that if I write an address like http://localhost:8080/loginService/asdasdasd/loginService.wsdl it works too.

But when I’m making a request with soapUI, I get a stacktrace:

2012-01-05 13:07:30.010::WARN:  /loginService/
java.lang.AbstractMethodError: org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping.getLookupKeyForMessage(Lorg/springframework/ws/context/MessageContext;)Ljava/lang/Object;
    at org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping.getEndpointInternal(AbstractMethodEndpointMapping.java:55)
    at org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping.getEndpoint(AbstractEndpointMapping.java:117)
    at org.springframework.ws.server.MessageDispatcher.getEndpoint(MessageDispatcher.java:256)
    at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:210)
    at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:172)
    at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
    at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
    at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:222)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Here is the LoginEndpoint:

public class LoginEndpoint {

    private static final String NAMESPACE = "http://www.asd.eu/knowlEDGE/loginService";
    private static final String LOGIN_REQUEST = "login-request";

    @PayloadRoot(localPart = LOGIN_REQUEST, namespace = NAMESPACE)
    public LoginResponse getUser(LoginRequest request) {
        LoginResponse response = new LoginResponse();
        response.setPassword("my_secret_password");
        return response;
    }

}

This is the .xsd file:

<xsd:schema 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.asd.eu/knowlEDGE"  
    targetNamespace="http://www.asd.eu/knowlEDGE/loginService"
    elementFormDefault="qualified">
    <!-- xmlns - Address of our schema -->
    <!-- targetNamespace - Address of our service. Adding .wsdl at the end gives the wsdl. It has to be the same with the namespace from PayloadRoot -->
    <!-- elementFormDefault="qualified" - all the local defined elements are associated just to this namespace -->

    <!-- Login Request Definition -->
    <xsd:element name="login-request"> <!-- It has to be the same with the localpart from PayloadRoot -->
        <xsd:complexType>
            <xsd:attribute name="username" type="xsd:string" />
        </xsd:complexType>
    </xsd:element>

    <!-- Login Response Definition -->
    <xsd:element name="login-response">
        <xsd:complexType>
            <xsd:attribute name="password" type="xsd:string" />
        </xsd:complexType>
    </xsd:element>

</xsd:schema>

This is the spring-ws-context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
                xmlns:context="http://www.springframework.org/schema/context"
                xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context.xsd">

    <context:annotation-config/>

    <context:component-scan base-package="eu.asd.knowlEDGE.service.endpoint" />

    <!-- MARSHALLER DEFINITION -->
    <!-- the package where the sources will be generated, given the namespace -->
    <bean id="knowledge.marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller" 
        p:contextPath="eu.asd.knowledge.loginservice">
    </bean>

    <!-- ENABLE OXM MARSHALLING -->
    <bean class="org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter">
        <description>Enables the MessageDispatchServlet to invoke methods requiring OXM marshalling.</description>
        <property name="marshaller" ref="knowledge.marshaller" />
        <property name="unmarshaller" ref="knowledge.marshaller" />
    </bean>

    <!-- ENDPOINT DEFINITION -->
    <bean id="loginService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" 
        p:requestSuffix="-request" p:responseSuffix="-response" >  
        <property name="schemaCollection" ref="schemaCollection" />
        <property name="portTypeName" value="LoginService"/>                                
        <property name="locationUri" value="loginService"/>     
    </bean>

    <!-- here I set the xsd files to generate the wsdl -->
    <bean id="schemaCollection"
        class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
        <property name="xsds">
            <list>
                <value>classpath:login-service.xsd</value>
            </list>
        </property>
    </bean>


    <!-- EXCEPTION RESOLVER -->
    <!-- bean id="exceptionResolver" class="ro.isdc.weather.service.exception.WeatherExceptionResolver">
    </bean-->

    <!-- ENDPOINT MAPPING INTERCEPTOR -->
    <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
        <property name="interceptors">
            <list>
                <!-- ref bean="wsSecurityInterceptor" /-->
                <ref local="schemaInterceptor"/>
            </list>
        </property>
    </bean>

    <!-- SCHEMA INTERCEPTOR -->
    <bean id="schemaInterceptor" class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
        <property name="schema" value="classpath:login-service.xsd"/>
        <property name="validateRequest" value="true"/>
    </bean>

    <!-- SECURITY INTERCEPTOR -->
    <bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
      <property name="validationActions" value="UsernameToken" />
      <property name="validationCallbackHandler" ref="callbackHandler" />
    </bean>

<!--    CALLBACK HANDLER -->
    <bean id="callbackHandler" class="org.springframework.ws.soap.security.wss4j.callback.SimplePasswordValidationCallbackHandler">
      <property name="users">
        <props>
          <prop key="user1">passwd1</prop>
          <prop key="user2">passwd2</prop>
        </props>
      </property>
    </bean>


</beans>

This is the web.xml file:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
    <display-name>SOAP Web Service</display-name>
    <servlet>
        <servlet-name>spring-ws</servlet-name>
        <servlet-class>
            org.springframework.ws.transport.http.MessageDispatcherServlet
        </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:/spring-ws-context.xml</param-value>
        </init-param>

    </servlet>
    <servlet-mapping>
        <servlet-name>spring-ws</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>

Thank you very much!

  • 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-27T22:00:47+00:00Added an answer on May 27, 2026 at 10:00 pm

    Your LoginEndpoint should be annotated with @EndPoint annotation, with this entry in the configuration for it to be configured as an endpoint:

     <sws:annotation-driven />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.