• 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: Help with objectiveC and soap using WSCore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Help with objectiveC and soap using WSCore


  • Subject: RE: Help with objectiveC and soap using WSCore
  • From: "Byron" <email@hidden>
  • Date: Thu, 26 Oct 2006 10:38:02 -0700

It's not exactly clear what you are trying to achieve here. Based on the
output you want to send it looks like plain XML and not a soap message. Also
WSMakeStubs should be pointed to a WSDL URL to generate classes that you can
use to send and receive SOAP messages.

Additionally, WSCore de-serializes all complex types as NSDictionaries so it
is up to you to decode these into your own model objects. WSCore also
expects NSDictionaries with the 2 keys that identify the class and namespace
(off the top of my head) so it is up to you to encode your model objects
into NSDictionaries.

If you only have a few web services methods you need to implement then this
isn't too bad but if this is a big project I'd suggest looking for an
alternative web services framework. Take a look at gSOAP
http://www.cs.fsu.edu/~engelen/soap.html


-----Original Message-----
From: cocoa-dev-bounces+byron=email@hidden
[mailto:cocoa-dev-bounces+byron=email@hidden] On
Behalf Of Dominik Pich
Sent: Thursday, October 26, 2006 7:00 AM
To: email@hidden
Subject: Help with objectiveC and soap using WSCore

Hi,
again I could really use the list's help Im working on a client
written in cocoa and struggle with making valid soap calls using WSCore:

Ill try to make myself more clear
> I got this output to be made (simplified here)
> <order>
> 	<orderposition>blabla</orderposition>
> 	<orderposition>blabla</orderposition>
> 	<orderposition>blabla</orderposition>
> 	<orderposition>blabla</orderposition>
> 	<name>lala<name>
> </order>

Now, WSMakeStubs takes a CFTypeRef (so a void*) as Order so I could
pass a custom object but I pass a dictionary with the params because
that'll get serialized all by itself. The Problem is I cannot add
serveral "orderposition" objects in a dictionary. I tried to add an
NSArray to the Dictionary but that'll not produce the output above but:
> <order>
> 	<array length="4">
> 		<0>
> 			<orderposition>blabla</orderposition>
> 		</0>
> 		<1>
> 			<orderposition>blabla</orderposition>
> 		</1>
> 		<2>
> 			<orderposition>blabla</orderposition>
> 		</2>
> 		<3>
> 			<orderposition>blabla</orderposition>
> 		</3>
> 	</array>
> 	<name>lala<name>
> </order>

The result of soapCalls made via WSInvocation are all NSDictionaries
with handle multiple elements in the first form just fine - giving me
back an NSArray (which led me to believe I should fill the Parameters
dictionary with one too!)

Im not yet sure I did it right and therefore if it is a bug. Im quite
the NOOB when it comes to WSCore and hope it is my fault - then its
easier to remedy  :) BUT if it is a bug I'd be happy to report it. :)

I also read the docs and know I can add a Callback for my objects...
but then I'd have to serialize all values in the custom
orderPositions (which would be an array) myself, no? So ... i;d have
to serialize every orderPosition and it's values (which could again
be ComplexTypes)
==> I'd end up having to do almost all serializing myself then!?

Regards,
Dom

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.13/500 - Release Date: 10/26/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.13/500 - Release Date: 10/26/2006


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Help with objectiveC and soap using WSCore (From: Dominik Pich <email@hidden>)

  • Prev by Date: Newbie Problem with KVC compliance
  • Next by Date: Core Data, SQLLITE, and slow Array Operators
  • Previous by thread: Help with objectiveC and soap using WSCore
  • Next by thread: License file in Document Architecture
  • Index(es):
    • Date
    • Thread