<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Spring 3 RESTful Web Services</title>
	<atom:link href="http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/</link>
	<description>Eggsylife</description>
	<lastBuildDate>Tue, 07 Sep 2010 16:27:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-123</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 05 Aug 2010 08:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-123</guid>
		<description>@Indian

Hi there,

Sorry for the late reply I have been away.

If you are sending your request as HTML you can convert this to a Java bean in your controller using Spring&#039;s message conversion

See:

&lt;a href=&quot;http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion&quot; rel=&quot;nofollow&quot;&gt;http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>@Indian</p>
<p>Hi there,</p>
<p>Sorry for the late reply I have been away.</p>
<p>If you are sending your request as HTML you can convert this to a Java bean in your controller using Spring&#8217;s message conversion</p>
<p>See:</p>
<p><a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion" rel="nofollow">http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Indian</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-122</link>
		<dc:creator>Indian</dc:creator>
		<pubDate>Mon, 26 Jul 2010 18:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-122</guid>
		<description>Hi all,
I am developing a restful web service using spring 3.0 . And  I am a newbee in this.
I am using RAD to develop it n wfetch for testing the web service and I have not used maven.
I pass my inputs through a request xml and this [B]request xml[/B] is sent as the body of POST method. 
My problem is the I am not able to retrieve the data that I have passed through the [B]request xml[/B] in the controller class.
Basically I am not able to process any datacoming from request as the POST message body.....

Please help... any suggestions welcome.... 
thanks in advance........</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
I am developing a restful web service using spring 3.0 . And  I am a newbee in this.<br />
I am using RAD to develop it n wfetch for testing the web service and I have not used maven.<br />
I pass my inputs through a request xml and this [B]request xml[/B] is sent as the body of POST method.<br />
My problem is the I am not able to retrieve the data that I have passed through the [B]request xml[/B] in the controller class.<br />
Basically I am not able to process any datacoming from request as the POST message body&#8230;..</p>
<p>Please help&#8230; any suggestions welcome&#8230;.<br />
thanks in advance&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-89</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 22 Feb 2010 13:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-89</guid>
		<description>@Stephen

In that case you could simply write to the response stream and set the response type like so:

&lt;pre lang=&quot;Java&quot;&gt;
@RequestMapping(method=RequestMethod.GET)
public void myControllerMethod( HttpServletResponse response) {
PrintWriter out = response.getWriter();
out.println(yourXMLHere);
response.setContentType(&quot;application/xml&quot;);
out.close();
}
&lt;/pre&gt;

The HttpServletResponse object is another parameter Spring request mapped methods can use within their signature.

Would that help?

Eggsy</description>
		<content:encoded><![CDATA[<p>@Stephen</p>
<p>In that case you could simply write to the response stream and set the response type like so:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@RequestMapping<span style="color: #009900;">&#40;</span>method<span style="color: #339933;">=</span>RequestMethod.<span style="color: #006633;">GET</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> myControllerMethod<span style="color: #009900;">&#40;</span> HttpServletResponse response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003399;">PrintWriter</span> out <span style="color: #339933;">=</span> response.<span style="color: #006633;">getWriter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
out.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>yourXMLHere<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
out.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The HttpServletResponse object is another parameter Spring request mapped methods can use within their signature.</p>
<p>Would that help?</p>
<p>Eggsy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Lang</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-86</link>
		<dc:creator>Stephen Lang</dc:creator>
		<pubDate>Fri, 19 Feb 2010 21:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-86</guid>
		<description>Yes, the requirement is to Post/Put xml to the controller and return xml as the response body. The StringHttpMessageConverter would work fine to extract the posted xml. Then I just need to return a simple xml back in the response body that is where I am stuck. I do not need the Jaxb2Marshaller because I do not have an object unmarshall.</description>
		<content:encoded><![CDATA[<p>Yes, the requirement is to Post/Put xml to the controller and return xml as the response body. The StringHttpMessageConverter would work fine to extract the posted xml. Then I just need to return a simple xml back in the response body that is where I am stuck. I do not need the Jaxb2Marshaller because I do not have an object unmarshall.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-85</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 19 Feb 2010 09:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-85</guid>
		<description>Hi Stephen,

Is your requirement to Post/Put XML to a Spring controller?

If so Spring providers Message converters:

&lt;a href=&quot;http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Message Conversion&lt;/a&gt;

Eggsy</description>
		<content:encoded><![CDATA[<p>Hi Stephen,</p>
<p>Is your requirement to Post/Put XML to a Spring controller?</p>
<p>If so Spring providers Message converters:</p>
<p><a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#rest-message-conversion" target="_blank" rel="nofollow">Message Conversion</a></p>
<p>Eggsy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Lang</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-84</link>
		<dc:creator>Stephen Lang</dc:creator>
		<pubDate>Fri, 19 Feb 2010 00:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-84</guid>
		<description>This is so very cool. Works like a charm. Same url can serve both html/text and xml/text. 
Question if I have a service which generates xml already, what viewResolver I should use instead of the MarshallingView?</description>
		<content:encoded><![CDATA[<p>This is so very cool. Works like a charm. Same url can serve both html/text and xml/text.<br />
Question if I have a service which generates xml already, what viewResolver I should use instead of the MarshallingView?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Java Spring 3 RESTful Web Service &#171; MINSIKZZANG IN PARIS</title>
		<link>http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/comment-page-1/#comment-57</link>
		<dc:creator>Java Spring 3 RESTful Web Service &#171; MINSIKZZANG IN PARIS</dc:creator>
		<pubDate>Tue, 19 Jan 2010 07:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=204#comment-57</guid>
		<description>[...] http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/" rel="nofollow">http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
