You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if we want to make the final element optional, and it happens to return false, the request body will be empty:
client.request(:wsdl,'SomeService')dosoap.bodydo |xml|
xml.foo'bar'xml.baz'bat'ifsome_test# which evaluates to falseendend
This is because savon relies on the return value of the last statement in the block to determine the xml string. I think this is a bug as it produces problems in the scenario above.
The only way round it afaik is clunky code like this:
When constructing request xml via a block like this
it all works fine.
But if we want to make the final element optional, and it happens to return false, the request body will be empty:
This is because savon relies on the return value of the last statement in the block to determine the xml string. I think this is a bug as it produces problems in the scenario above.
The only way round it afaik is clunky code like this:
Should savon not be relying on the modified state of the xml object after the yield, rather than the value returned from the block?
The text was updated successfully, but these errors were encountered: