IBM Support

JR63764: HTTP REQUEST - GET METHOD

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • 1) Is this a 24x7 support request:
    
    No
    
    2) Statement of the problem:
    
    The 'HTTP Request' command is not returning a response when
    using the GET method accompanied by a header. We are able to
    reproduce the same situation in the API Tester
    site(https://apitester.com/) and everything goes well.
    
    
    3) Is the problem Reproducible?
    
    Yes, everyone can reproduce it.
    
    
    4) Reproduction steps:
    
    The client have already created a script that simulates the
    situation, all you have to do is run the code and analyze the
    outputs on global variables.
    
    
    Script:
    
    defVar --name respostaAPI --type String
    
    defVar --name valorClientID --type String --value
    "cm9ib2IydGRzZGgxMjExMjA="
    
    defVar --name valorClientSecret --type String --value
    "MjAxMTEycm9ib2IydGRzZGg="
    
    defVar --name success --type Boolean
    
    defVar --name statusCode --type Numeric
    
    defVar --name access_token --type String
    
    defVar --name token_type --type String
    
    defVar --name expires_in --type String
    
    defVar --name codigoSistema --type String
    
    defVar --name cabecalhos --type StringDictionary --innertype
    String
    
    defVar --name auth --type String
    
    defVar --name header --type String
    
    defVar --name cookies --type CookieContainer
    
    defVar --name contentType --type String
    
    defVar --name fraseRazao --type String
    
    defVar --name cabecalhosSaida --type StringDictionary
    --innertype String
    
    defVar --name cabecalhosConteudo --type StringDictionary
    --innertype String
    
    httpRequest --verb "Post" --url "https://api.prd.sistemaindustr
    ia.com.br/api-autenticacao/oauth2/token?grant_type=client_crede
    ntials&client_id=${valorClientID}&client_secret=${valorClientSe
    cret}"--formatter "FormUrlEncoded" --data
    "grant_type=client_credentials" success=success
    respostaAPI=value statusCode=statusCode
    
    mapJson --json "${respostaAPI}" --mappings "access_token=${acce
    ss_token},token_type=${token_type},expires_in=${expires_in}"
    
    logMessage --message "PRIMEIRO REQUEST\r\nstatusCode:
    ${statusCode}\r\nsuccess: ${success}" --type "Info"
    
    logMessage --message "[${access_token}]\r\n[${token_type}]\r\n[
    ${expires_in}]\r\n[${codigoSistema}]"--type "Info"
    
    strDictAdd --key "Content-Type" --value
    "application/x-www-form-urlencoded" --dictionary ${cabecalhos}
    
    strDictAdd --key Authorization --value "${token_type}
    ${access_token}" --dictionary ${cabecalhos}
    
    httpRequest --verb "Get" --url "https://ws3.sistemaindustria.or
    g.br:9443/api-dh/dh/colaboradores/13214356658/dados"--headers ${
    respostaAPI=value statusCode=statusCode fraseRazao=reasonPhrase
    cabecalhosSaida=headers cabecalhosConteudo=contentHeaders
    
    logMessage --message "SEGUNDO REQUEST\r\nrespostaAPI:
    ${respostaAPI}\r\nstatusCode: ${statusCode}\r\nsuccess:
    ${success}" --type "Info"
    
    logMessage --message "fraseRazao:
    ${fraseRazao}\r\ncabecalhosConteudo:
    ${cabecalhosConteudo}\r\ncabecalhosSaida: ${cabecalhosSaida}"
    --type "Info"
    
    
    
    5) Product(s) version (incl. Fixpack Level) / DBMS Product &
    Version:
    
    IBM RPA STUDIO ? V 20.12.5
    
    6) L2 Engineer analysis:
    
    Only debugging the code we are able to see that the command is
    not working correct.
    
    7) MustGather info - Logs and Traces:
    
    8) Have you had a peer review by another L2?
    
    No
    
    Update Made By: Arnaldo Neto
    *If you need me to reproduce the scenario, I am here to help.
    

Local fix

  • IBM RPA STUDIO VERSION 20.12.5
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users that use httpRequest command.                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The command is not working using Get method with headers and *
    * return the value null.                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • In the script HttpCommandGetMethod.wal the httpRequest command
    with verb GET did not work.
    It was solved adding functionality that allows accepting
    "Content-Type" in the Header
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR63764

  • Reported component name

    RPA

  • Reported component ID

    5737N5100

  • Reported release

    K00

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-05-31

  • Closed date

    2021-09-10

  • Last modified date

    2021-09-10

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RPA

  • Fixed component ID

    5737N5100

Applicable component levels

  • RK00 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSC50T","label":"IBM Robotic Process Automation"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"K00","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
05 November 2021