-
1. Need to Transform input request parameters to XML using smooks.?
tfennelly Apr 11, 2011 6:27 AM (in response to shwetanks)Check out the smooks user guide and examples at smooks.com. You could also implement a simple FreeMarker action that applies a FreeMarker template to your Java object model.
-
2. Need to Transform input request parameters to XML using smooks.?
shwetanks Apr 11, 2011 7:23 AM (in response to tfennelly)Hi Tom,
Thanks for your quick reply.
I got your point that you are saying something like
<![CDATA[<line-item>
<product><xsl:value-of select="./Product/@productId" /></product>
<price><xsl:value-of select="./Product/@price" /></price>
<quantity><xsl:value-of select="@quantity" /></quantity>
</line-item>]]>
But my input is not an XML, it is a post request with say 3 parameters param1,param2 and param3
So the request would come like
http://localhost:8080/http?param1=value1¶m2=value2¶m3=value3
Now I want to transfer it like
<request>
<param1>value1</param1>
<param2>value2</param2>
<param3>value3</param3>
</request>
I can implement it using custom java code, but I wanted to give it a try using Smooks.
So, is it possible using smooks configurations.
One more questions,
I googled for FreeMarker action you have mentioned above, but couldn't found any. Can you please share some more details over that?
Thanks & Regards,
Shwetank