Vuforia veritabanımıza resim upload etmek için hazır java sınıflarınızı kullanmak istedik fakat çözemediğimiz bir sorun var.
DeleteTarget, GetAllTargets, GetTarget fonksiyonlarını çalıştırıyoruz ama PostNewTarget ve UpdateTarget fonksiyonlarını çalıştırdığımızda aşağıdaki gibi bir hata alıyoruz.
We try to upload images to cloud database with java samples from vuforia developer web site.
With same samples we can run DeleteTarget, GetAllTargets, GetTarget functions but can not run PostNewTarget and UpdateTarget functions.
We get following error:
run:
POST
a59cc9dcfdcb1b59cd7a4ef543602445
application/json
Thu, 19 Nov 2015 15:21:17 GMT
/targets
Respons Body: {"result_code":"Fail","transaction_id":"4f24e8b41b764494bc3a25c88716b308"}
Created target with id:
BUILD SUCCESSFUL (total time: 13 seconds)
Here is the list of libraries we added:
java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Date;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.cookie.DateUtils;
import org.apache.http.message.BasicHeader;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import org.json.JSONObject;
Hello,
We believe this is related to the JSON schema being incorrect.
For this case, the `image` and `application_metadata` are not sent as String JSON objects? Can you send the body of the request in raw form as you are sending for further evaluation?
If you prefer to keep that private, please upload to a file share service and PM me the link.
Thanks