Problems with a web call when coompiled

Hi people, I’m trying to compile my application, and i have a method that is called from web, everything works perfect in interpreted, but when i try to execute it in compiled it shows me an error like “invalid parameters in an Execute command”, i’ve tried to move everywhere but nothing seems to work, so i need some help to find the problem.

Thanks for your help

: Jorge Ricardo SANCHEZ

COCUNUBO

Hi people, I’m trying to compile my application, and i have a method
that is called from web, everything works perfect in interpreted, but
when i try to execute it in compiled it shows me an error like
“invalid parameters in an Execute command”, i’ve tried to move
everywhere but nothing seems to work, so i need some help to find the
problem.

IMHO you should give the the code of this method

My first thought is one of the following:

  1. You are using the Execute command along with local variables.

  2. You are referencing a method that uses the Execute command, and it is using local variables.

Just a quick idea…

Best,

Steve

: Steve ORTH

My first thought is one of the following:

  1. You are using the Execute command along with local variables.

  2. You are referencing a method that uses the Execute command, and it
    is using local variables.

Just a quick idea…

Best,

Steve

My two cent he forgot to type some $0

You MUST declare $1 as a text variable, even if you don’t actually use it

C_TEXT($1)

SOUB, you owe me 2cts

: Olivier DRUT

SOUB, you owe me 2cts
yes

Hi, thanks everybody for your help, i just made some weird tests and i dont understand what happen with this, i’ll show you

<code 4D>

//If (Not(CORS_EvaluarCors ))

//TRACE

ARRAY TEXT($headers;0)
ARRAY TEXT($values;0)

ARRAY TEXT($varNom;0)
ARRAY TEXT($varInfo;0)

C_OBJECT($result;$info;$vwDoc;$movimiento;$docold;$extra;$ctoDoc)
C_OBJECT($dlold;$docLote;$stdoc;$cto;$tdoc;$doc)
C_LONGINT($idDoc;$pos)
C_BOOLEAN($body)
C_TEXT($textInfo)

$result:=New object
$body:=False

WEB GET HTTP HEADER($headers;$values)

If (Size of array($headers)>0)
$pos:=Find in array($headers;"@Content-type")
If ($pos>0)
If ($values{$pos}="@json@")
$body:=True
End if
End if
End if

If ($body)
WEB GET HTTP BODY($textInfo)
$info:=JSON Parse($textInfo;Is object)
Else
WEB GET VARIABLES($varNom;$varInfo)
If (Size of array($varNom)=1)
$info:=JSON Parse($varInfo{1};Is object)
End if
End if

//$idx:=New process(“TMP_CheckErrCompWeb”;0;“CargandoWeb”;$info)

// Solo de prueba

$result.status:=True
$result.message:=“OK”

WEB SEND TEXT(JSON Stringify($result))
//End if

</code 4D>

I already commented many of this code just for testing to see what happened, but nothing changes, it’s weird because after i remove this, the error still exist and i see nothing that could damage this call, i also put the 6 parameters in the methods on web connection and on web authentication but nothing changes

What else could i do?

Thanks for your answers

Sorry, i missed something, i activate this method as available through 4D tags (4DACTION)

:mrgreen:

Hey people, im so happy, finally i’ve discovered what was wrong with it, exactly as you said, every web call needs to declare all parameters, from 0 to 6, like in on web connection, i did it and it works like a charm

Thanks for all your help