Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

registerAndroid.jssp

Avatar

Community Advisor

Hi guys,

 

we are hit this registerAndroid.jssp page in order to register a new app user via POST request.

 

Point is that is working when in request is used Content-Type: application/x-www-form-urlencoded to pass registration variables, but not working when used Content-Type: application/json and parameters passed in JSON. Returned error: Error=2 which means missing params.

In first way, parameters are passed as plain text (Each key-value pair is separated by an & character, and each key is separated from its value by an = character).

 

Does anyone know if there is a constraint for passing parameters in JSON? I have looked registerAndroid.jssp and used functions and there is not part of code like: JSON.stringify();

 

Regards,

Milan

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

The content-type encoding is used by Tomcat to specify which processing it should perform on the request, e.g. make kv pairs available in a parameters object. If you wish to change the request serialization from form to json, you'll have to change both sides, app and jssp.

 

NB For push token registration the approach you're describing sounds extra unusual. Normally token reg is the domain of the app signup flow, copied into Campaign via standard etl. In unusual circumstances, the sdk is used for registration directly with Campaign app servers, now exposed to the public internet with limited ootb ability to handle high volume, and with a new outbound etl needed to export the data out. The sdk ships with a jssp (and a workflow to expire unregistered tokens) for a turnkey solution, which shouldn't have to be rewritten?

 

Thanks,

-Jon

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

The content-type encoding is used by Tomcat to specify which processing it should perform on the request, e.g. make kv pairs available in a parameters object. If you wish to change the request serialization from form to json, you'll have to change both sides, app and jssp.

 

NB For push token registration the approach you're describing sounds extra unusual. Normally token reg is the domain of the app signup flow, copied into Campaign via standard etl. In unusual circumstances, the sdk is used for registration directly with Campaign app servers, now exposed to the public internet with limited ootb ability to handle high volume, and with a new outbound etl needed to export the data out. The sdk ships with a jssp (and a workflow to expire unregistered tokens) for a turnkey solution, which shouldn't have to be rewritten?

 

Thanks,

-Jon

 

Avatar

Level 1

Hi @Jonathon_wodnicki,

 

our tracking server is exposed to the internet and when app registration request comes it is redirected to the app server (registerAndroid.jssp).

This is suggested by Adobe consultant. 

 

Point here is that request is sent from SDK library with JSON parameters by default and .jssp page is returning an error but when we hit our endpoint from SOAP UI with Content-Type: application/x-www-form-urlencoded it is working fine and record is stored in AC table. 

 

The problem is that the request is sent out from the SDK library so we don’t have any control to set the content type in the request header. 

I just need to know if .jssp page cannot handle JSON parameters. I did not find any JSON.stringify() inside and it is not allowed to change this page.

 

Regards,

Milan

Avatar

Community Advisor
I'm not following. The sdk is sending content-type application/json with its registerDevice() call? The jssp is definitely not written for json.

Avatar

Community Advisor
Hi @Jonathon_wodnicki, you have answered my question. This .jssp page is not written to handle json. I am not sure that sdk sends json by default, i have been told that by app team. Will check. Thank you once again.