Re: .NET WebService And Native Mac Client (in Cocoa) using SOAP
Re: .NET WebService And Native Mac Client (in Cocoa) using SOAP
- Subject: Re: .NET WebService And Native Mac Client (in Cocoa) using SOAP
- From: Tom Ryan <email@hidden>
- Date: Mon, 13 Oct 2003 14:09:28 -0400
I too have been trying to write a Cocoa client hitting a .NET web
service.
The Web Service (which I control) can return either a .NET DataSet, or
a custom collection class. My problem is that the client I've written
only gets the last object in the collection class
Here's the basic structure:
<FilesListing>
<SingleFile ID="something1">
<FileName />
<FileSize />
<FilePath />
<FileType />
</SingleFile>
...etc
<SingleFile ID="somethingLastOne"> <-- only returns this
<FileName />
<FileSize />
<FilePath />
<FileType />
</SingleFile>
.
</FileListing>
the /WSDebug output shows all elements, though.
I am not sure if it's the structure of the Custom Class, or I'm doing
something wrong with my Objective-C client code. Preliminary to posting
some code, does anyone have experience with this?
Thanks,
Tom Ryan
On Oct 13, 2003, at 12:57 PM, Chris Hanson wrote:
On Monday, October 13, 2003, at 08:24 AM, Sindhu Gururaj wrote:
I have a Web Service running on Windows .NET PC.
Now i need to write a native Mac client (application)
using objective C, which must able to execute the
methods exposed on .NET OS using SOAP.
I searched for "Cocoa web services" using Google and this is the page
that came up:
http://developer.apple.com/documentation/Cocoa/WebServices-date.html
The document referred to on that page describes
WebServicesCore.framework, which is where the underlying SOAP and
XML-RPC support lives in Mac OS X 10.2 and later. The tool
/Developer/Tools/WSMakeStubs can generate C++, Objective-C or
AppleScript stubs to access a web service given WSDL for that service.
Just shy of a year ago, I discovered that there are some data types
which are not sent properly. I attempted to send a date & time from
Cocoa to a WebObjects application using Direct to Web Services; the
WebObjects application used an NSTimestamp, which is mapped on the
server side to xsd:dateTime. Unfortunately, passing an NSDate on the
client side generated an xsd:timeInstant and I could figure out no way
to actually send an xsd:dateTime *at all* -- not even by passing
specially-formatted strings or dictionaries with special keys to the
web services framework.
Here's the thread from Cocoa-Dev discussing the issue:
http://cocoa.mamasam.com/COCOADEV/2002/11/2/50751.php
I never did get it resolved. The easy workaround was to just change
my web service to accept a String instead of an NSTimestamp, but
that's only feasible if you control both the client and server side.
Perhaps I'll give this a try again and use a DTS incident to figure
out what's going on, since I have a potential use for this in the near
future.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | 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.
_______________________________________________
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.