I am trying to expose a new VW class as a WSDL
service. I’m having pretty good success, but I’m having a
particular problem. One of the Smalltalk classes I’m exposing is an object
that will be passed to a client (as the result of a client command). Let’s
call this class MyResponse, and it has an instance variable that holds a
collection of Subclasses of AbstractThing. AbstractThing’s
Smalltalk class hierarchy looks like this: Object AbstractThing defines an instance variable. The
subclasses do not define any instance variables. MyResponse and AbstractThing both define a class method,
#typePragmas, implemented like this: <pragmas:
#instance> ^OrderedCollection
new add:
#addAttribute:type:; yourself myThings: anOrderedCollectionOfThings Now, the collection of myThings actually holds instances of
concrete subclasses of AbstractThing. That is, it holds instances of ConcreteThing1,
ConcreteThing2, etc. When I expose MyResponse, I have to add an appropriate
pragma to the setter method as described in the VW WebServices.pdf guide.
So this is what I did: myThings: anOrderedCollectionOfThings Now, no matter how I run the Web Services Wizard (for “exposing
an application as a web service”), the client’s MyResponse >>
myThings contains an OrderedCollection of AbstractThing instances. It
never contains the actual subclass instances (of ConcreteThing1 and
ConcreteThings2) that exist on the server side’s copy of the MyResponse
object. The question: What must I do to make the #myThings
collection in the client’s MyResponse object contain instances of the
AbstractThing subclasses? Chris Winemiller 1100 W. Campbell Rd. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Chris!
On 23.06.2010 20:30, Winemiller, Chris wrote: > Now, no matter how I run the Web Services Wizard (for "exposing an > application as a web service"), the client's MyResponse myThings > contains an OrderedCollection of AbstractThing instances. It never > contains the actual subclass instances (of ConcreteThing1 and > ConcreteThings2) that exist on the server side's copy of the > MyResponse object. Having no experience with this concrete type of problem (we habe issues with a client vs. the servers complex WSDL), I recall that in 7.4 we had a lot of problems regarding subclass structures marshaled via SOAP. We had internally a heap of patches to make our SOAP client work. One thing I do remember: have you activated the setting "Allow marshaling derived types in relations" available on the "XMLObject Marshaling" settings page? On a side note: XML-, WSDL- and SOAP-handling have improved from 7.4 to 7.7. Still not perfect, but a lot better than when we started using it in 7.0 or 7.2. Regards Jan _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Jan Weerts wrote:
> On 23.06.2010 20:30, Winemiller, Chris wrote: > > Now, no matter how I run the Web Services Wizard (for "exposing an > > application as a web service"), the client's MyResponse myThings > > contains an OrderedCollection of AbstractThing instances. It never > > contains the actual subclass instances (of ConcreteThing1 and > > ConcreteThings2) that exist on the server side's copy of the > > MyResponse object. > > Having no experience with this concrete type of problem (we habe > issues with a client vs. the servers complex WSDL), I recall that in > 7.4 we had a lot of problems regarding subclass structures marshaled > via SOAP. We had internally a heap of patches to make our SOAP client > work. > > One thing I do remember: have you activated the setting "Allow > marshaling derived types in relations" available on the "XMLObject > Marshaling" settings page? Yes I have. This does not make the problem go away. > > On a side note: XML-, WSDL- and SOAP-handling have improved from 7.4 > to 7.7. Still not perfect, but a lot better than when we started using > it in 7.0 or 7.2. That's good to know. Chris _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Chris,
If you can create a small test case from your schema I'll look at the problem. Tamara Kogan Smalltalk development, Cincom Systems > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Winemiller, Chris > Sent: Thursday, June 24, 2010 9:12 AM > To: Jan Weerts > Cc: [hidden email] > Subject: Re: [vwnc] [VW 7.5] WSDL Question: How to allow subclasses? > > Jan Weerts wrote: > > > On 23.06.2010 20:30, Winemiller, Chris wrote: > > > Now, no matter how I run the Web Services Wizard (for > "exposing an > > > application as a web service"), the client's MyResponse myThings > > > contains an OrderedCollection of AbstractThing > instances. It never > > > contains the actual subclass instances (of ConcreteThing1 and > > > ConcreteThings2) that exist on the server side's copy of the > > > MyResponse object. > > > > Having no experience with this concrete type of problem (we habe > > issues with a client vs. the servers complex WSDL), I recall that in > > 7.4 we had a lot of problems regarding subclass structures marshaled > > via SOAP. We had internally a heap of patches to make our > SOAP client > > work. > > > > One thing I do remember: have you activated the setting "Allow > > marshaling derived types in relations" available on the "XMLObject > > Marshaling" settings page? > > Yes I have. This does not make the problem go away. > > > > On a side note: XML-, WSDL- and SOAP-handling have improved from 7.4 > > to 7.7. Still not perfect, but a lot better than when we > started using > > it in 7.0 or 7.2. > > That's good to know. > > Chris > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |