|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
html dump shows up as xml |
« View previous topic :: View next topic » |
Author |
Message
|
paustin_ours |
Posted: Tue Dec 29, 2009 6:17 pm Post subject: html dump shows up as xml |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
I have a message flow
httpInput --> JCN --> Http reply. Within the JCN i am reading a file, storing the contents of the file in a String buffer and outputting as BLOB to the http reply node. I have copy message headers included in the JCN.
the content of the file is a html dump.
I am invoking the message flow through my internet explorer with the URI
i am expecting to get the output on the screen as a html page. Instead i am gettin the html as a xml in the IE screen.
<html>
...
</html>
I am not sure what i am missing. Any thoughts?
this is the last output body part where i write the output as BLOB.
sb is the string buffer.
Code: |
MbElement outBody = outParser.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "BLOB", sb.toString().getBytes()); |
|
|
Back to top |
|
 |
imakash |
Posted: Tue Dec 29, 2009 9:52 pm Post subject: |
|
|
Newbie
Joined: 22 Dec 2009 Posts: 7
|
you can just set the contentType = test/html . in your jcn node it should work fine then. |
|
Back to top |
|
 |
imakash |
Posted: Tue Dec 29, 2009 11:01 pm Post subject: |
|
|
Newbie
Joined: 22 Dec 2009 Posts: 7
|
just set the header contentType ='text/html' and the other thing that you might need to do is. If you are just reading the html file and outputting it as is then i am assuming that the html file has <html> opening and closing tags in it which are also becoming part of output and you eventually you see them in the response. If this is the case than you might consider striping off the html tags that are read from the file. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Dec 31, 2009 1:18 am Post subject: Re: html dump shows up as xml |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
paustin_ours wrote: |
I have a message flow
httpInput --> JCN --> Http reply. ...
i am expecting to get the output on the screen as a html page. Instead i am gettin the html as a xml in the IE screen. |
It might help to put a Trace node after the HTTPReply node, and inspect the structure of the output message more closely. In particular, determine what HTTP headers the outgoing message has, and whether the message body looks correct. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|