• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

using XStreamMarshaller with restTemplate

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am trying to call a webservice using restTemplate.getForObject method. Following is the response that I am getting by this webservice:-
<orders>
<order>
<confirmationId>50001</confirmationId>
........
......
</order>
<order>
<confirmationId>52000</confirmationId>
......
.....
</order>
</orders>

I need to use addImplicitCollection method of xstream but i do not know how to use this in spring configuration. Following is my configuraion:-
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<constructor-arg ref="httpClientFactory"/>
<property name="messageConverters">
<list>
<bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">

<constructor-arg>
<bean class="org.springframework.oxm.xstream.XStreamMarshaller">

<property name="aliases">
<props>
<prop key="orders">com.entertainment.epintegration.webservice.model.CPCFulfillmentModel</prop>
<prop key="order">com.entertainment.epintegration.webservice.model.CPCOrderFulfillmentModel</prop>
</props>
</property>
</bean>
</constructor-arg>
</bean>
</list>
</property>
</bean>

Can any one please help me to understand how to use addImplicitCollection in above configuration?


Thanks
Venkatesh Pendharkar
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing same problem... do you have a solution yet?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't read your XML, where are your CODE tags to keep the indentation???

Thanks

Mark
 
Rod Silva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did anyone find a solution this problem? Please advise. Thank you.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic