Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6988239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:03:08+00:00 2026-05-27T19:03:08+00:00

WebService is capable of giving response in XML, Plain Text and JSon. I can

  • 0

WebService is capable of giving response in XML, Plain Text and JSon.

I can successfully get response in XML.
My concern is, how one can get Response in JSon format (not XML or plain text).

- (void)connectionDidFinishLoading:(NSURLConnection *)connection 
{
   NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    SBJsonParser *parser = [[SBJsonParser alloc] init];
    NSMutableArray *array = [parser objectWithString:responseString error:nil];

    NSString *success = [array valueForKey:@"Successful"];
    NSString *token = [array valueForKey:@"Token"];
}

Above is the code for handling the response (Which i did assume JSon, but it was XML).
Hence the app is crashing.

Following is the responce which i am getting:

<AuthenticatedUser xmlns="http://schemas.datacontract.org/2004/07/XYZCOMPANY.ABC.DataContracts.Mobile" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorMsg i:nil="true"/><Successful>true</Successful><Token>MHlc8yKBgghjkfPHZ2oOvabvMWA=</Token></AuthenticatedUser>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:03:09+00:00Added an answer on May 27, 2026 at 7:03 pm

    if you are not hitting the wrong endpoint you probably need to set the http accept header to “application/json” like @rckoenes said. What you can also do is try to hit the service using CURL or even your web browser to see if the json service is running.

    Here is the code it is working for me for requesting a local JSON service created by SOAPUI:

    NSURLRequest *request = [[NSURLRequest alloc]
                            initWithURL: [NSURL URLWithString:SERVERURL]
                            cachePolicy: NSURLRequestReloadIgnoringLocalCacheData
                            timeoutInterval: 10];
    
    NSURLConnection *connection = [[NSURLConnection alloc]
                            initWithRequest:request
                            delegate:self
                            startImmediately:YES];
    if(!connection) {
            DLog(@"connection failed");
    } else {
            DLog(@"Connection succeeded");
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java webservice, that must return a response if the login is
This webservice is almost converted form VB to C#, except I get this error
I am making a webservice (can't shift to wcf due to .net req). My
XML Webservice: the webservices takes in an XML request and responses with a XML
webservice.PService pService = new Project.webservice.PService(); var v3 = passportService.HelloWorld(); Response.Write(v3); I debugged it and
A webservice of mine returns an object in the following format. {UserID:338040a3-6587-42bf-b22e-dc88f4ea3a9c,CompanyID:823946a4-29d0-4546-a7ca-790648cf1e1a,FirstName:Maxim,LastName:Gershkovich,Username:MaximG,Password:62198e58d57843967bc34824be77ee2f1e2abcbbe389dc41c06810ed6f9561bf,Email:email@email.net.au,SignupDate:/Date(1272631625210)/,IsAdmin:true,LoginTime:/Date(1297129238517)/} What is
I'm developing a webservice using a WSDL (contract-first) that defines one of it's fields
My WCF webservice is returning C# DateTime objects as JSON like this, /Date(1293793200000+1300)/ I
My webservice produces a Service not available error first, then when I restart the
The webservice returns the following string ID: xxxx Status: yyyy How do I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.