Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebServicesCore Array Serializaiton



Had the same issue. I didnt find a solution but a workaround :/ ::
I wrapped the NSArray in a dictionary and override serialization for dicts. If it is on of my ;array dicts' I serialize it' else I return NULL.
to get the runtime to take over again, I use a WSProtocolHandler for the subitems: That way I dont have to serialize the contents of the array myself.


Hope that helps + my bad english didnt make it COMPLETELY misunderstandable.
Regards,
Dominik


Am Dec 28, 2006 um 4:42 PM schrieb Josh Ferguson:

Hello list,

I'm trying to consume a .NET Document-Based SOAP web service using
WebServicesCore.framework. I've got almost everything working except for
the way WebServicesCore serializes an NSArray. By default, an array is
serialized as so:


<MyArray SOAP-ENC:arrayType="xsd:anyType[3]" xsi:type="SOAP- ENC:Array">
<item_0 xsi:type="ItemType" xmlns="http://my.type.uri";>
</item_0>
<item_1 xsi:type="ItemType" xmlns="http://my.type.uri";>
</item_1>
</MyArray>


I need the array to be serialized as so:

<MyArray SOAP-ENC:arrayType="xsd:ItemType[3]" xsi:type="SOAP- ENC:Array">
<ItemType xmlns="http://my.type.uri";>
</ItemType>
<ItemType xmlns="http://my.type.uri";>
</ItemType>
</MyArray>


I tried writing my own custom serialization proc, but run into one
issue. How do I get the contextual information about the array? In other
words, how do I know that the array is named "MyArray"? The
serialization proc receives three parameters: A pointer to the
WSMethodInvocationRef, a pointer to the actual object (CFArray/ NSArray),
and a pointer to the WSClientContext. I can't see how to get the name of
the array out of any of this. In fact, the array name is a property of
the containing Dictionary, so I would need to know information about the
dictionary that contains this array to be able to properly name it. How
do I get around this? At this point in time I really wish I had gone
with a different SOAP client, as WebServicesCore is obviously meant for
a very specific purpose (not consuming .NET web services). Any
information on how to work around this would be greatly appreciated!


Thanks,

Josh Ferguson
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >WebServicesCore Array Serializaiton (From: "Josh Ferguson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.