NSData *topImageData = UIImageJPEGRepresentation(pickedImage, 1.0);
NSString *myString=[NSString stringWithFormat:@"%@",topImageData];
NSArray *keysArray=[NSArray arrayWithObjects:@"transactionId",@"image",nil];
NSArray *objectsArray=[NSArray arrayWithObjects:@"1",myString,nil];
NSDictionary *theRequestDictionary=[[[NSDictionary alloc] initWithObjects

bjectsArray forKeys:keysArray] autorelease];
NSArray *keysArray1=[NSArray arrayWithObjects:@"transactions",nil];
NSArray *objectsArray1=[NSArray arrayWithObjects:theRequestDictionary,nil];
NSDictionary *myRequestDictionary=[[NSDictionary alloc] initWithObjects

bjectsArray1 forKeys:keysArray1];
NSURL *theURL = [NSURL URLWithString:@"http://10.10.39.92:8080/taxdeductableproductfinder/calculator/tax/image"];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:theURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10.0f];
[theRequest setHTTPMethod:@"POST"];
[theRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSString *theBodyString = [[CJSONSerializer serializer] serializeDictionary:myRequestDictionary];
NSString *appendedBodyString=[NSString stringWithFormat:@"analysisRequest={\"productFinde rRequest\":%@}",theBodyString];
NSLog(@"Request in JSON Format ->%@", appendedBodyString);
NSData *theBodyData = [appendedBodyString dataUsingEncoding:NSUTF8StringEncoding];
//NSLog(@"Request Body-->%@", theBodyData);
[theRequest setHTTPBody:theBodyData];
NSURLResponse *theResponse = NULL;
NSError *theError = NULL;
NSData *theResponseData = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&theResponse error:&theError];
NSLog(@"response data %@",theResponseData);