On Tue, Mar 6, 2012 at 5:47 AM, Sadeep Jayasumana <[email protected]>wrote:
> Hi Yogesh, > > On Tue, Mar 6, 2012 at 5:46 AM, Yogesh Sagar <[email protected]> wrote: > > > Hello, > > > > I did try what you suggested, but it does not seem to work. I have a very > > simple web application which basically displays an html form with a > submit > > button. I have configured synapse to act as a proxy to the actual > endpoint. > > All I am seeing is raw html appearing on the browser instead of the > > rendered html. > > > > Reason for this must be browser not receiving the correct content type > (chances are that browser receives application/xml instead of text/html). > Try setting the following properties within the outSequence of your proxy > service. > > <property name="messageType" value="text/html"/> > <property name="ContentType" value="text/html"/> > <send/> > Yeah you need to do this. Otherwise Synapse sends the application/xml as the content type. Thanks, Hiranya > > If it still doesn't work, please use a tool like TCPMon to capture the > response browser receives and inspect the content type. > > Thanks, > Sadeep > > > > Thanks, > > Yogesh > > > > On Mon, Mar 5, 2012 at 12:44 PM, Hiranya Jayathilaka > > <[email protected]>wrote: > > > > > On Mon, Mar 5, 2012 at 8:51 PM, Yogesh Sagar <[email protected]> > > wrote: > > > > > > > Hello, > > > > > > > > Is there a "text/html" content type message builder in Synapse or > > Apache > > > > Axis2?. Is there a way to write a custom message builder which would > > send > > > > html back to browser rather than XML? > > > > > > > > > > We don't have an HTML builder AFAIK. But if the HTML document is a > > > well-formed XML then you can use the ApplicationXMLBuilder/Formatter > with > > > it. I have some experience with that (particularly with sending HTML > > emails > > > from Synapse). > > > > > > > > > > > > > > Any ideas or pointers is very much appreciated. > > > > > > > > Thanks, > > > > Yogesh > > > > > > > > > > > > > > > > -- > > > Hiranya Jayathilaka > > > Associate Technical Lead; > > > WSO2 Inc.; http://wso2.org > > > E-mail: [email protected]; Mobile: +94 77 633 3491 > > > Blog: http://techfeast-hiranya.blogspot.com > > > > > > > > > -- > > Sadeep Jayasumana > > ** > > Email: [email protected]**** > > Mobile: +61 4 1468 8521 > -- Hiranya Jayathilaka Associate Technical Lead; WSO2 Inc.; http://wso2.org E-mail: [email protected]; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com
