Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: DBCS Data That You Submit to a Channel by Using the HTTP Receive Function Sample Becomes Corrupted


View products that this article applies to.

Symptoms

When you post double byte character set (DBCS) data to an HTTP Receive function from the Microsoft BizTalk Server Software Development Kit (SDK) sample processPo.asp page, the data becomes corrupted if the HTTP Receive function is configured to submit to a BizTalk channel.

The HTTP Receive function SDK sample is located in the \Program Files\Microsoft BizTalk Server\SDK\Messaging Samples\HTTP Receive Function folder on your computer running BizTalk Server.

↑ Back to the top


Cause

If you post data that contains embedded DBCS characters to an HTTP Receive function URL, and the HTTP Receive function is configured to submit to a channel, you must use the UTF-8 code page to explicitly encode the query string for the post.

HTTP Receive functions default to a USASCII code page. The processPo.asp page that is included in the HTTP Receive function SDK sample uses the following code to post data to the HTTP Receive function:
set xmlHttp = server.CreateObject  ("Microsoft.XMLHTTP")
call xmlHttp.open("POST","http://localhost/PurchaseSite/biztalkhttpreceive.dll?po",False)
xmlHttp.send (objXMLdoc.xml)
This code works correctly with USASCII data. However, this code causes DBCS data to be corrupted if the HTTP Receive function is configured to submit the posted data to a BizTalk channel.

↑ Back to the top


Resolution

Modify the code in the processPo.asp to use the setRequestHeader method of the XMLHTTP object to change the Content-Type header to use the UTF-8 codepage:
set xmlHttp = server.CreateObject  ("Microsoft.XMLHTTP")
call xmlHttp.open("POST","http://localhost/PurchaseSite/biztalkhttpreceive.dll?po",False)
xmlHttp.setRequestHeader "content-type", "text/xml; charset=utf-8"
xmlHttp.send (objXMLdoc.xml)

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


Keywords: KB815072, kbprb

↑ Back to the top

Article Info
Article ID : 815072
Revision : 1
Created on : 5/5/2003
Published on : 5/5/2003
Exists online : False
Views : 337