?
Solved

Using HTTP Get with XML web services

Posted on 2011-10-04
1
Medium Priority
?
319 Views
Last Modified: 2012-05-12
I'm using the following in a button click:

NSString *queryString =
    [NSString stringWithFormat:@"http://agraws.agraind.com/AMSInfo.asmx/ValidateUserID?input=%@", userID.text];
    NSURL *url = [NSURL URLWithString:queryString];
    NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
    [req addValue:@"text/xml; charset=utf-8"
    forHTTPHeaderField:@"Content-Type"];
    [req addValue:0 forHTTPHeaderField:@"Content-Length"];
    [req setHTTPMethod:@"GET"];  

 conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];
    if (conn) {
        [activityIndicator startAnimating];
        webData = [[NSMutableData data] retain];
    }  



But when I write to the log in the connectiondidfinishloading method I recieve the following HTTP error:
<head>
        <title>Request format is unrecognized for URL unexpectedly ending in '/ValidateUserID'.</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}....


Any help would be great.
0
Comment
Question by:thenrich
1 Comment
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 36911671
Unless you have 'rewrite' working on that server, you need an extension on the filename to make it complete like:

http://agraws.agraind.com/AMSInfo.asmx/ValidateUserID.php?input=%@
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What's a UDID? If you're involved in developing, testing, or even reviewing an iOS application that's in beta, then at some point you may need to know the UDID for any iOS devices that you'll be testing on. What's the UDID? It stands for Unique Dev…
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question