Re: Cocoa datatype SOAP encoding
Re: Cocoa datatype SOAP encoding
- Subject: Re: Cocoa datatype SOAP encoding
- From: Quinn <email@hidden>
- Date: Wed, 26 Nov 2008 11:11:39 +0000
At 16:12 -0800 25/11/08, Tom Chen wrote:
When I do parametrize the SOAP request with the
NSXMLDocument, it doesn't bomb completely, but it does have a
statement saying: "<!-- UNKONWN PARAMETER TYPE1 -->" within the SOAP
request.
Yeah, NSXMLDocument and WebServicesCore are not going to play well
together. I was assuming you were doing the SOAP request yourself;
WebServicesCore tends to be very limiting and I'm always surprised
when anyone tries to use it (-:
btw It would /really/ help you copy'n'paste error messages rather
than retype them. The correct error text for the above is "<!--
UNKNOWN PARAMETER TYPE %d -->" (where %d is replaced by the
CFTypeID()). That exact text would've led me directly to the right
part of the source (-:
If the NXSMLElement/Document solution isn't correct, what is?
Maybe, maybe not (-:
You have two options here:
o continue with WebServicesCore -- In that case, you should probably
look at the serialisation override stuff. You can register a
serialisation override routine using
WSMethodInvocationAddSerializationOverride and it will be called when
WebServicesCore attempts to serial an object with the specified
CFTypeID. You could, for example, provide an override for
CFArrayGetTypeID() that looks for your specific type of array and
serialises it in a different way (return NULL for arrays that you
don't want to override). Or you may need something more complicated
depending on the exact XML the server wants.
Some things to keep in mind when writing a serialiser:
- The string you return will be CFReleased by WebServicesCore when it's done.
- The string can contain any number of "%@"s, which are replaced by
the parameter name.
o abandon WebServicesCore -- Constructing your own SOAP request via
NSXMLDocument is not that hard, and it will allow you direct control
over the formatting.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden