Access Endpoint by Java

Access Endpoint of "Get Data by Barcode" which was created on example "Manage Item by Barcode by using Camera on Web Browser" by Java.

Create based on a sample code on Endpoint page url = new"");    <From here, copy from Template> con = ( url.openConnection();
con.setRequestProperty("Content-Type", "application/json"); pw = new, "utf-8")));
		+ "\"TOKEN\": \"?????\","
		+ "\"param_AssetInfo_Barcode_where\": \"9784845623556\""             Specify Barcode to get data
		+ "}");
pw.close(); reader = new, "UTF-8"));
String buffer = reader.readLine();

System.out.println(buffer);      <Until here, copy from Template>

After execute, result will be displayed as below:

{"Result":{"Barcode":"9784845623556","ItemName":"DEF Travel Book","Description":"This is DEF..."},"_status":"OK","Message":"Successfully called"}

※In case of Java, additional code is requied to encode/decode JSON. So, it doesn't handle in this sample.
※With Custom Development Option, some class will be created by development cloud such as Client Access Class and JSON data class to encode/decode JSON and store data into Java class. Supported both simple access and Async Task Loader pattern of Android's Java.

Back to top

LoginLogin with this Site's User Name (ID)
Quick Login:Quick Login by Facebook ID (Keep Login Option:ON) / Newly Register


© 2016-2023 Matsuesoft Corporation