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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:05:19+00:00 2026-05-28T06:05:19+00:00

I am trying to use JAXB 2 and spring-ws 2.0.3 to make a SOAP

  • 0

I am trying to use JAXB 2 and spring-ws 2.0.3 to make a SOAP service on glassfish 3.

I am having some problems with the xml file configurations because there is a ton of information (tutorials, examples) about getting older versions of these packages running but not much on the newer versions.

I have succesfully gotten client/server programs working through the httpInvokerProxy remoting service, but the amount of configuration required in these files is substantially more.

Essentially I used the xjc maven tool to create java classes out of my xml schema and the spring-ws annotations @PayloadRoot, @EndPoint, and @ResponsePayload to mark the methods in my endpoint java class. I am just trying to be sure that my wsdl file is available at the correct URL and that soap requests are being accepted and the responses delivered.

If someone could recommend a good place to get this information or have the heart to look through my 3 xml files I would be very greatful. Otherwise, here is the error I am getting when going to the root servlet directory after uploading the war file.

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.converter.ConverterRegistry.addConverter(Ljava/lang/Class;Ljava/lang/Class;Lorg/springframework/core/convert/converter/Converter

My xml files are as follows:

web.xml

    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">

    <display-name>Licensing SOAP Service</display-name>

    <servlet>
        <servlet-name>licensingSOAPService</servlet-name>
        <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>licensingSOAPService</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

</web-app>

licensingSOAPService-servlet.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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

    <import resource-"/applicationContext.xml"/>

    <bean id = "licensingSOAPService" class="mypackage.soap.LicensingSOAPService">
    </bean>

    <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
        <description>An endpoint mapping strategy that looks for @Endpoint and @PayloadRoot annotations.</description>
    </bean>

    <bean class="org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter">
        <description>Enables the MessageDispatchServlet to invoke methods requiring OXM marshalling.</description>
        <constructor-arg ref="marshaller"/>
    </bean>

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"
          p:contextPath="mypackage.schemas" />


    <bean id = "licensingWSDL" class ="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
        <property name = "schema" ref = "schema">
        <property name = "portTypeName" value = "licenseResource"/>
        <property name = "locationUri" value ="/licensing/schema/" />
        <property name = "targetNamespace" value = "mypackage/schemas" />
    </bean>

    <bean id ="schema" class ="org.springframework.xml.xsd.SimpleXsdSchema">
        <property name ="xsd" value = "/licenseSchema.xsd"/>
    </bean>

</beans>

applicationContext.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:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd">

<sws:annotation-driven />

<context:component-scan base-package="mypackagel.licensing"/>  
</beans>

Does anybody see anything blatantly wrong with these?

EDIT:

Wanted to include dependency part of my pom.xml as it was pointed out (correctly so) that I have both spring 3.1 AND spring 3.5 jars in my war file.

<repositories>
        <repository> 
            <id>com.springsource.repository.bundles.release</id> 
            <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> 
            <url>http://repository.springsource.com/maven/bundles/release</url> 
        </repository>
        <repository>
          <id>maven2-repository.dev.java.net</id>
          <name>Java.net Repository for Maven</name>
          <url>http://download.java.net/maven/2/</url>
          <layout>default</layout>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>  
            <groupId>com.sun.xml.messaging.saaj</groupId>  
            <artifactId>saaj-impl</artifactId>  
            <version>1.3</version>  
            <scope>runtime</scope>  
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-core</artifactId>
            <version>2.0.3.RELEASE</version>
        </dependency>
        <dependency>  
            <groupId>javax.xml.bind</groupId>  
            <artifactId>jaxb-api</artifactId>  
            <version>2.0</version>  
        </dependency>  
        <dependency>  
            <groupId>com.sun.xml.bind</groupId>  
            <artifactId>jaxb-impl</artifactId>  
            <version>2.0.3</version>  
        </dependency>  
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>3.1.0.RELEASE</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>LicensingSOAPService</finalName>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
  • 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-28T06:05:20+00:00Added an answer on May 28, 2026 at 6:05 am

    The exception message refers to the method

    ConverterRegistry.addConverter(Class, Class, Converter)
    

    This method was only introduced in Spring 3.1 (see javadoc), so something in your setup is assuming the presence of Spring 3.1, but you seem to be running 3.0.

    You need to upgrade Spring to 3.1

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

Sidebar

Related Questions

I'm trying to use Jaxb in order to unamrshal an xml file. for some
I'm trying to use JAXB to pull some elements from a large XML file
I'm trying to use JAXB to unmashall some XML which I used xjc to
I'm trying to use JAXB to unmarshall some XML, but I'm getting an Unable
I am trying to use JAXB's introspection to marshall and unmashall some existing domain
I'm trying to use resteasy to serve out some entities fetched by spring-hibernate. I've
I have some problem while trying to use the schemagen tool from JAXB library
I am trying to use JAXB to parse the following XML . I removed
I'm trying to use JAXB to unmarshal this file into Java objects. I know
I am trying to use Eclipselink's MOXy. I put jaxb.properties file in the same

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.