tommy.bonte
Member
Hi,
Trying to POST a xml-file to an ESKO server. If I hit "Enter" at the very same adress (ourIP:4415/ws/xmlin) Automation Engine register an event and I can see the file get.xml being processed. Why will not AE see my xml-file. Is something wrong in my code setup (attached it below). Esko won´t help me in this errand. Tried support many times, and also had a lot of code suggestions.
We think it can relate to network issues, but we haven´t found any firewall or user right problems.
Tip and advices is highly appriciated!
With Best Regards
Tommy Bonté
function curl_file_create($filename, $mimetype = '', $postname = '') {
return "@$filename;filename="
. ($postname ?: basename($filename))
. ($mimetype ? ";type=$mimetype" : '');
}
function curlUploadToAE($file,$mimeType,$fileName){
$target="http://ourIP:4415/ws/xmlin";
$cfile = curl_file_create($file,$mimeType,$fileName);
$data = array('file' => $cfile);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $target);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$r = curl_exec($curl);
curl_close($curl);
}
Trying to POST a xml-file to an ESKO server. If I hit "Enter" at the very same adress (ourIP:4415/ws/xmlin) Automation Engine register an event and I can see the file get.xml being processed. Why will not AE see my xml-file. Is something wrong in my code setup (attached it below). Esko won´t help me in this errand. Tried support many times, and also had a lot of code suggestions.
We think it can relate to network issues, but we haven´t found any firewall or user right problems.
Tip and advices is highly appriciated!
With Best Regards
Tommy Bonté
function curl_file_create($filename, $mimetype = '', $postname = '') {
return "@$filename;filename="
. ($postname ?: basename($filename))
. ($mimetype ? ";type=$mimetype" : '');
}
function curlUploadToAE($file,$mimeType,$fileName){
$target="http://ourIP:4415/ws/xmlin";
$cfile = curl_file_create($file,$mimeType,$fileName);
$data = array('file' => $cfile);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $target);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$r = curl_exec($curl);
curl_close($curl);
}