Microsoft KB Archive/815072

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

Article ID: 815072

Article Last Modified on 5/5/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition

-



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.



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 (&quot;Microsoft.XMLHTTP&quot;) call xmlHttp.open(&quot;POST&quot;,&quot;http://localhost/PurchaseSite/biztalkhttpreceive.dll?po&quot;,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.



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 (&quot;Microsoft.XMLHTTP&quot;) call xmlHttp.open(&quot;POST&quot;,&quot;http://localhost/PurchaseSite/biztalkhttpreceive.dll?po&quot;,False) xmlHttp.setRequestHeader &quot;content-type&quot;, &quot;text/xml; charset=utf-8&quot; xmlHttp.send (objXMLdoc.xml)



STATUS
This behavior is by design.

Keywords: kbprb KB815072

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.