Error when consuming external service.

Hi

We are currently modifying the url of a web service that is consumed from sugarcrm, the instance is an instance located in the cloud.

This is an example of the code we implemented:

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://pruebas.dinissan.com.co/ClienteExternaSugarNegocio/cliente/crearOrModificarCliente',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'

{"sasa_tipo_persona_c":"N","sasa_tipo_documento_c":"C","sasa_numero_documento_c":"80084416","sasa_nombres_c":"NOMBRE 3476744 PRI APE 3476744 SEG APE 3476744","sasa_primerapellido_c":"PRI APE 3476744","sasa_last_name_2_c":"SEG APE 3476744","sasa_tipodirec1_c":"1","sasa_municipio_principal_2_c":"11001","billing_address_street":"Sin direcciu00f3n","sasa_tipodirec2_c":"1","sasa_municipio_secundario_2_c":"25126","shipping_address_street":"CRA 3E # 3E-116","sasa_tipodirec3_c":"2","sasa_municipio_3_c":"25126","sasa_direccion3_c":"CRA 3 # 3E-116","sasa_codigopostal3_c":"","sasa_cel_principal_c":"3126564877","sasa_cel_alternativo_c":"","sasa_cel_otro_c":"","sasa_tipotel1_c":"1","sasa_ciudad_tel_principal_2_c":"05021","sasa_phone_office_c":"3103459","sasa_extension_c":"","sasa_ciudad_tel_alternativ_2_c":null,"sasa_phone_alternate_c":"","sasa_extension2_c":"","sasa_tipotel2_c":"","sasa_ciudad_tel_3_c":null,"sasa_tel_phone_other_c":"","sasa_extension3_c":"","sasa_tipotel3_c":"","listEmail":[{"email_address":"caurrego@dinissan.com.co","invalid_email":"false","opt_out":"false","primary_address":"true"},{"email_address":"desarrollo@dinissan.com.co","invalid_email":"false","opt_out":"false","primary_address":"false"}],"facebook":"","twitter":"","website":"","sasa_nivel_educativo_c":"8","sasa_profesion_c":"0","sasa_ocupacion_c":"3","sasa_cargo_c":"62","sasa_ingreso_mensual_c":0,"sasa_tipo_de_vivienda_c":"1","sasa_estrato_c":"4","sasa_regimen_fiscal_c":"","sasa_estado_civil_c":"C","sasa_tiene_hijos_c":"S","sasa_numero_hijos_c":1,"birthdate":null,"sasa_edad_c":"0","sasa_genero_c":"M","sasa_cliente_fallecido_c":null,"sasa_fuente_c":"Sugar"}',
CURLOPT_HTTPHEADER => array(
'token: '.$token,
'Content-Type: application/json'
),
));


$response = curl_exec($curl);

curl_close($curl);

For some strange reason it generates error, but if consumed from postman or outside SugarCRM, this one does work.

What could be happening so that consumption within SugarCRM is not working?

Parents Reply Children
No Data