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


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to