 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Michael Benford Guest
|
Posted: Wed Apr 11, 2007 5:35 am Post subject: SOAP bugs |
|
|
Hi everyone.
Lately I've been finding some annoying bugs in SOAP implementation:
1) When using SOAP attachments, THTTPRIO's OnBeforeExecute event becomes
useless.
I've created a new component inherited from THTTPRIO, in order to get a TStream
from OnBeforeExecute event instead of a WideString. It works pretty fine
and I can compress/encrypt my datapackets. However, when using soap attachments
Delphi raises an exception because attachment's stream cannot be changed.
Digging in SOAP source code, I found in SOAPAttach.pas TAggregatedStream
class, used by soap attachment. It overrides Write method from TStream and
simply produces an error. Since there's an OnSendAttachment event in THTTPRIO,
I can't fully understand why OnBeforeExecute should be called for attachments
too. Because of that all, I can't compress my entire datapacket at a time
if some remote method makes use of TSOAPAttachment class.
2) THTTPSoapPascalInvoker's OnGetAttachment doesn't work.
Both OnGetAttachment and OnSendAttachment don't work. I looked at SOAPPasInv.pas
and figured out they exist but are not used at all. So, for instance if I
compress an attachment on the client, I'm not able to decompress it on the
server.
3) MethodName parameter in THTTPSoapPascalInvoker's OnBeforeDispatchEvent
is always empty
Both OnBeforeDispatchEvent and OnBeforeDispatchEvent2 pass MethodName argument
as an empty string, so it's not possible to determine which method is being
called from the client.
4) THTTPReqResp's OnReceivingData event still passes irrelevant information.
This bug comes from Delphi 7, I guess. OnReceivingData event passes always
both Read and Total parameters with the same values . Because of that it's
impossible to use them for something useful.
Those bugs also appear on Delphi 2007 (Build 2516). There are workarounds
for all of them? Or I'll have to wait for future hotfixes/updates?
Thanks in advance.
Michael Benford |
|
| Back to top |
|
 |
Jean-Marie Babet Guest
|
Posted: Thu Apr 12, 2007 2:16 am Post subject: Re: SOAP bugs |
|
|
Hello Michael,
First off, thanks for the detailed post. I've mentioned it before here,
sadly little went on in the native SOAP area after D7. I won't go in the
fud-driven "drop native, it's all .NET now" panic. Rather I'll focus on the
fact that we're now working on that area again. For D2007 the focus was so
much on making sure we work with the *big* WebServices that several areas
(SOAPDataModule, Attachment, etc) did not get the focus they need.
| Quote: | 1) When using SOAP attachments, THTTPRIO's OnBeforeExecute event becomes
useless.
|
I was aware the OnBeforeExecute was ignoring changes made to the 'Request'
and those on the beta know that I've agreed to move to a stream for the
event once we're allowed to make interface changes. I want to move to a
stream as the current stream->widestring->stream conversion is problematic,
inefficient, etc. However, I was not aware of the issue with attachment and
the event. Obviously our unit tests don't exercise these two together .
| Quote: | Digging in SOAP source code, I found in SOAPAttach.pas TAggregatedStream
class, used by soap attachment. It overrides Write method from TStream and
simply produces an error.
|
I don't know the details of the attachment streams but I know that because
there are potentially multiple streams aggregated, the person who wrote that
code (he left CodeGear to retire in Spain recently) did mention back in
2001/2 that the aggregate stream is either in 'ReadOnly' or 'WriteOnly'
mode. So if we're about to send a request, the aggregate stream on top of
the attachments/XMLEnvelope is probably in ReadOnly mode and won't allow any
writes. I can see how that's a problem if one's trying to change the data.
I'll look at the code about this issue and the others your mentioned and
relay my findings. If these items are not in QC, please enter them as it's
very hard to justify an update without a QC#. We do have updates planned and
for issues that I already have fixes, I'm happy to make them available via
email or via CodeCentral.
I'll post more later...
Cheers,
Bruneau. |
|
| Back to top |
|
 |
Jean-Marie Babet Guest
|
Posted: Fri Apr 13, 2007 7:09 am Post subject: Re: SOAP bugs |
|
|
A quick note to mention that it's hectic here currently (another deadline).
It seems that tonight will be another long one (last night I shut down after
midnight; I'm hoping for an earlier exit today).
I'll will post a follow up as soon as I've had some time to investigate
this.
Cheers,
Bruneau. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|