Hi all,
I've been desperately trying to create a new account through the SOAP API without PHP, i.e. using a NuSoap GUI called soapUI.
I managed to login in and to get the session id, but I'm stuck at the last step : passing an array of values to the "set_entry" function or to the "set entries" one.
As an exemple, I would just want to create an account whose "name" attribute is "John".
Here is the code that I need to complete :
I tried to replace $$$$$$$$$$$$$$$$$$ with many syntax but I create an empty account each time. Here are my main tries :Code:<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sug="http://www.sugarcrm.com/sugarcrm" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soapenv:Header/> <soapenv:Body> <sug:set_entry soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <session xsi:type="xsd:string">xxxxxxxxxxx</session> <module_name xsi:type="xsd:string">Accounts</module_name> <name_value_list xsi:type="sug:name_value_list" soapenc:arrayType="sug:name_value[]"/> $$$$$$$$$$$$$$$$$$ </sug:set_entry> </soapenv:Body> </soapenv:Envelope>
array('name'[name], 'value'[Curriculum Vitae])
###########################
array('name'=> 'name', 'description'=> 'Curriculum Vitae')
###########################
[array('name':name, 'value':Curriculum Vitae)]
###########################
[name[0]=name, value[0]=Curriculum Vitae]
###########################
<name xsi:type="xsd:string">Egypt</name>
###########################
<name>Egypt</name>
###########################
[array(name[name], value[Curriculum Vitae])]
###########################
array(
array('name' => 'name', 'value' => 'nom'),
array('name' => 'description', 'value' => 'description')
)
###########################
<name_value>
<name>
name
</name>
<value>
new test
</value>
###########################
I searched for a long time on the forum and on Google, but I couldn't get it right...
Please help me find the proper way to write a name_value array from this "user friendly" SOAP interface!!!
Thanks a lot in advance ; and sorry for the dumminess of this issue :-(


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks