Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XMLHTTP.send and character encoding

From: "Alexander Jagl" <vansick@---.--->
To: NULL
Date: 9/3/2004 11:31:00 AM
Hi!

I posted this message in microsoft.public.xml.soapsdk yesterday, sorry for
x-postig, but it seems that most messages there are written in Chinese.


I want to send a textstream to an URL endpoint.
I use this code:

Public Function RA_Interface()
    Dim sPath, HTTPob
    Dim Kopf As String, Fuss As String, xml As String
    Dim cn As adodb.Connection, rs As adodb.Recordset

    ' XML header, see below
    Kopf = Nz(DLookup("Wert", "T_Parameter", "Parameter = 'XML_Kopf'"), "")
    ' XML fooder, see below
    Fuss = Nz(DLookup("Wert", "T_Parameter", "Parameter = 'XML_Fu?'"), "")

    ' XML data
    xml = "    <Articles>" & z & "        <Article>"
    xml = xml & z & "            <ArticleID>123</ArticleID>"
    xml = xml & z & "            <Name>???</Name>"
    xml = xml & z & "        </Article>" & z & "    </Articles>"

    xml = Kopf & xml & Fuss

    Set HTTPob = CreateObject("MSXML2.XMLHTTP")
    sPath = "http://localhost/PDB_Interface.aspx"
    HTTPob.Open "POST", sPath, False
    HTTPob.send "" & xml
    Set HTTPob = Nothing
End Function


The resulting string looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<Articles>
<Article>
<ArticleID>123</ArticleID>
<Name>???</Name>
</Article>
</Articles>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Everything works fine, the only problem I have is the character
encoding. Special characters like the German Umlaute are not recognized.
I did not find a property for the XMLHTTP object where I can set the
charset.

Who can help me?

Thank you,
Alex




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent