hi there,
i'm using a third party web service to build a site for their client and am having trouble with passing an array of data to that web service via SoapClient.
according to __GetTypes, the method to get a user's details is and needs the following passed to it:
struct GetPersUserDetails {
int IDno;
}
i call it as $result = $client->GetUserPersDetails($parameters);
and pass it $parameters = array('IDNo' => '350773');
and all works well 🙂 i get the personal details of that punter.
now to get publication details from the system (the publisher's pubs) i get this back from __GetTypes:
struct PubDetails {
ArrayOfTPublication Publications;
}
where
struct ArrayOfTPublication {
TPublication TPublication;
}
meaning that it is an array of TPublication which is:
struct TPublication {
string PubCode;
string Description;
string WebText1;
}
now i can get all publications back (which is right if i don't pass a PubCode) but when i try to limit things to one publication, i've tried to pass it a couple of different things as $parameters in
$result = $client->PubDetails($parameters);
namely a simple array:
$parameters = array(
'PubCode' => "APP", // the publication i want to get (only)
'Description' => '',
'WebText1' => ");
$parameters = array(
array('PubCode' => "APP",
'Description' => '',
'WebText1' => '');
i still get all the publications back at me.
am i missing something simple with how i'm passing the array with the value for PubCode such that it wouldn't pick it up? i know it may be hard to determine from what i've been able to show you so alternatively, is there a soap function that will allow me to catch wsdl errors or similar?
thanks heaps,
andrewg.