|
Home > Archive > BizTalk Server Orchestration > July 2004 > Setting the content type of a message in a Request-Response HTTP Adapter
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Setting the content type of a message in a Request-Response HTTP Adapter
|
|
| darin dimitrov 2004-07-20, 5:53 pm |
| Hello,
I have a request-response receive adapter which is bound to the
HTTP protocol. I am using the default BTSHTTPReceive.dll ISAPI. I
receive a XML file, make some transformations in my orchestration and
prepare a message which in fact represents a HTML page. Then I route
this message to the response part of my adapter via a PassThru
pipeline.
The problem I encounter is that the BTSHTTPReceive.dll ISAPI
always sets the Content-Type to text/xml and my HTML page cannot be
well displayed in the browser. I tried using the microsoft's SDKUtils
method : SetContentType (as shown in
http://msdn.microsoft.com/library/d..._email_kqel.asp)
but it didn't change anything, although I can succesfully send html
emails with this method. Is there any way to set the Content-Type of
the BTSHTTPReceive.dll ISAPI to text/html when used in a
request-response receive adapter?
| |
| Adrian Hamza[MSFT] 2004-07-20, 8:53 pm |
| What about still returning XML but instead change the XML to reference the
stylesheet stored somewhere else? You just need to add a PI to the XML.
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="/StyleSheets/simple.xsl"?>
<ns0:PurchaseOrder xmlns:ns0="mynamespace">
<ns0:PoID>10001</ns0:PoID>
</ns0:PurchaseOrder>
Some links I found on the web
http://www.w3schools.com/xml/xml_xsl.asp
http://www.w3schools.com/xsl/default.asp
--------------------[vbcol=seagreen]
Adapter[vbcol=seagreen]
15:26:43 GMT)[vbcol=seagreen]
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!fr.ip.ndsoftware.net!proxad.net!postnews2.google.com!not-for-mail[vbcol=seagreen]
biz_prog_email_kqel.asp)[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
| |
| Matt Milner 2004-07-20, 8:53 pm |
| I haven't tried this, so I don't know it will work on the response or if it
is only used for a solicit-response port, but, try this:
MyMessage(HTTP.ContentType) = "text/html";
Matt
"darin dimitrov" <darin_dimitrov@hotmail.com> wrote in message
news:2b32e7c2.0407200726.4a78e78d@posting.google.com...
> Hello,
>
> I have a request-response receive adapter which is bound to the
> HTTP protocol. I am using the default BTSHTTPReceive.dll ISAPI. I
> receive a XML file, make some transformations in my orchestration and
> prepare a message which in fact represents a HTML page. Then I route
> this message to the response part of my adapter via a PassThru
> pipeline.
>
> The problem I encounter is that the BTSHTTPReceive.dll ISAPI
> always sets the Content-Type to text/xml and my HTML page cannot be
> well displayed in the browser. I tried using the microsoft's SDKUtils
> method : SetContentType (as shown in
>
http://msdn.microsoft.com/library/d..._email_kqel.asp)
> but it didn't change anything, although I can succesfully send html
> emails with this method. Is there any way to set the Content-Type of
> the BTSHTTPReceive.dll ISAPI to text/html when used in a
> request-response receive adapter?
|
|
|
|
|