• 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: Jens Alfke <email@hidden>
  • Date: Tue, 25 Nov 2008 15:53:51 -0800


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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: "Tom Chen" <email@hidden>
References: 
 >Cocoa datatype SOAP encoding (From: "Tom Chen" <email@hidden>)
 >Re: Cocoa datatype SOAP encoding (From: "Tom Chen" <email@hidden>)

  • Prev by Date: Re: Cocoa datatype SOAP encoding
  • Next by Date: Re: Cocoa datatype SOAP encoding
  • Previous by thread: Re: Cocoa datatype SOAP encoding
  • Next by thread: Re: Cocoa datatype SOAP encoding
  • Index(es):
    • Date
    • Thread