3

I have corrected an error in a soap unit (Soap.OPToSOAPDomConv.pas), but I don't know how to rebuild soaprtl170.bpl (Delphi XE3).

I need to do this as I have a component to install in the ide that requires that bpl, and when dropping it in a form and activating it makes webservice calls in design mode.

In design mode it seems to use the soaprtl instead my modified Soap.OPToSOAPDomConv.dcu. In runtime it works as I'm not using runtime packages and my dcu is taking precedence.

Any help on how to recompile the bpl would be appreciated.

The concrete patch I want to apply in that file is the following:

function TOPToSoapDomConvert.InvContextToMsg(const IntfMD: TIntfMetaData; MethNum: Integer;
                                         Con: TInvContext; Headers: THeaderList): TStream;
...
(line 1446)
if not IsBareLiteral then
  MethNode := BodyNode.AddChild(ExtMethName, SoapMethNS,true)
else
  MethNode := BodyNode;
...

The patch consists in adding the true to the addChild.

Gonzalo
  • 31
  • 2
  • You need to open the `dpk`, which is the source of a `bpl` file in order to recompile a bpl. Not sure if things have changed from the way they where in D2007 to Delphi-XE3 – Johan Aug 28 '13 at 18:04
  • Not sure you can do that readily. Would be easier to patch it at runtime with a code hook. – David Heffernan Aug 28 '13 at 18:20
  • @Johan, the problem is that the dpk for soaprtl170 is not provided with the source code... – Gonzalo Aug 29 '13 at 12:23
  • @DavidHeffernan, I have no idea how to do this. Do you have any source when I can learn about that hooking process? Thanks! – Gonzalo Aug 29 '13 at 12:28
  • Could you perhaps extend the question to show the fix you need to apply – David Heffernan Aug 29 '13 at 12:36
  • @Gonzalo: cant you just add the corrected unit to your project? This will include the correction in you compilation not needing to rebuild the original Delphi package. Such an approach usually works with me unless the project is compiled with run-time packages. – AlexSC Aug 29 '13 at 14:04
  • @AlexSC, as I tried to explain what you say works in runtime perfectly. The problem is that in design mode (dropping my component in a form and connecting to get data) the original code is used and this makes that the soap xml call is wrong so I can't get the results to have the metadata I need in design time. An analogy in datasets could be that I couldn't connect to the database to get the colums of a query so I couldn't get dbedits and other database visual components dbfields configured in design time and showing live results. – Gonzalo Aug 29 '13 at 14:21

0 Answers0