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 6953645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:30:22+00:00 2026-05-27T14:30:22+00:00

I realize that there are other posts asking similar questions, but do not quite

  • 0

I realize that there are other posts asking similar questions, but do not quite answer the question I have. I apologize if this is not enough info, formatting is off, or whatnot. Its my first time posting.

Basically my group is doing an iPhone app that needs to interface with our sql server database. But because they can’t talk directly with eachother we are implementing an asp.net medium that will accept XML and apparently will need to output JSOD. Currently I have a .asmx written with “working” code (test string inside code). Right now I am just trying to accept the XML from the iPhone. I feel like we are missing something either on his end (iPhone) or my end (.asmx). Hopefully you bright minds out there can fill me in because with our combined research….i feel theres something missing. Maybe im wrong and Ive we’ve got our stuff together which would be awesome.

apparently this is all he needs (according to his research) on his end in order to connect and transfer the information. obviously its not .asmx but it shouldn’t matter the extension right?
NSURL *url = [NSURL URLWithString:@"http://myurl.com/RequestHandler.ashx"];

Here is the code that I have with my .asmx (note the function is where the meat is at)

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Xml.Linq;

    namespace Outbreak_Mobile
    {
        [WebService(Namespace = "http://OutbreakMobile.net/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
        // [System.Web.Script.Services.ScriptService]
        public class Service1 : System.Web.Services.WebService
        {
            [WebMethod (Description="To intake an xml package from iPhone and store it")]
            public string iPhoneLocation(string xml)
            {
                //test string to output to screen
                string location = null;

                //test string of xml to be parsed
                //will be converting next line to parse input xml
                //string xml = @"<Player>
            //                  <Latitude>42.13245465</Latitude>
            //                  <Longitude>11.11111111</Longitude>
                //               </Player>";

                //line to parse document
                //xdocument doc = xdocument.parse(incoming xml)
                XDocument doc = XDocument.Parse(xml);

                //grabs the information inside <player> tags
                XElement loc = doc.Elements("Player").SingleOrDefault();

                if (loc != null)
                {
                   var lat = (double)loc.Element("Latitude");
                   var lng = (double)loc.Element("Longitude");

                   location = "Lat: " + lat + '\n' + "Long: " + lng;
                }

                //this is what puts out to the screen
                return location;

            }
        }
    }

currently the output of the string ‘location’ was just for functionality testing and will change when I know that I am receiving the packages correctly. What are we missing in order to connect with one another?

Thank you all in advance!

  • 1 1 Answer
  • 2 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-27T14:30:22+00:00Added an answer on May 27, 2026 at 2:30 pm

    You created a NSURL object. Now you need to create a NSURLConnection to download the data from that URL.

    http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html

    And to transfer the NSData object you got from the connection just use NSString -initWithData:encoding: method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize that there are many similar questions, but most involve scaling down the
I realise there might be similar questions but I couldn't find one that was
I realize that the answer to this question is likely quite obvious (if somewhat
I realize that there are a couple other posts on this topic, however the
I realize there's a million of these posts but none of them have helped
I realize that a SO user has formerly asked this question but it was
Here's a bit of an odd question that's partially covered in some other posts,
I know this is a basic question, but I can't find other StackOverflow posts
I realize (having read other posts on SO as well) that it's bad design
I realize there have already been a number of posts on n-tier design and

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.