Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #343 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

omit element / xsi:nil="true" elemet control

Reported by: nahi Assigned to: nahi
Priority: normal Milestone: 1.5.6
Component: soap4r Version: 1.5
Keywords: Cc:

Description

Soap4r need some fix. What do you users think which is the best?

1. xsi:type=nil element by default

Argument nil generates xsi:type=nil element. Argument SOAPOmitElement.new doesn't generate any element.

2. omitted element by default

Argument nil doesn't generate any element. Argument SOAPNil.new generates xsi:type=nil element.

3. change behavior based on encoded / literal

For encoded service, nil generates xsi:type=nil element. For literal service, nil doesn't generate any element.

Change History

05/25/07 11:04:52 changed by nahi

by Leoš Bitto:

I would follow the principle of least surprise - be as explicit as you
possibly can:

Argument SOAPOmitElement.new doesn't generate any element (not even a
newline)
Argument SOAPNil.new generates xsi:nil="true" element (as nil does now
- not xsi:type=nil)
Argument nil generates xsi:nil="true" element (backwards
compatibility) and a warning if $DEBUG, suggesting using SOAPNil.new

by tpo:

I would let the user explicitly set the beheour, optimally top->down.

I explect that depending on the SOAP Implementation you are talking to
either it will like or won't when you send it empty elements. Thus
being able to tell at the driver level not to send empty elements
would be nice. Thus:

    driver.options[:send_empty_messages]=false

OTOH it might be that you need to tweak /some/ specific part of a sent
message *only*. Then it would be nice to be able to do that as well,
thus:

   element.send_empty_message = false

05/25/07 17:57:12 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1810]) * for literal service, let LiteralRegistry? treat nil parameter as same as WSDLLiteralRegistry. omit element if minOccurs == '0' and otherwise add xsi:nil="true". closes #343.