I have a problem with a soap call that I am trying to make from PHP.
First, some background information: the call goes to a system that searches for a person in a large CRM system. This requires information such as name, city, date of birth, etc.). On success, it must return one or more identifiers. The soap interface is a standard element of the system, so I can not influence the layout of the call.
First, I started by creating a soap request in SoapUI to find out if I can make it work. I ended up with this soapy query that works:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:hidl="http://humaninference.com/hidl-mapped">
<soap:Header/>
<soap:Body>
<hidl:HI__DQComponents__Identify__Searching__Search>
<hidl:model>MAGMA::PERSON</hidl:model>
<hidl:execution>Match</hidl:execution>
<hidl:interfaceFields>
<hidl:item>
<hidl:Name>master_id</hidl:Name>
<hidl:Value>0</hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>Name</hidl:Name>
<hidl:Value>jansen</hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>birthdate</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>add_id</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>street</hidl:Name>
<hidl:Value>oudegracht</hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>dumstreet</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>housenumber</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>postcode</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>city</hidl:Name>
<hidl:Value>Utrecht</hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>citydum</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
<hidl:item>
<hidl:Name>add_line_twee</hidl:Name>
<hidl:Value></hidl:Value>
</hidl:item>
</hidl:interfaceFields>
</hidl:HI__DQComponents__Identify__Searching__Search>
</soap:Body>
</soap:Envelope>
The next step was to create the same request with PHP, because I wrote this piece of code:
$result = $client->HI__DQComponents__Identify__Searching__Search(array(
'model' => 'MAGMA::PERSON',
'execution' => 'Search',
'interfaceFields' => array (
'item' => array ('Name' => 'master_id', 'Value' => '0' ),
'item' => array ('Name' => 'Name', 'Value' => 'jansen' ),
'item' => array ('Name' => 'birthdate', 'Value' => ' ' ),
'item' => array ('Name' => 'add_id', 'Value' => ' ' ),
'item' => array ('Name' => 'street', 'Value' => 'Oudegracht' ),
'item' => array ('Name' => 'dumstreet', 'Value' => ' ' ),
'item' => array ('Name' => 'housenumber', 'Value' => ' ' ),
'item' => array ('Name' => 'postcode', 'Value' => ' ' ),
'item' => array ('Name' => 'city', 'Value' => 'utrecht' ),
'item' => array ('Name' => 'citydum', 'Value' => ' ' ),
'item' => array ('Name' => 'add_line_twee', 'Value' => ' ' ),
)
));
echo '<PRE>';
print_r($result);
echo '</PRE>';
. , "item" , PHP , add_line_twee "interfaceFields", .
, , -, , SoapUI.
?