Thomas Almqvist wrote:
> This is what I want to achieve in the SOAP request:
> <ns1:Update>
> <ns1:documents>
> <ns1:document ns1:database="mydb">111</ns1:document>
> <ns1:document ns1:database="mydb">222</ns1:document>
> </ns1:documents>
> </ns1:Update>
> The Delphi(6)(same for D7) wsdl importer generates this:
> document = class(TRemotable)
> private
> Fdatabase: String;
> published
> property database: String read Fdatabase write Fdatabase stored
> AS_ATTRIBUTE; end;
> UpdateDocuments = array of document;
> function Update(const documents: UpdateDocuments): UpdResponse;
> stdcall;
> But where to I put the actual text within the <document> tags? Is
> there another way to implement the class to achieve the SOAP request?
What you need to do is to modify the structure using the DOM - you will
get the request in the BeforeExecute Method, and change it. Now there's
a bug in the D7 implementation that doesnt take the changes, so in
Rio.pas, in the DoBeforeExecute procedure, AFTER the following line:
{ NOTE: We ignore the var WideString passed in... ???? }
add:
// DEEPAK
Req := ReqW;
StrStrm := TStringStream.Create(Req);
try
StrStrm.Position := 0;
Request.CopyFrom( StrStrm, 0 );
finally
StrStrm.Free;
end;
{note: Declare Req:string and StrStrm: TStringStream; as local
variables}
--
Deepak Shenoy (TeamB)
Agni Software
http://www.agnisoft.com