I stuck on a script that´s communicating with a webservice via SOAP.
I got the code below (extract) running successfully (assigning Parameters, creating an object, passing the Parameters thru the object and get the response int $result)
$param[category]='1';
$param[name][firstname]='Thomas';
$param[name][lastname]='A.';
$client = new SoapClient("KFZ/2013/1/_impl/AD...........");
$result = $client->listvisitors($param);
And now where I stuck:
I have an example of a webservice query in XML format. The example is at follow:
<category>1</category>
<name>
<firstname>Thomas</firstname>
<lastname>A.</lastname>
</name>
<name>
<firstname>Mike</firstname>
<lastname>K.</lastname>
</name>
The difference to my code above is that the XML data contains a second person. How can I assign a second person to the object ?
Must be something like this (I know that this will not work as "Mike K." will overwrite "Thomas A.")
$param[category]='1';
$param[name][firstname]='Thomas';
$param[name][lastname]='A.';
$param[name][firstname]='Mike';
$param[name][lastname]='K.';
Here is an extract from the xsd (webservice definition) file:
<xsd:element name="name" type="xxx" minOccurs="0" maxOccurs="unbounded"/>
It should be possible to assign multiple names (person)