luffy monkey d
asked on
Delphi soap (return array)
I just started to use Delphi,
I don't know how to iterate over arrays.
I already did the connection between Delphi and soap.
I want to get the name (for exemple Arnold ) and to set in a TForm1.Edit1Change
I know how to do when I get a string but I don't know for a array.
in wsdl, I get:
ArrayOf_xsd_string = TArray<String>;
customerCtrlPortType = interface(IInvokable)
['{3C177C7E-853B-10B9-0F41 -CA0B073BB F64}']
function ViewCustomer(const id: Integer): ArrayOf_xsd_string; stdcall;
end;
in PHP, I get:
Array ( [1] => Array ( [first] => Schwarzenegger [last] => Arnold ) [2] => Array ( [first] => Stallone [last] => Sylvester ) )
in xml, I get:
<item>
<key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">firs t</key>
<value xsi:type="xsd:string">Schw arzenegger </value>
</item>
<item>
<key xsi:type="xsd:string">last </key>
<value xsi:type="xsd:string">Arno ld</value>
</item>
</value>
</item>
<item>
<key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">firs t</key>
<value xsi:type="xsd:string">Stal lone</valu e>
</item>
<item>
<key xsi:type="xsd:string">last </key>
<value xsi:type="xsd:string">Sylv ester</val ue>
</item>
</value>
</item>
Can you please help me
I don't know how to iterate over arrays.
I already did the connection between Delphi and soap.
I want to get the name (for exemple Arnold ) and to set in a TForm1.Edit1Change
I know how to do when I get a string but I don't know for a array.
in wsdl, I get:
ArrayOf_xsd_string = TArray<String>;
customerCtrlPortType = interface(IInvokable)
['{3C177C7E-853B-10B9-0F41
function ViewCustomer(const id: Integer): ArrayOf_xsd_string; stdcall;
end;
in PHP, I get:
Array ( [1] => Array ( [first] => Schwarzenegger [last] => Arnold ) [2] => Array ( [first] => Stallone [last] => Sylvester ) )
in xml, I get:
<item>
<key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">firs
<value xsi:type="xsd:string">Schw
</item>
<item>
<key xsi:type="xsd:string">last
<value xsi:type="xsd:string">Arno
</item>
</value>
</item>
<item>
<key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">firs
<value xsi:type="xsd:string">Stal
</item>
<item>
<key xsi:type="xsd:string">last
<value xsi:type="xsd:string">Sylv
</item>
</value>
</item>
Can you please help me
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I started by
Delphi:
Delphi:
procedure TForm1.Button1Click(Sender: TObject);
var
resultat : TArray<String>;
begin
resultat := (HTTPRIO1 as customerCtrlPortType ).ViewCustomer(1);
Edit1.Text := resultat[1];
end;
and ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER