Running a javascript client api using R process

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Running a javascript client api using R process

soshi
This post was updated on .
Hello everybody
I have an essential question and need your help, I'm going to send execute request to server by getting parameters from user and show output in client using a div tag, (it has been tested before by sending xml request using WPSclient).

R process is:
# calculate NDVI for raster ,

###########################################################

#wps.des: NDVI, NDVI for raster;
#wps.in: Red_Band, geotiff;
#wps.in: NIR_Band, geotiff;

library(raster)
library(sp)
library(rgdal)

red <- raster(Red_Band)
nir <- raster(NIR_Band)

# Gaussian filter
gf <- focalWeight(red, 0.1, "Gauss")
red_Gaussian <- focal(red, w=gf)
gf1 <- focalWeight(nir, 0.1, "Gauss")
nir_Gaussian <- focal(nir, w=gf1)

NDVI = function(nir,red){
  ndvi = (nir-red)/(nir+red)
  return (ndvi)
}

ndvi_out = NDVI (nir_Gaussian,red_Gaussian)

ndvi = plot(ndvi_out)

dev.copy(jpeg,filename="ndvi.jpeg");
dev.off ()

output = "ndvi.jpeg"

#wps.out: output, image/jpeg;
-------------------------------------------
and xml request is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0"
        xmlns:wps="http://www.opengis.net/wps/1.0.0"
        xmlns:ows="http://www.opengis.net/ows/1.1"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
  http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
        <ows:Identifier>org.n52.wps.server.r.NDVI</ows:Identifier>
        <wps:DataInputs>
                <wps:Input>
                        <ows:Identifier
                                xmlns:ns1="http://www.opengis.net/ows/1.1">Red_Band</ows:Identifier>
                        <wps:Reference xlink:href="http://localhost:8080/uav/IMG_0503_3.tif" mimeType="application/geotiff" />
                </wps:Input>
                                <wps:Input>
                        <ows:Identifier
                                xmlns:ns1="http://www.opengis.net/ows/1.1">NIR_Band</ows:Identifier>
                        <wps:Reference xlink:href="http://localhost:8080/uav/IMG_0503_5.tif" mimeType="application/geotiff" />
                </wps:Input>                               
        </wps:DataInputs>
        <wps:ResponseForm>
                <wps:RawDataOutput mimeType="image/jpeg">
                        <ows:Identifier>output</ows:Identifier>
                </wps:RawDataOutput>
        </wps:ResponseForm>
</wps:Execute>

---------------------------------------------------
and now using Client API, I hit the button and send an execute request to server:
here is javascript code:

var execute_call = function(e){
                       
                                var wpsUrl = $('#wps').val();
                                var processId = $('#processes option:selected').text();
                                var value = document.getElementById('literal_input').value
                                var asReference =  document.getElementById('input_file').value
                                var inputGenerator = new InputGenerator();
                                //var literalInput = inputGenerator.createLiteralDataInput_wps_1_0_and_2_0('literalInput', 'undefined', 'undefined', value);
                                var complexInput = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band , Red_Band',
                                        'application/geotiff', 'undefined', 'UTF-8', asReference, 'undefined');
                               
                                var outputGenerator = new OutputGenerator();
                                //var literalOutput = outputGenerator.createLiteralOutput_WPS_1_0('literalOutput', 'true');
                                var complexOutput = outputGenerator.createComplexOutput_WPS_1_0('output', 'undefined', 'image/jpeg', 'undefined',
                                'UTF-8', 'undefined', 'undefined', 'undefined', 'undefined');
                                var responseFormat ='raw'   // raw , document
                                var executionMode = 'async'  // sync, async
                                var lineage = 'true'   // true , false
                                // only eexecute if wpsUrl is a http url
                                if(wpsUrl.startsWith("http")){
                                        wps = new WpsService({url : wpsUrl, version : "1.0.0"});
                                        wps.execute(executeCallback, processId, responseFormat, executionMode, lineage, complexInput, complexOutput);
                                }
                }
               
               
                var executeCallback = function(response){
               
                        execute = response;
                       
                        //types of output: rawOutput, responseDocument, resultDocument, resultDocument ;
                        execute.type = "rawOutput "
                        execute.serviceVersion = "1.0.0"
                       
                       
                        var executeOuptut = execute.rawOutput;
                        $("div#raw_Output").val(executeOuptut);
                       
                };

-------------------------------------------------------------
loading input (image):
<div>
        <form enctype="multipart/form-data">
                <input id="input_file" name="file" type="file" />
                <input type="button" value="Upload" />
        </form>
        <progress></progress>
</div>
<script> $(':button').on('click', function() { $.ajax({ // Your server script to process the upload url: 'http://localhost:8080/wps/WebProcessingService', type: 'POST', // Form data data: new FormData($('form')[0]), // Tell jQuery not to process data or worry about content-type // You *must* include these options! cache: false, contentType: false, processData: false, // Custom XMLHttpRequest xhr: function() { var myXhr = $.ajaxSettings.xhr(); if (myXhr.upload) { // For handling the progress of the upload myXhr.upload.addEventListener('progress', function(e) { if (e.lengthComputable) { $('progress').attr({ value: e.loaded, max: e.total, }); } } , false); } return myXhr; }, }); }); </script>
and output tag in html:
<div id="raw_Output"></div>
---------------------------------------------------------------------------------------
I have problem with above javascript code, how should I define my parameters by user (note: two parameters) and how I put them in asReference variable in complexInput object?
could you help me, please...it's very important to me..
thanks in advance...




Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
loading input (image):
<script> $(':button').on('click', function() { $.ajax({ // Your server script to process the upload url: 'http://localhost:8080/wps/WebProcessingService', type: 'POST', // Form data data: new FormData($('form')[0]), // Tell jQuery not to process data or worry about content-type // You *must* include these options! cache: false, contentType: false, processData: false, // Custom XMLHttpRequest xhr: function() { var myXhr = $.ajaxSettings.xhr(); if (myXhr.upload) { // For handling the progress of the upload myXhr.upload.addEventListener('progress', function(e) { if (e.lengthComputable) { $('progress').attr({ value: e.loaded, max: e.total, }); } } , false); } return myXhr; }, }); }); </script> and output tag in html:
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

BenjaminPross
Hello Soshi,

Is there a chance that you can have a look at the execute-request that has been generated by the API? That would be important in order to find out what goes wrong..

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
No, I just used API client and any execute-request isn't generated...
for creating execute-request, I use this function (...wps.execute(executeCallback, processId, responseFormat, executionMode, lineage, complexInput, complexOutput); ...)and for input, I use complexInput according this formule ( var complexInput = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band , Red_Band',
                                        'application/geotiff', 'undefined', 'UTF-8', asReference, 'undefined'); )...

and I'm not certain to introduce inputs correctly..
var asReference =  document.getElementById('input_file').value

and whether asReference  get a url of inputs...

and how about if I have two inputs .... what happens ... what should I do...
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

BenjaminPross
So the asReference parameter should be a boolean indicating whether the input is specified by a URL. This URL should be the last parameter of the method. It should be looking something like the following:

inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band , Red_Band',
                                        'application/geotiff', 'undefined', 'UTF-8', true, 'http://localhost:8080/uav/IMG_0503_5.tif'); )

If you want to create more than one input, you should do something like this:

var complexInput1 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band',
            'application/geotiff', 'undefined', 'undefined', true, 'http://localhost:8080/uav/IMG_0503_5.tif'); 
                       
var complexInput2 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('Red_Band',
            'application/geotiff', 'undefined', 'undefined', true, 'http://localhost:8080/uav/IMG_0503_3.tif'); 
                       
var inputs = [complexInput1, complexInput2];
       
        ...
                                                                       
wps.execute(executeCallback, processId, responseFormat, executionMode, lineage, inputs, complexOutput);
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
thank you for your reply...
I set everything and it seems to be ok but not happens and no error...

var execute_call = function(e){
                       
                                var wpsUrl = $('#wps').val();
                                var processId = $('#processes option:selected').text();
                               
                               
                                var inputGenerator = new InputGenerator();
                               
                                var complexInput1 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band',
                                        'application/geotiff', 'undefined', 'undefined', true, 'http://localhost:8080/uav/IMG_0503_5.tif'); 
                                var complexInput2 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('Red_Band',
                                        'application/geotiff', 'undefined', 'undefined', true, 'http://localhost:8080/uav/IMG_0503_3.tif'); 
                       
                                var inputs = [complexInput1, complexInput2];
                               
                                var outputGenerator = new OutputGenerator();
                               
                                var complexOutput = outputGenerator.createComplexOutput_WPS_1_0('output', 'undefined', 'image/jpeg', 'undefined',
                                'UTF-8', 'undefined', true , 'undefined', 'undefined');
                               
                               
                                // only eexecute if wpsUrl is a http url
                                if(wpsUrl.startsWith("http")){
                                        wps = new WpsService({url : wpsUrl, version : "1.0.0"});
                                        wps.execute(executeCallback, processId, 'raw', 'async' , true, inputs, complexOutput);
                                }
                }
               
               
                var executeCallback = function(response){
               
                        execute = response;
                       
                        execute.type = "rawOutput "
                        execute.serviceVersion = "1.0.0"
                       
                        var executeOuptut = execute.rawOutput;
                        $("div#raw_Output").val(executeOuptut);
                       
                };
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
log in tomcat 9:

2017-08-29 15:23:50,333 [http-nio-8080-exec-2] DEBUG org.n52.wps.server.WebProcessingService: Received POST: Content-Type = text/xml, Character-Encoding = UTF-8, Content-Length = 1105
2017-08-29 15:23:50,334 [http-nio-8080-exec-2] DEBUG org.n52.wps.server.WebProcessingService: POST request contained  1105 characters
2017-08-29 15:23:50,351 [http-nio-8080-exec-2] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 15:23:50,353 [http-nio-8080-exec-2] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 15:23:50,353 [http-nio-8080-exec-2] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 15:23:50,355 [http-nio-8080-exec-2] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 15:23:50,401 [pool-10-thread-3] INFO  org.n52.wps.commons.context.ExecutionContextFactory: Context registered
2017-08-29 15:23:50,408 [pool-10-thread-3] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 15:23:50,409 [pool-10-thread-3] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 15:23:50,410 [pool-10-thread-3] WARN  org.n52.wps.server.request.InputHandler: Could not find class org.n52.wps.server.r.NDVI
2017-08-29 15:23:50,414 [pool-10-thread-3] ERROR org.n52.wps.server.request.ExecuteRequest: Exception/Error while executing ExecuteRequest for org.n52.wps.server.r.NDVI: org.n52.wps.server.ExceptionReport: Possibly multiple or none matching generators found for the input data with id = "Red_Band". Is the MimeType ("application/geotiff") correctly set?
2017-08-29 15:23:50,421 [pool-10-thread-3] INFO  org.n52.wps.commons.context.ExecutionContextFactory: Context unregistered
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

BenjaminPross
Try these modifications:

                                var complexInput1 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('NIR_Band',
                                        'application/geotiff', '', '', true, 'http://localhost:8080/uav/IMG_0503_5.tif'); 
                                var complexInput2 = inputGenerator.createComplexDataInput_wps_1_0_and_2_0('Red_Band',
                                        'application/geotiff', '', '', true, 'http://localhost:8080/uav/IMG_0503_3.tif'); 
                       
                                var inputs = [complexInput1, complexInput2];
                               
                                var outputGenerator = new OutputGenerator();
                               
                                var complexOutput = outputGenerator.createComplexOutput_WPS_1_0('output', 'image/jpeg', '', '',
                                '', '', true , '', '');                                
                               
                                // only eexecute if wpsUrl is a http url
                                if(wpsUrl.startsWith("http")){
                                        wps = new WpsService({url : wpsUrl, version : "1.0.0"});
                                        wps.execute(executeCallback, processId, 'raw', 'sync' , true, inputs, [complexOutput]);
                                }
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
thank you, it works but has a log so far:

2017-08-29 16:55:40,734 [http-nio-8080-exec-1] DEBUG org.n52.wps.server.WebProcessingService: Received POST: Content-Type = text/xml, Character-Encoding = UTF-8, Content-Length = 1025
2017-08-29 16:55:40,735 [http-nio-8080-exec-1] DEBUG org.n52.wps.server.WebProcessingService: POST request contained  1025 characters
2017-08-29 16:55:40,753 [http-nio-8080-exec-1] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,755 [http-nio-8080-exec-1] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,755 [http-nio-8080-exec-1] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,756 [http-nio-8080-exec-1] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,760 [pool-10-thread-8] INFO  org.n52.wps.commons.context.ExecutionContextFactory: Context registered
2017-08-29 16:55:40,761 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,762 [pool-10-thread-8] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,763 [pool-10-thread-8] WARN  org.n52.wps.server.request.InputHandler: Could not find class org.n52.wps.server.r.NDVI
2017-08-29 16:55:40,766 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,768 [pool-10-thread-8] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,768 [pool-10-thread-8] INFO  org.n52.wps.server.request.InputHandler: Looking for matching Parser ... schema: "null", mimeType: "application/geotiff", encoding: "null"
2017-08-29 16:55:40,768 [pool-10-thread-8] INFO  org.n52.wps.io.ParserFactory: Matching parser found: org.n52.wps.io.datahandler.parser.GenericFileDataWithGTParser@124614f8
2017-08-29 16:55:40,768 [pool-10-thread-8] INFO  org.n52.wps.io.datahandler.parser.GenericFileDataWithGTParser: Found File Input application/geotiff
2017-08-29 16:55:40,771 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,773 [pool-10-thread-8] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,773 [pool-10-thread-8] INFO  org.n52.wps.server.request.InputHandler: Looking for matching Parser ... schema: "null", mimeType: "application/geotiff", encoding: "null"
2017-08-29 16:55:40,773 [pool-10-thread-8] INFO  org.n52.wps.io.ParserFactory: Matching parser found: org.n52.wps.io.datahandler.parser.GenericFileDataWithGTParser@124614f8
2017-08-29 16:55:40,773 [pool-10-thread-8] INFO  org.n52.wps.io.datahandler.parser.GenericFileDataWithGTParser: Found File Input application/geotiff
2017-08-29 16:55:40,773 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:40,774 [pool-10-thread-8] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:40,774 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Running GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
        Input data: [NIR_Band=[org.n52.wps.io.data.binding.complex.GenericFileDataWithGTBinding@2924bd3], Red_Band=[org.n52.wps.io.data.binding.complex.GenericFileDataWithGTBinding@7db4ae68]]
2017-08-29 16:55:40,890 [pool-10-thread-8] ERROR org.n52.wps.server.r.workspace.RWorkspaceManager: The config variable R_wdName references a non-existing directory. This will be an issue if the variable is used. The current strategy is 'default'.
org.n52.wps.server.ExceptionReport: Invalid config property of name "R_wdName" and value "myName". It denotes a non-existent path.
        at org.n52.wps.server.r.R_Config.getConfigVariableFullPath(R_Config.java:152) ~[52n-wps-r-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.r.workspace.RWorkspaceManager.prepareWorkspace(RWorkspaceManager.java:359) ~[52n-wps-r-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.r.GenericRProcess.run(GenericRProcess.java:186) [52n-wps-r-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:685) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:92) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
2017-08-29 16:55:43,059 [pool-10-thread-8] WARN  org.n52.wps.server.r.workspace.RWorkspaceManager: Failed to delete temporary WPS Workdirectory 'D:\Program Files\Apache Software Foundation\Tomcat 9.0\temp\wps4r-workspace-2017829-165540_5c7cbf01', remaining files: [D:\Program Files\Apache Software Foundation\Tomcat 9.0\temp\wps4r-workspace-2017829-165540_5c7cbf01\ndvi.jpeg]
2017-08-29 16:55:43,061 [pool-10-thread-8] INFO  org.n52.wps.server.r.GenericRProcess: Initializing description for GenericRProcess [script = D:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\wps\R\scripts\NDVI.R]
2017-08-29 16:55:43,062 [pool-10-thread-8] INFO  org.n52.wps.server.r.LocalRAlgorithmRepository: Algorithm under name 'org.n52.wps.server.r.NDVI' added: GenericRProcess [script = null, annotations = [RAnnotation [type=DESCRIPTION, attributeHash={title=NDVI for raster, id=NDVI}], RAnnotation [type=INPUT, attributeHash={id=Red_Band, type=geotiff}], RAnnotation [type=INPUT, attributeHash={id=NIR_Band, type=geotiff}], RAnnotation [type=OUTPUT, attributeHash={id=output, type=image/jpeg}]]]
2017-08-29 16:55:43,062 [pool-10-thread-8] INFO  org.n52.wps.server.response.ResponseData: Using generator org.n52.wps.io.datahandler.generator.GenericFileGenerator for Schema: null
2017-08-29 16:55:43,063 [pool-10-thread-8] INFO  org.n52.wps.commons.context.ExecutionContextFactory: Context unregistered
2017-08-29 16:55:43,063 [http-nio-8080-exec-1] INFO  org.n52.wps.server.handler.RequestHandler: Served ExecuteRequest.
Reply | Threaded
Open this post in threaded view
|

Re: Running a javascript client api using R process

soshi
what's R_wdName for and what's the suitable value for it??
and also I received output in seperate window not in div tag with raw_Output id....

var executeOuptut = execute.rawOutput;
                        $("div#raw_Output").val(executeOuptut);