Voting: 
Vote up!
6 Votes
6 Replies
Answered

Problem while uploading images on server directory

Question asked by ashish belose on Jul 08, 2014 06:04 EDT

Hello, I am trying to upload image file from emulators galary to server using JAVA service; but my code is not executing properly, it is giving me opstatus as 1000. I have converted my image to base64 and trying to transfer that string to java service. When I am testing this service from the [Java service details tab] under [Java service definition] its working fine; but unable to upload file using emulator. Please help me to solve this problem. Regards, Ashish

Vote up!
0 votes
Vote down!

Hi,
 
Could you please let us know the error/exception that you are getting. Please share us the following details as well.
 
1) middleware.log file
 
2) data of "adb logcat " 
 
3) Please share us your code snippets and the java service class.
 
4) Please give us the screen shot of service defination tab and the output parameters.
 
5) if possible please share us your sample app. 
 
Thanks,
 
Naresh

Replied by: Jul 09, 2014 05:43 EDT
Vote up!
0 votes
Vote down!

Hi Naresh, 

Please find attached projects (Java as well as Kony) and all the required documents.

For testing Java code I used local machine path.

Code is working fine when I am hitting service from Java service definition window; but problem is whem I hit it from emulator.

Please revert me ASAP.

Thanks and Regards,

Ashish.

Replied by: Jul 09, 2014 08:37 EDT
Kony Answered Certificate
Vote up!
2 votes
Vote down!

Hi Ashish,

Please increase the post data value [bytes] in antisamy-1.3.xml in your middleware bootconfig folder (middleware\middleware-bootconfig). Post size is restricted to avoid dos attacks as per owsap.

<directive name="maxInputSize" value="20000"/>

Please let me know if any.

Regards

Srinivas Kolaparthi

Answered by: Jul 09, 2014 12:54 EDT
Vote up!
0 votes
Vote down!

Hi Srinivas,

Yepeeee!!!! the file is uploaded successfully.

thanks for your help srinivas and Naresh. :)

 

Regards,

Ashish B.

Replied by: Jul 10, 2014 00:36 EDT
Vote up!
0 votes
Vote down!

Hi Ashish,

When i tried above attached sample application for uploading I am getting some issues.

I am attaching screen shots.

Please suggest me to solve issue.....

Regards,

Madhu

Replied by: Aug 01, 2014 05:44 EDT
Vote up!
0 votes
Vote down!

Hi Madhu,

We had tested the application.We undestood from the code that he had hardcoded all the directory and file locations of the image in java service(as per  desktop image locations).

So,you were facing issues with the App.Please make necessary modifications in java service(in the  file named Constants.java) to test the app successfully.

Please let me know if any.

Reagards

Srinivas Kolaparthi

Replied by: Aug 04, 2014 02:14 EDT