Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shiv or anybody please help!!! I am ready to kill...

357 views
Skip to first unread message

Alessandro Federici

unread,
Dec 30, 2001, 6:07:23 AM12/30/01
to
Hello everyone,
I am having an very strange problem. I made an ISAPI dll which I installed
in IIS as handler of the ".wsdl" requests.
Basically I am replacing the Microsoft SOAP SDK ISAPI with mine and inside
it I am making a call to a COM object which then in turn calls another one.
But this is not the issue. I added the required CoInitializeEx call with
multi thread flag in the web module and ADO works just fine apparently (I am
saying this since I read many posts regarding this issue).

The problem is that **sporadically** the data that the client receives (Indy
based) is corrupted.
This happens randomly approximately once every 20/30 calls or sometimes
before. The rest of the times everything works just fine.
The problem arises when I am sending compressed binary data (I compress the
SOAP envelope using the zlib unit).

I had the ISAPI save the response on a file immediately after sending it and
the client as soon as it receives it. By comparing the two files I noticed
how they are different. Immediately after that I also decompressed the
response and saved that server side to make sure that the data that was
supposed to send was ok. It is. Compression doesn't seem to the the problem.

Apparently there's always a group of 4 bytes which is different.
For instance:

#145 #186 @ offset 45190
#17 #43 @ offset 45191
#28 #83 @ offset 45192
#141 #183 @ offset 45193

I am clueless...
An help would be eternally appreciated ;-)

--
Alessandro Federici

System Architect
Borland Certified Consultant
-----
http://www.msdelphi.com (home of the DSOAP Toolkit 2.0)

al...@msdelphi.com (primary)
al...@bigfoot.com (routes to the first)
king...@hotmail.com (if you have troubles with the others)


Alessandro Federici

unread,
Dec 30, 2001, 6:20:55 AM12/30/01
to
"Alessandro Federici" <al...@msdelphi.com.nospam> wrote in message
news:3c2ef48c$1_2@dnews...
> Hello everyone,

Forgot to mention another thing.
The problem arises when then data passes the 38kb or so (I don't have a
precise number).
The two tests that were giving me problems were 130kb and 71kb respecively.
With smaller buffers there seem to be no problem...
Is it Webbroker or Indy?

Vincent Parrett(VSoft)

unread,
Dec 30, 2001, 8:21:44 AM12/30/01
to
"Alessandro Federici" <al...@msdelphi.com.nospam> wrote in message
news:3c2ef7b9_1@dnews...

> Forgot to mention another thing.
> The problem arises when then data passes the 38kb or so (I don't have a
> precise number).
> The two tests that were giving me problems were 130kb and 71kb
respecively.
> With smaller buffers there seem to be no problem...
> Is it Webbroker or Indy?

This sounds like the webbroker file upload problem, have a search through
google as this was mentioned here a few months back and some code fixes were
posted here, I have this saved but haven't tested it myself (posted by Dave
Nottage) :

> Can someone guide me to the hack/solution that solves this problem?

In WebBrokerSOAP.PAS:

BytesRead := Length(Request.Content);
// Fixed code:
if BytesRead < Request.ContentLength then
begin
SetLength(Buffer, Request.ContentLength);
Stream.Write(Request.Content[1], BytesRead);
repeat
// --> added "[BytesRead]"
ChunkSize := Request.ReadClient(Buffer[BytesRead],
Request.ContentLength - BytesRead);
if ChunkSize > 0 then
begin
// --> added "[BytesRead]"
Stream.Write(Buffer[BytesRead], ChunkSize);
Inc(BytesRead, ChunkSize);
end;
// --> changed from "until ChunkSize = -1" to:
until (BytesRead = Request.ContentLength) or
(ChunkSize <= 0);
end else
Stream.Write(Request.Content[1], BytesRead);
// End fixed code
Stream.Position := 0;

You'll need to include the changed WebBrokerSOAP.PAS in your project
path.

HTH

Vincent Parrett
AtoZed Software
Email vincent [ at ] atozedsoftware dot com
-------------------------------------------------------------------
Automate your build process with FinalBuilder
IntraWeb - True RAD development for the Web
http://www.atozedsoftware.com

Alessandro Federici

unread,
Dec 30, 2001, 8:40:28 AM12/30/01
to
"Vincent Parrett(VSoft)" <vincent@.nospam.atozedsoftware.com> wrote in
message news:3c2f151c_2@dnews...

> "Alessandro Federici" <al...@msdelphi.com.nospam> wrote in message
> news:3c2ef7b9_1@dnews...

> I have this saved but haven't tested it myself (posted by Dave Nottage) :

Thanks. I will try.

> > Can someone guide me to the hack/solution that solves this problem?
>
> In WebBrokerSOAP.PAS:

SOAP? I am not using Borland's SOAP but mine+Microsoft's SOAP SDK.
So is there a similar fix for standard webbroker modules (IIS)?

Thanks Vincent!

Dave Nottage

unread,
Dec 30, 2001, 3:52:03 PM12/30/01
to
"Alessandro Federici" wrote:
> SOAP? I am not using Borland's SOAP but mine+Microsoft's SOAP SDK.
> So is there a similar fix for standard webbroker modules (IIS)?

See what happens when the call to ECB.ReadClient is made. (From
TISAPIRequest.ReadClient)

ie, whether the call is successful, ie whether the entire data is
returned, or whether it fails etc.

I'd guess that if ECB.ReadClient fails for no good reason, IIS is at
fault. I'd be interested to know myself <g>

--
Dave Nottage


Alessandro Federici

unread,
Dec 30, 2001, 7:58:26 PM12/30/01
to
"Dave Nottage" <da...@removethis.b3.com.au> wrote in message
news:3c2f7ec6_1@dnews...

> "Alessandro Federici" wrote:
> > SOAP? I am not using Borland's SOAP but mine+Microsoft's SOAP SDK.
> > So is there a similar fix for standard webbroker modules (IIS)?
>
> See what happens when the call to ECB.ReadClient is made. (From
> TISAPIRequest.ReadClient)

Actually it has to be WriteClient. The server gets data ok. Is the data
returned that has 4 wrong bytes *sometimes*, after I send the response back.
I will check anyways.

Dave Nottage

unread,
Dec 30, 2001, 8:27:46 PM12/30/01
to
"Alessandro Federici" wrote:
> > See what happens when the call to ECB.ReadClient is made. (From
> > TISAPIRequest.ReadClient)
>
> Actually it has to be WriteClient. The server gets data ok.

Oops.. I just re-read your original message..

> Is the data returned that has 4 wrong bytes *sometimes*, after I
> send the response back.

I'd still like to know what you find <g>

--
Dave Nottage

Alessandro Federici

unread,
Jan 1, 2002, 6:45:58 AM1/1/02
to
"Dave Nottage" <da...@removethis.b3.com.au> wrote in message
news:3c2fbf17_2@dnews...

Well, looks like the problem was hardware...
My hard disk crashed yesterday so I reinstalled everything on a new hard
disk.
No code touches. Everything works like a charm.

I am still suspicious but so far so good.


--
Alessandro Federici

System Architect
Borland Certified Consultant

http://www.msdelphi.com (home of the DSOAP Toolkit 2.0)

al...@msdelphi.com (primary)
king...@hotmail.com (secondary)
Microsoft Messenger: king...@hotmail.com
ICQ: 27692720

0 new messages