Symptom
User is running a DCN Request to the Sybase Unwired Platform HttpAuthDCNServlet with special characters. Since they are using special characters, they are attempting to use URLEncoder per the documentation at http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01781.0222/doc/html/fre1274136945492.html.
1. User attempts Java code such as:
String urltest="http://"+ server +":8000/dcn/DCNServlet?cmd=dcn&username=supAdmin&password=s3pAdmin&domain=default";
urltest+="&package="+URLEncoder.encode("sup101:1.0",encode1);
urltest+="&dcn_request="+ URLEncoder.encode("{\"pkg\":\"sup101\",\"messages\":[{\"id\":\"4\",\"mbo\":\"Customer\",\"op\":\":upsert\",\"cols\":{\"address\":\"testaddr\",\"city\":\"test city\",\"company_name\":\"test&co\",\"fname\":\"test@fn\",\"id\":555,\"lname\":\"test+ln\",\"phone\":\"testpn\",\"state\":\"MX\",\"zip\":\"testzp\"}}]}",encode1);
2. Problem is data in CacheDB database is not encoded properly and characters such as @ + & are causing HTTP 400 errors with invalid JSON request or data is showing up as %40 %20 or other invalid non-encoded characters.
Read more...
Environment
- Sybase Unwired Platform 2.2.4
- DCN Request
- MBO
Product
Keywords
- DCN
- Special Characters
- HttpAuthDCNServlet
- EncodeURL
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview