Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 30, 2008, 07:30 AM   #1
sujithkrishnan
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
how to post an xml file to a server?

Hi all..
I want to send a xml file to a particular server in my iPhone application...
Kindly reply with what class i want to make use of?
i ddnt find any HTTP classes.... (like httpRequest or httpResponse )

Thanks...
sujithkrishnan is offline   0 Reply With Quote
Old May 30, 2008, 10:54 AM   #2
HiRez
macrumors 68040
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Jun 2, 2008, 12:51 AM   #3
sujithkrishnan
Thread Starter
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
Quote:
Originally Posted by HiRez View Post
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.
Thank you...
But i ddnt get what u meant by "progress".
I just want to send and xml file when user taps "Place my Order" button, and show the user a uploading progress (UI part) and finally a message in alertView "SUCCESSFULLY PLACED UR ORDER".....

(If u are aware of MelissaData addresss Verification)
i Think my criteria looks same as we using melissaData xml upload for address verification. i did it windows Mobile with apt APIs, beinga newbie to apple environment i ddnt find any thing regarding this.


Hope u can guide me little more specific...
sujithkrishnan is offline   0 Reply With Quote
Old Jun 23, 2008, 07:42 AM   #4
sujithkrishnan
Thread Starter
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
Quote:
Originally Posted by HiRez View Post
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.
Hi,

I didnt get the necessary inof from any response..
Thats y i am askng again???

How to request a "POST" using NSURLRequest class methods???
I want to send a xml to url

http://yyyy.mydomain.com/action.do.

Also i want to catch the xml file which is the response for that request...
sujithkrishnan is offline   0 Reply With Quote
Old Jun 24, 2008, 08:28 AM   #5
newb16
macrumors regular
 
Join Date: Feb 2008
Quote:
Originally Posted by sujithkrishnan View Post
How to request a "POST" using NSURLRequest class methods???
I want to send a xml to url

http://yyyy.mydomain.com/action.do.

Also i want to catch the xml file which is the response for that request...
Y tride Harrington NSURLConnection in gugl search isnt it some type of what y looked for?

Quote:
and finally a message in alertView "SUCCESSFULLY PLACED UR ORDER".....
may y surmaze it some not exact wording here
newb16 is offline   0 Reply With Quote
Old Jun 26, 2008, 01:11 AM   #6
sujithkrishnan
Thread Starter
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
did it....

Hi all.

I did it by making use of

NSMutableRequest's setHTTPMethod and setHTTPBody methods....

Thnaks ....
sujithkrishnan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How to supercharge Mini? ranny2 Mac mini 18 Oct 27, 2011 08:53 PM
How To Remove Server Part Of Lion? hhaydenn iMac 2 Aug 18, 2011 05:21 PM
how to export an XML with Plist in this schema? saleh.hi.62 Mac Programming 2 Jul 27, 2011 01:09 AM
How to play a MIDI file to an external MIDI device? ChrisA Digital Audio 2 Sep 13, 2010 12:29 PM
how to convert an appleworks file to a PDF kaner Mac Applications and Mac App Store 2 May 13, 2005 11:41 AM


All times are GMT -5. The time now is 08:40 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC