Paul,
Thanks for your quick response. So far, I'm finding the API
pretty nice to work with, but I haven't quite gotten my customer insert
test to work yet. Here's a block of my code in PHP. Please note that I
noticed all of your code samples were in VB and ASP.NET, so once my project
is complete, I'd be glad to post my code so other PHP developers can
reuse some snippets.
Does everything look in order?
<?php
//@TODO : Add in SSL encryption componenet, currently just communicating over unsecure HTTP
//use the nusoap library
require_once('lib/nusoap.php');
//define the SOAP Client and point to the SOAP Server
$client = new soapclient('http://www.methodintegration.com/MethodAPI/service.asmx?wsdl',true);
$array = array( 'strCompanyAccount' => 'MYCOMPANY',
'strLogin' => 'MYNAME',
'strPassword' => 'MYPASSWORD',
'strTable' => 'Customer',
'arrInsertFieldsArray' => array('Name'),
'arrInsertValueArray' => array('Frank The Tank'),
'intResponseRecordID' => $id,
);
print_r( $client->call('MethodAPIInsert', $array));
echo 'Response code : '.$id;
//kill the client
unset($client);
/*
Framework for the call based upon this element from the WSDL
<s:element minOccurs="0" maxOccurs="1" name="strCompanyAccount" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="strLogin" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="strPassword" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="strTable" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="arrInsertFieldsArray" type="tns:ArrayOfString"/>
<s:element minOccurs="0" maxOccurs="1" name="arrInsertValueArray" type="tns:ArrayOfString"/>
<s:element minOccurs="0" maxOccurs="1" name="intResponseRecordID" type="s:string"/>
*/
?>
When I run this test insert, I'm still getting this response:
Array
(
[MethodAPIInsertResult] => A blank field name was entered in the arrInsertFieldArray. Please verify there are no empty items in the arrInsertFieldArray.
[intResponseRecordID] =>
)
Thanks for your time!