• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa datatype SOAP encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa datatype SOAP encoding


  • Subject: Re: Cocoa datatype SOAP encoding
  • From: "Tom Chen" <email@hidden>
  • Date: Tue, 25 Nov 2008 16:12:40 -0800

I think you are right. 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. If the NXSMLElement/Document solution isn't correct, what is?
I would think that my problem is a common problem. Just to reiterate
what I am trying to do: I am trying to parametrize a request where
there is an array of <Field>'s within a <bugField> tag. It would look
like:

<bugField>
<Field>
<!-- some stuff -->
</Field>
<Field>
<!-- some stuff -->
</Field>
<!-- etc. -->
</bugField>

A simple NSArray doesn't work because each item becomes encoded as
<item_0>, <item_1>, etc. A NSDictionary doesn't work because of the
nature of an associative array no duplicate keys. And it appears now
that NSXMLDocument/Element isn't the correct solution either.

Thanks,
--Thomas

On Tue, Nov 25, 2008 at 3:53 PM, Jens Alfke <email@hidden> wrote:
>
> On Nov 25, 2008, at 3:45 PM, Tom Chen wrote:
>
>> Thanks for the response, that's exactly the datatype I need. I do have
>> a follow-up question however. It appears that when you create a
>> NSXMLDocument, the root element needs to be named (in this case:
>> "something").
>
> Yes, any XML document always contains a single named root element.
>
>> However, when you call WSMethodInvocationSetParameters()
>> you also need to provide a name per parameter you pass in (in this
>> case for the NSXMLDocument it's: "something"). This results in a
>> request that has a duplicate tag named "something"
>
> I'd be really surprised if it was legal to pass an NSXMLDocument to the WS
> API. This API uses CoreFoundation and doesn't know about higher-level Cocoa
> types like the NSXML classes. It sounds like it doesn't bomb completely, so
> I assume the reason is that when it sees that the parameter value is some
> type it doesn't understand, it just asks it for its description string, to
> which NSXMLDocument responds with the XML. That's the kind of behavior that
> could easily change out from under you in the future, though, so it would be
> safer to be explicit about it and get the XML string yourself to stuff in
> the dictionary of parameters.
>
> This leads me to suspect that the right solution does not involve NSXML
> (which didn't even exist when the WS API was created.) Unfortunately I've
> never used SOAP, so I don't have an answer for you.
>
> —Jens
 _______________________________________________
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

  • Follow-Ups:
    • Re: Cocoa datatype SOAP encoding
      • From: Quinn <email@hidden>
References: 
 >Cocoa datatype SOAP encoding (From: "Tom Chen" <email@hidden>)
 >Re: Cocoa datatype SOAP encoding (From: "Tom Chen" <email@hidden>)
 >Re: Cocoa datatype SOAP encoding (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Cocoa datatype SOAP encoding
  • Next by Date: Trouble making more than 244 simultaneous connections
  • Previous by thread: Re: Cocoa datatype SOAP encoding
  • Next by thread: Re: Cocoa datatype SOAP encoding
  • Index(es):
    • Date
    • Thread