1. Luis Pesaressi
  2. PowerServer Mobile (Obsolete)
  3. Wednesday, 3 March 2021 03:54 AM UTC

Hi, we need send JSON to API of a client, but have estrange problem

when send of the mobile this JSON

{

"CUD":"0600050000963933550106",

"Estado":"Entregado",

"SubEstado":"Entrega Exitosa",

"Courier":"CONECTA",

"Fecha":"2021-03-02 21:54:57",

"TrackNumber":"IQEN7UJR1T",

"Placa":"F6L467",

"IDReceptor":"11111111",

"URL":"www.conecta.net.pe",

"NombreReceptor":"DDDDDD"

}

 

 

li_return = lnv_HttpClient.SendRequest("POST",ls_web_service,ls_json)

 

the client receive the field "Fecha":"2021-03-02 21:54:57 "

with space blank in end of text

 

and return ERROR of format

{"success":false,"message":"Fecha must have the following format 2021-03-02 21:55:00","code":605}

 

BUT when send the same JSON of Client Server Application  the client  receive  OK

 

we not send space black ,we review all the text

 

Please, somebody know  what append

 

thank

Luis

 

 

 

 

 

 

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 March 2021 18:33 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hi Luis;

    Can you tell us ...

1) Version & Build of PowerServer that you are using?

2) Have you tried this code in a PS Web Application?

3) Is your Application Profile in the PS Toolkit set as "Both"?

    If so, what if you create two profiles ... one for Web and one for Mobile.

    Upon re-deployment - does the WS call work OK now?

Regards ... Chris

Comment
  1. Luis Pesaressi
  2. Friday, 31 December 2021 18:08 PM UTC
HI

Sorry for delay,

I try all step that you say, and not work, I had to change the process and create a procedure that sends from the server, because when it is sent from the cell phone, the API does not work, it receives the date with an additional space at the end of the string

  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 3 January 2022 15:37 PM UTC
Hi Luis;

If this is a repeatable error and you can create a simple test case, please open a Support Ticket for this problem.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Luis Pesaressi Accepted Answer Pending Moderation
  1. Thursday, 4 March 2021 04:00 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

Hi Chris    send info thanks

 

1) Version & Build of PowerServer that you are using?

Product Version: Appeon PowerServer 2020 Build 2670.00

 

2) Have you tried this code in a PS Web Application?

NO, just Mobile and CS

 

 

3) Is your Application Profile in the PS Toolkit set as "Both"?

    If so, what if you create two profiles ... one for Web and one for Mobile.

 

NO , have two app une Mobile and CS, but the function 

li_return = lnv_HttpClient.SendRequest("POST",ls_web_service,ls_json) is in library common 

 

 

 

    Upon re-deployment - does the WS call work OK now?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 4 March 2021 16:54 PM UTC
Hi Luis;

Thank you for that extra information!

Can you check the following ...

1) Select the "Package" icon from the PS Toolkit's toolbar.

2) In the next dialogue, select the "PowerServer Mobile Templates Manager" link on the lower LH-side.

3) In the next dialogue - Check the Android and iOS templates to see if any of these need updating.

4) If an update is required, highlight the template needing to be installed & press the "Install" CB

5) Repeat #4 for all uninstalled templates.

6) If templates were updated, then perform an App full build & then re-deploy the Mobile App via the PS Toolkit's toolbar. Then re-test.

HTH

Regards ... Chris
  1. Helpful 1
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 4 January 2022 06:45 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 3

Hi Luis,

I did not reproduce the issue you described. Please make sure the JSON string is correct before passing it to the SendRequest function. Please open a support ticket in the support portal  and provide the information below for more study, thanks.
1. Did you get the issue on Android or iOS?
2. Are you running the application in standard Appeon Workspace?
3. The OS version of the device and Appeon Workspace version on the device.
4. A sample PB case and sample web service to reproduce the issue.

Regards,
Kai

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.