How do I set an option for a <choice> element in the generated classes for a
schema ? I have this schema: <xs:complexType> <xs:choice> <xs:element ref="ns:operacion"/> <xs:element ref="ns:resultado"/> </xs:choice> <xs:attribute name="version" type="xs:string"/> </xs:complexType> I generated the classes for the binding, and for the choice elements a method like this is created: choiceValue: aStruct <addAttribute: #choiceValue type: #(#Choice #(#operacion #'Operacion') #(#resultado #'Resultado')> choiceValue := aStruct If I set a value with operaciones choiceValue: Operacion new. During the marhaling I get a walkback, with a 'The object is not a Dictionary or Struct type: aOperacion' error in ChoiceRelation>>marshalAspectFrom:implementation: I've been browsing the Choice class, but didn't find any example of use. How should I set the choice value ? thanks in advance martin _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
> choiceValue: aStruct
> <addAttribute: #choiceValue type: #(#Choice #(#operacion #'Operacion') > #(#resultado #'Resultado')> > choiceValue := aStruct > > If I set a value with > > operaciones choiceValue: Operacion new. operaciones choiceValue: (WebServices.Struct new at: #operacion put: Operacion new; yourself). HTH, Tamara Kogan Smalltalk development, Cincom Systems > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf > Of Martin Rubi > Sent: Thursday, October 09, 2008 1:35 PM > To: [hidden email] > Subject: [vwnc] How should I set the value of a ChoiceRelation ? > > How do I set an option for a <choice> element in the generated classes for > a > schema ? > > I have this schema: > > <xs:complexType> > <xs:choice> > <xs:element ref="ns:operacion"/> > <xs:element ref="ns:resultado"/> > </xs:choice> > <xs:attribute name="version" type="xs:string"/> > </xs:complexType> > > I generated the classes for the binding, and for the choice elements a > method like this is created: > > choiceValue: aStruct > <addAttribute: #choiceValue type: #(#Choice #(#operacion #'Operacion') > #(#resultado #'Resultado')> > choiceValue := aStruct > > If I set a value with > > operaciones choiceValue: Operacion new. > > During the marhaling I get a walkback, with a 'The object is not a > Dictionary or Struct type: aOperacion' error in > ChoiceRelation>>marshalAspectFrom:implementation: > > I've been browsing the Choice class, but didn't find any example of use. > How > should I set the choice value ? > > thanks in advance > martin > > > _______________________________________________ > 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 |
Tamara,
thank you very much.
regards
martin
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |