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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:14:29+00:00 2026-05-28T03:14:29+00:00

I have a problem accessing a REST service with the RestTemplate. I’ve already managed

  • 0

I have a problem accessing a REST service with the RestTemplate. I’ve already managed to user the MarshallingConverter to access one other service, and everything worked fine. I have copied this functionality and generated Model classes from the XSD schema I’ve received. However I get an exception that no suitable converter was found. Here is my configuration (I am using Spring 3.0.6 in connection with Vaadin if that matters):

<bean id="marshallingConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
    <property name="marshaller" ref="jaxbMarshaller" />
    <property name="unmarshaller" ref="jaxbMarshaller" />
</bean>

<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    <property name="classesToBeBound">
        <list>
            ... here are my model classes ...
        </list>
    </property>
</bean>

<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
    <property name="messageConverters">
        <list>
            <ref bean="marshallingConverter" />
        </list>
    </property>
</bean>

The RestTemplate is autowired in my service client class implementation. What am I missing here? I have checked the response and the content type is set to application/xml and the model classes were autogenerated, so the configuration should be right. Thanks for any help.

  • 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-28T03:14:30+00:00Added an answer on May 28, 2026 at 3:14 am

    So I’ve made this work. The part of the problem was, that the generated classes were missing XmlRootElement annotation. More about it here. So I’ve added the XJC annotation to the XSD schema and generated the classes again with:

    xjc -extension /path/to/schema
    

    After that everything has worked(or at least I didn’t get any exception processing the XML), but the elements from inside the root element were not unmarshallised and I got only the XMLElement implpementation from the parser. The problem was (this was specific for my project), that the element definition used xs:anyType as the element type, which cannot be parsed. After I’ve changed it to the right element type, everything worked like charm.

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

Sidebar

Related Questions

I have a problem accessing an intranet website with IE8. I can access the
I have a problem accessing JSON data. I'm new to JSON and jquery so
I am building my first ASP.Net MVC based app and have a problem accessing
i have problem with libhid . i found that there 2 way 4 accessing
I am having a problem accessing the ViewData object through javascript. I have set
I'm quite new to JS and jQuery. I have a problem accessing the properties
I have have a problem loading and accessing data from a value object in
I have a problem wit the software I'm working on. We are accessing Windows
I have a problem which seems very similar to the one described in http://markmail.org/message/6rlrzkgyx3pspmnf
I have problem with accessing Facebook graph. I am using a Greasemonkey script. When

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.