user2055259
user2055259

Reputation: 21

Error 500 Calling Rest Web Services iphone sdk

I have two web services's url :

I am following thse steps to call web service :

I am making url from these string.

+ Passing url to
+ NSMutableURLRequest * request   
+ [request setValue:[prefrences
valueForKey:@"Cookie"] forHTTPHeaderField:@"Cookie"]   
+ [request setHTTPMethod:@"GET"]   [request setHTTPBody:[jsonPostBody
dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]];  
+ [request setValue:@"application/json"
forHTTPHeaderField:@"Content-Type"];   
+ [request setValue:postDataLengthString forHTTPHeaderField:@"Content-Length"];
+ [NSURLConnection connectionWithRequest:request delegate:self];

In this procedure First url is working fine for me but Second url giving error with status code 500.

Please help me out. What problem is this web services are same and of same type. But one is working fine and another giving me error ?

Upvotes: 0

Views: 128

Answers (1)

John
John

Reputation: 2660

500 error code is usually internal error to the web service. So you will have to check the web service to see if you can get an idea from there.

Upvotes: 1

Related Questions