[Stackoverflow] [Progress OpenEdge ABL] Progress PASOE - PUT Method with invoke operation does not work

Status
Not open for further replies.
A

Alberto

Guest
Good Morning:

I am working with Progress PASOE technology to make REST requests but suddenly I am facing an unexpected and wierd issue.

This is the PUT method that I was using:

Code:
 @openapi.openedge.export(type="REST", useReturnValue="false",writeDataSetBeforeImage="false").
@progress.service.resourceMapping(type="REST", operation="invoke",URI="/ObtieneListaFicheros?numfic=~{numfic~}", alias="", mediaType="application/json").
METHOD PUBLIC VOID ObtieneListaFicheros( 
    INPUT numfic AS INTEGER,
    OUTPUT DATASET dsficheros ):
        
    DEFINE VARIABLE chDirectorio AS CHARACTER NO-UNDO.
    DEFINE VARIABLE chLinea AS CHARACTER NO-UNDO EXTENT 3.
    
    EMPTY TEMP-TABLE ttFICHEROS.
    
    FIND CAFISO NO-LOCK WHERE CAFISO.NUMFIC = numfic NO-ERROR.
    IF NOT AVAILABLE CAFISO THEN DO:
        MESSAGE "No existe el registro de solares".
        RETURN.
    END.
        
    chDirectorio = "P:\Juridica\Solares\" + TRIM(STRING(CAFISO.FICGEN)).
    FILE-INFO:FILE-NAME = chDirectorio.    
            
    message "FILE-INFO:FULL-PATHNAME " FILE-INFO:FULL-PATHNAME.                
            
    IF FILE-INFO:FULL-PATHNAME <> ? THEN DO:
        INPUT FROM OS-DIR(chDirectorio).
        REPEAT: 
            
            IMPORT chLinea.
            
            IF chLinea[3] <> 'F':U THEN NEXT.
            
            CREATE ttFICHEROS.
            ASSIGN ttFICHEROS.NUMFIC = CAFISO.NUMFIC
                   ttFICHEROS.FICGEN = CAFISO.FICGEN
                   ttFICHEROS.NOMBRE = chLinea[1]
                   ttFICHEROS.RUTA = chLinea[2]                       
                   iSeq         = iSeq + 1
                   ttFICHEROS.id  = STRING(iSeq)
                   ttFICHEROS.seq = iSeq.
            
        END.           
        INPUT CLOSE.                     
    END.
END METHOD.

Where P is a mapped unity which is supposed to be accesible. But, if I try to run this request with Postman I get the following answer:

Screenshot

My first attempt was to comment code lines to track where the problem lied, and literally removed everything in the method. But it still didn´t work.

So, I created a test method with nothing inside and tried again:

Code:
@openapi.openedge.export(type="REST", useReturnValue="false",writeDataSetBeforeImage="false").
 @progress.service.resourceMapping(type="REST", operation="invoke",URI="/test", alias="", mediaType="application/json").
 METHOD PUBLIC VOID test():
     
     message "I am trying to use a PUT method!".
      
 END METHOD.

And this is the result

I restarted PASOE instance (in Developer Studio) also with no success. Other methods are working properly, and I am only experiencing problems with PUT/invoke in this case, as in the past I have used this operation without problems. What am I missing? It´s really frustrating because this 500 error does not give any clue.

This are the requests:

https://192.168.1.210:8841/nynweb/rest/nynwebService/cafiso/ObtieneListaFicheros?numfic=1 https://192.168.1.210:8841/nynweb/rest/nynwebService/cafiso/test

And I am using OpenEdge 12.2 in Windows 10.

I will appreciate any help, as I am really stuck.

Regards!

Continue reading...
 
Status
Not open for further replies.
Top