IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

generating xsi:nil attribute using documentToXMLString

  • 1.  generating xsi:nil attribute using documentToXMLString

    Posted Sun August 08, 2004 10:49 PM

    I’m using 6.0.1 SP2. Does anyone know if documentToXMLString can generate the xsi:nil attribute? Eg:

    2004-08-09

    xsi:nil indicates that the tag is nillable but the element tag is required (as opposed to making the element tag optional). Ideally, documentToXMLString should generate this xsi:nil attribute if the value of reasonCode element is null. However, documentToXMLString either leave out the tag completely or generate it as , depending on the value of generateRequiredTags setting.

    One workaround I have is to create the @xsi:nil and *body as strings in the reasonCode subdocument, but this is makes my flow mapping more complicated, as I have to check if reasonCode is null to set @xsi:nil to true!

    Any ideas?


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: generating xsi:nil attribute using documentToXMLString

    Posted Fri November 11, 2005 05:25 AM

    In my case I want optional elements to be omitted when the value of the document field is $null.

    You said that you get this effect with documentToXMLString but the “generateRequiredTags” parameter of documentToXMLString does not seem to affect optional elements in my case. This is also what the wM “Build in service reference” says.

    How did you get optional elements with $null value to disappear?


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB