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

  • Home
  • SEARCH
  • 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 8118637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:33:04+00:00 2026-06-06T04:33:04+00:00

I have used Spring OXM and JiBX in my application. below is my Spring

  • 0

I have used Spring OXM and JiBX in my application.

below is my Spring Config file

<context:component-scan base-package="com.controller"/>

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

<oxm:jibx-marshaller target-class="com.request.RequestClass" id="rqMarshaller"/>
<oxm:jibx-marshaller target-class="com.response.ResponseClass" id="rsMarshaller"/>

<bean id="xmlViewer" class="org.springframework.web.servlet.view.xml.MarshallingView">
    <constructor-arg ref="rsMarshaller" />
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/>

below is controller class

@Controller
public class MyController {
    @Autowired
    private JibxMarshaller rqMarshaller;

    @RequestMapping(value = "/myrequest", method = RequestMethod.POST)
    public ModelAndView searchFlights(@RequestBody String request) {
        System.out.println("Inside");
        System.out.println("request = "+request);
        Source source = new StreamSource(new StringReader(request));

        RequestClass rq = null;
        try {
            rq = (RequestClass) rqMarshaller.unmarshal(source);
        } catch (XmlMappingException e1) {
            e1.printStackTrace();
        } catch (IOException e1) {
            e1.printStackTrace();
        }

        ResponseClass e = new ResponseClass();
        e.setVersion("2.0");

        Orig ond = new Orig();
        ond.setCode("AIT");

        e.getOrig().add(ond);
        return new ModelAndView("xmlViewer","object",e);
    }
}

When i send XML request it marshaled successfully but for response i got following error message.

org.jibx.runtime.JiBXException: No marshaller defined for class com.response.ResponseClass

I have already defined marshaller for ResponseClassin spring config file.

please help. Thanks.

  • 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-06T04:33:06+00:00Added an answer on June 6, 2026 at 4:33 am

    Finally i figured out the solution !!!

    Need to specify the bindingName attribute while registering the JiBxMarshaller.

    <oxm:jibx-marshaller target-class="com.request.RequestClass" id="rqMarshaller" bindingName="rqBinding"/>
    <oxm:jibx-marshaller target-class="com.response.ResponseClass" id="rsMarshaller" bindingName="rsBinding/>
    

    and specify same name in respective binding/mapping file of JiBX.

    That’s it !

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

Sidebar

Related Questions

I have used spring framework 3 for my application. Everything is ok while developed
We have an application where we have used spring for IOC. We have the
I am writing a Spring Restful webservices application using Spring MVC. I have used
I have implemented Spring Security in my application. I have used default implementation, i.e.,
I have used spring MVC with JSP/JSTL for my previous application. I was going
I have web application, in which I have used Spring framework. For the concurrent
I have used Spring DATA JPA in my application, which is wrapper over hibernate.
I am relatively new to the Spring Framework and Spring security. I have used
I have an app that uses Spring security and BlazeDS. Flex 3.2 is used
I have a web service written in Spring MVC. It can be used by

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.