Re: Complex Types and WebServicesCore
Re: Complex Types and WebServicesCore
- Subject: Re: Complex Types and WebServicesCore
- From: Chris Hanson <email@hidden>
- Date: Mon, 25 Nov 2002 23:10:36 -0600
At 11:52 PM -0500 11/25/02, Scott Anguish wrote:
i"m working on writing it up now as an article... (I gotta
find a job.. so I'm hoping I'll get the exposure... know anyone in
the TechPubs group at Apple? I want the Cocoa/Core FOundation
writing job there)
They could *really* use you.
Put a properly formatted string in the key for creationDate,
and then specify xsd:dateTime as the type in the kWSRecordType... if
you look at the source that accompanies that article, I'm sure it'll
do what I'm saying.. because I pass a dictionary, but tell it to
treat it as the custom type.
what does the SOAP output currently look like? my guess is
that the only thing wrong is the type, and that will fix it.
After adjusting my code according to your advice above, the outgoing
SOAP body looks like this:
<creationDate xsi:type="xsd:dateTime">
<creationDate xsi:type="xsd:string">2002-11-26T05:01:29Z</creationDate>
</creationDate>
It needs to look like this for WebObject 5.2 to turn it into an
NSTimestamp correctly:
<creationDate
xsi:type="xsd:dateTime">2002-11-26T04:34:00Z</creationDate>
Here's the method that generates the dictionary I'm passing as a parameter:
- (NSDictionary *)dateTimeForDate:(NSDate *)date
{
NSDictionary *result;
NSString *s;
s = [date descriptionWithCalendarFormat:@"%Y-%m-%dT%H:%M:%SZ"
timeZone:
[NSTimeZone timeZoneForSecondsFromGMT:0]
locale:nil];
result = [NSDictionary dictionaryWithObjectsAndKeys:
@"xsd:dateTime", kWSRecordType,
s, @"creationDate", nil];
return result;
}
Does this look OK to you?
-- Chris
--
Chris Hanson | Email: email@hidden
bDistributed.com, Inc. | Phone: +1-847-372-3955
Making Business Distributed | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.