Avatar of luffy monkey d
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-CA0B073BBF64}']
    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">first</key>
                  <value xsi:type="xsd:string">Schwarzenegger</value>
            </item>

            <item>
                  <key xsi:type="xsd:string">last</key>
                  <value xsi:type="xsd:string">Arnold</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">first</key>
                  <value xsi:type="xsd:string">Stallone</value>
            </item>
            <item>
                  <key xsi:type="xsd:string">last</key>
                  <value xsi:type="xsd:string">Sylvester</value>
            </item>
      </value>
</item>



Can you please help me
DelphiWeb ServicesXML

Avatar of undefined
Last Comment
Sinisa Vuk

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Geert G

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
luffy monkey d

ASKER
I will try the first (Tlist)
luffy monkey d

ASKER
I started by

Delphi:
procedure TForm1.Button1Click(Sender: TObject);
var
    resultat : TArray<String>;
begin
    resultat := (HTTPRIO1 as customerCtrlPortType ).ViewCustomer(1);
    Edit1.Text := resultat[1];
end;

Open in new window

Geert G

and ?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
SOLUTION
Sinisa Vuk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.