Problem with Delphi Soap an "Transfer-Encoding: chunked"


2007-10-19 11:55:55 PM
delphi233
Hello
First of all I use the Borland C++ Builder 2007, but I post in this
group because the SOAP C++ groups has so few postings and the SOAP
functions are the same as in Delphi.
I must develop a webservice witch receive a SOAP message from another
server. And this message is chunked encoded.
But after the first part of the message, my server answer "XML
document must have a top level element.".
And the SOAPCppInvokerBeforeDispatchEvent receive somethings with
looks like a binary message.
SOAPCppInvokerBeforeDispatchEvent Request: "N (with NULL values)
Wireshark "Follow TCP Stream":
//foreign server
POST /cgi-bin/sms_soap.exe/soap/ISMSDeliver HTTP/1.1
accept: */*
accept-charset: utf-8
host: XXXX
content-type: multipart/related; type="text/xml";
start="<XSAM.generated>"; boundary="--
Part_0_0010_scm_01C1D889.FA83230"
soapaction: ""
Via: HTTP/1.0 XXX(XMS XXXX135750), HTTP/1.1 spap2p (XMG XXX.145603)
Transfer-Encoding: chunked
//my webservice
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Fri, 19 Oct 2007 08:23:27 GMT
//foreign server
475
----Part_0_0010_scm_01C1D889.FA83230
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <XSAM.generated>
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="www.w3.org/2001/XMLSchema"
xmlns:xsi="www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<version soapenv:actor="MB" soapenv:mustUnderstand="0" xmlns="">1.0</
version>
<request-type soapenv:actor="MB" soapenv:mustUnderstand="0"
xmlns="">xxx</request-type>
</soapenv:Header>
<soapenv:Body>
<tns:SMSDeliverRequest xmlns:tns="xxx">
xxx
<content filename="String" href="1"/>
xxx
</tns:SMSDeliverRequest>
</soapenv:Body>
</soapenv:Envelope>
----Part_0_0010_scm_01C1D889.FA83230
Content-Type: text/plain; charset="utf-8"
Content-Id: <1>
xxx (plain text)
----Part_0_0010_scm_01C1D889.FA83230--
0
//my webservice
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Fri, 19 Oct 2007 08:24:27 GMT
Connection: close
Content-Type: multipart/related;
boundary=MIME_boundaryB0R9532143182121; start="<www.borland.com/
rootpart.xml>"
Content-Version: MIME-Version: 1.0
Content-Length: 705
Content:
--MIME_boundaryB0R9532143182121
Content-Type: text/xml
Content-ID: <www.borland.com/rootpart.xml>
Content-Location: www.borland.com/rootpart.xml
Content-Length: 480
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="www.w3.org/2001/XMLSchema"
xmlns:xsi="www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
ENC="schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-
ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</
faultcode><faultstring>XML document must have a top level element.
Linie: 0
</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
--MIME_boundaryB0R9532143182121--
In my sample application the HTTPRio component send the message HTTP/
1.0 encodet. Is the problem that Borland doesn't support HTTP/1.1?
Can I solve this problem with the Indy Soap component (and support
this component the C++ Builder)?
Thank you for any suggestions!