• 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
SOAP return values -- Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SOAP return values -- Question


  • Subject: SOAP return values -- Question
  • From: Tom Ryan <email@hidden>
  • Date: Wed, 11 Jun 2003 01:23:37 -0300

Hi folks,

I'm just learning Cocoa/ObjC, and I'm really interested in writing some apps
that hit a web service (in particular, a .NET web service).

The Web Service returns DataSets that look like this:

==================================
(excerpt)
<?xml version="1.0" encoding="utf-8" ?>
- <DataSet xmlns="myNSpace">
- <xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet" msdata:IsDataSet="true";>
- <xs:complexType>
- <xs:choice maxOccurs="unbounded">
- <xs:element name="Table">
- <xs:complexType>
- <xs:sequence>
<xs:element name="RowId" type="xs:int" minOccurs="0" />
<xs:element name="BuildingName" type="xs:string" minOccurs="0" />
<xs:element name="StreetAddress" type="xs:string" minOccurs="0" />
<xs:element name="CityId" type="xs:int" minOccurs="0" />
<xs:element name="PostalCode" type="xs:string" minOccurs="0" />
<xs:element name="ActiveInactive" type="xs:int" minOccurs="0" />
<xs:element name="City" type="xs:string" minOccurs="0" />
<xs:element name="StateId" type="xs:int" minOccurs="0" />
<xs:element name="State" type="xs:string" minOccurs="0" />
<xs:element name="CountryId" type="xs:int" minOccurs="0" />
<xs:element name="Country" type="xs:string" minOccurs="0" />
<xs:element name="Location" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0";>
<RowId>2</RowId>
<BuildingName>My Building</BuildingName>
<StreetAddress>My Street Addr</StreetAddress>
.... The rest of the data
</Table>
- <Table diffgr:id="Table2" msdata:rowOrder="1";>

....etc
===============================

My SOAP Client code returns an NSDictionary of "diffgr:diffgram", and in
THAT, an NSDictionary of "NewDataSet", and of course, within that, an
NSDictionary of "Table".

Is there an easy/best practices way of grabbing the element
"<StreetAddress />" without doing
<code>
return [[[myResultsDictionary
objectForKey:@"diffgr:diffgram"]
objectForKey:@"NewDataSet"]
objectForKey:@"Table"]; // etc etc
</code>

(have I mentioned I'm just starting out coding in ObjC?)

Thanks for your help in advance!
_______________________________________________
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.

  • Prev by Date: startup item : at last !
  • Next by Date: Re: troubling article
  • Previous by thread: Re: openURL Question- corrections
  • Next by thread: OK so i was wrong. Quicktime compositing not working..
  • Index(es):
    • Date
    • Thread