Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - SugarmCRM REST API always returns "null" -


i'm trying test out sugarcrm rest api, running latest version of ce (6.0.1). seems whenever query, api returns "null", nothing else. if omit parameters, api returns api description (which documentation says should).

i'm trying perform login, passing parameter method (login), input_type , response_type (json) , rest_data (json encoded parameters). following code query:

 $api_target = "http://example.com/sugarcrm/service/v2/rest.php";   $parameters = json_encode(array(     "user_auth" => array(         "user_name" => "admin",         "password" => md5("adminpassword"),     ),     "application_name" => "test",     "name_value_list" => array(),  ));  $postdata = http_build_query(array(     "method" => "login",     "input_type" => "json",     "response_type" => "json",     "rest_data" => $parameters  ));  echo $parameters . "\n";  echo $postdata . "\n";   echo file_get_contents($api_target, false,     stream_context_create(array(         "http" => array(             "method" => "post",             "header" => "content-type: application/x-www-form-urlencoded\r\n",             "content" => $postdata         )     ))) . "\n"; 

i've tried different variations of parameters , using username instead of user_name, , provide same result, response "null" , that's it.

try setting input_type , response_type json (capitals). if doesn't work, go sugar installation, edit config.php entry under logger => level , make debug instead of fatal , see if says errors.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -