Re: Cocoa: How do I send/receive XML within a HTTP connect?
Re: Cocoa: How do I send/receive XML within a HTTP connect?
- Subject: Re: Cocoa: How do I send/receive XML within a HTTP connect?
- From: "stephen joseph butler" <email@hidden>
- Date: Fri, 16 May 2008 14:13:43 -0500
On Fri, May 16, 2008 at 1:53 PM, <email@hidden> wrote:
> Ahhh!
> Okay... I'm trying to envision how this would work. I'm essentially working with a 'black box' (the Server).
> The server is waiting for SOAP/XML data & shall respond accordingly.
>
> So you're saying that I should do something like this:
> ..
> NSData *soapData = <SOAP/XML> in NSData format.
> ..
> [NSMutableURLRequest setHTTPBody:soapData];
> ..
>
> Is this the correct paradigm?
Well... essentially. But setHTTPBody is not a class method. So you
want something like:
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:soapEndpoint];
[req setHTTPBody:soapData];
[req setValue:@"application/soap+xml" forHTTPHeaderField:@"Content-Type"];
Did you see my other message this morning? You're calling some of your
methods improperly and that's why you were crashing.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden