Question

Easy Translator service

  • 13 June 2013
  • 2 replies
  • 15 views

Badge
Hi

 

 

I have created a easy translator service using the available workbench from FME. I have also copied over the code from FME Server Playground using the '''full data upload'' example making the required changes to the code to look at my FME server.

 

 

The issue is i can see the call go to upload the data but on the return call

 

 

/*

 

     Create the XMLHttpRequest object

 

     */

 

    var xhReq = createXMLHttpRequest();

 

    // Request Variables

 

    pHostName = "fmeserver.com"

 

    pUrlBase = "http://" + pHostName + "/fmedataupload/Samples/easyTranslator.fmw?opt_extractarchive=true&opt_pathlevel=5&opt_fullpath=true"

 

    pHttpMethod = "POST"

    xhReq.open(pHttpMethod, pUrlBase, true);

 

    xhReq.onreadystatechange = onResponse;

 

    xhReq.send(null);

 

   }

 

 

my return is blank...however if i copy the call directly into a url it works.

 

 

I am sure the code is correct...not sure why the return is blank as the documentation suggest a call will work to browse files...

 

 

http://docs.safe.com/fmeserver/html/FME_Server_Reference_Manual/FME_Server_Reference_Manual.htm#web_services/service_dataupload.htm

 

 

So i do not get the tickbox options as the json response does not get returned and they do not get built.

 

 

Im new to FME but not to development...any ideas i can look at?

 

 

Regards

2 replies

Userlevel 4
Hi,

 

 

difficult to tell when we don't know the complete setup. But could it perhaps be related to the security restrictions on XMLHttpRequest?

 

 

David
Badge
Hi David

 

 

Thanks for the reply, the security on XMLHTTP req could be a possibility, would have assumed it would have returned and error in firebug or something...dont assume nothing i gues...will look into it.

 

 

The call to upload the file works as required so i will do some investigation into the second call and see where it gets me with the security restrictions.

 

 

Thanks

 

 

Andy

 

 

Reply