bobe1059
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by bobe1059
-
-
I dont have any control over the PHP code here is wha the doc says:
Notice the array in the 3rd argument. ASP.NET does not have an "array(=>)" object. No matter what I pass the PHP side returns an error
recordUpdate:
recordUpdate(public_id,[contact_id],data)
This function will update all data for a record that is not associated with a one to many record. You must put your public_id or you will get an access error. If you put a contact_id into the function then you will update a record. If the contact_id is blank, then you will insert a new record. The data variable is an array of data you want to update using the DB name as the key.
An example of this function would be:
Insert:
$c = recordUpdate('public','',array('firstname'=>'John',
'lastname'=>'Doe'));
returns:
$c = “new contact_id”
$c = recordUpdate('public','1',array('firstname'=>'John',
'lastname'=>'Doe'));
returns:
$c = 1
If an error occurs, then recordUpdate will return a text message trying to explain what went wrong.
-
Actually its the other way around. I need to send data to the PHP web service and its requires an associative array for a particular argument. The problem is that no matter what I do (JSON ,XML etc) the PHP side can not read it as an array. I have tried Dictionaries, Array Lists, name Value pairs, VB arrays. I am trying to tell them that they need to change the PHP web servce to accept serializd data such as XML so that non-PHP clients can consume the web service.
-
tell me if I am wrong.... but PHP associative arrays are a language specific data structures which other languages know nothing about and can not re-create (without knowledge of the internal structure). So a web service written in PHP where an argument required an associative arraycan not be consumed by any other client (ASP.NET is the case) other than PHP clients.
-
I am an ASP.NET developer and I have to call a soap methed written in PBP that takes an argument required an associative array
such as
$prices = array( 'Tires'=>'test1', 'Spark Plugs'=>'test2' );
can yoiu tell me what the internal representation is of the above
PHP Associative Array internal structure
in PHP Coding Help
Posted
outside data?
I have tried many ways to populate the array argument ..here is a json serialized example in VB.NET. below returns a soft error from the PHP web service saying it cant read the array data.
trying to populate array("Contact1Email"=>"mdrake@pwrx.com")
Dim c As New com.contactbeacon.cbapiService
Dim json As String = "a:1:{s:13:""Contact1Email"";s:15:""mdrake@pwrx.com"";}"
Dim retval As Object = c.recordUpdate("public string ", json)