Dave,
I know you are busy, but any thoughts?
Thanks,
Logan
On Thu, Aug 29, 2013 at 10:31 PM, Logan Owen <logan.o...@gmail.com> wrote:
> Dave,
>
> How would that work for "simple" types? A good example is nillable
> datetime element. So something like the following:
>
> <Foo>
> <FooTime xsi:nil="true"/>
> </Foo>
>
> Would have a class like:
>
> class FooType():
> def get_FooTime():
> return self.FooTime
> def set_FooTime(value):
> self.FooTime = value
>
>
> I'm not sure where we should hang is_nil() from. Possibly create a
> "facade" class for simple types that extends them to add the is_nil(), etc
> functions/attributes?
>
> -- Logan
>
>
>
> On Thu, Aug 29, 2013 at 5:34 PM, Dave Kuhlman <dkuhl...@davekuhlman.org>wrote:
>
>> Quoting Logan Owen:
>>
>>> Dave,
>>>
>>> I am working with a SOAP service that uses a schema with "nillable"
>>> elements. It appears that generateDS does not support this yet. Is
>>> this something you have looked into supporting? I am willing to
>>> make the changes, but I wanted to get some feedback from you on the
>>> preferred method before I start wildly making changes.
>>>
>>> Thanks, Logan
>>>
>>
>> Logan,
>>
>> An interesting suggestion. I just now read a bit about nillable
>> elements. Thanks for encouraging me to learn something new.
>>
>> Here are a few comments on what might be done, just to start a discussion:
>>
>> 1. If a type is nillable, then in the class generated from that
>> type, we generate an instance variable "nil_" and a getter method
>> is_nil().
>>
>> 2. When an element is parsed, if that element is nillable, then the
>> build method checks and sets attribute xsi:nil. If the value of
>> attribute xsi:nil is true, then the generated code does not
>> parse content or children of that element. And, possibly writes
>> an error/warning message if there is content (?).
>>
>> 3. When the generated code exports the element, if attribute nil_ is
>> True, then we do not export any content (text content or
>> children).
>>
>> This nillable thing is *not* something that I have experience with, so
>> I'd certainly appreciate your comments.
>>
>> By the way, I have some other (non-generateDS) work in my queue
>> right now. So, it's likely that I would not be able to do much work
>> on this soon.
>>
>> Dave
>>
>>
>>
>>
>> --
>> Dave Kuhlman
>> http://www.davekuhlman.org
>>
>>
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users