Skip to main content
Inspiring
September 6, 2011
Question

cfinvokeargument omit attribute behavior

  • September 6, 2011
  • 1 reply
  • 729 views

First off, I am working with ColdFusion 8. I am calling a web service method with an argument with the WSDL definition:

<s:element minOccurs="0" maxOccurs="1" name="billing_details" type="tns:billing_details"/>

I am calling the method with the cfinvokeargument of

<cfinvokeargument name="billing_details" omit="true" />

According to the documentation: "If you are invoking a web service, you can omit a parameter by setting the omit attribute to "yes".  If the WSDL specifies that the argument is nillable, ColdFusion MX sets  the associated argument to null. If the WSDL specifies minoccurs=0,  ColdFusion MX omits the argument from the WSDL."

My SOAP request XML contains: <billing_details xsi:nil="true"/>

From my reading of the documentation, that element shouldn't be there. Can anyone clarify if that is correct?

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
September 12, 2011

You are right. According to the documentation the billing_details element shouldn't be there.

However, I do believe the documentation is wrong. It is in fact wrong on one count already: "ColdFusion MX" should instead be "ColdFusion 8" or just "ColdFusion".

In this case, ColdFusion is a client, and may not necessarily have anything to do with the WSDL. So, the last sentence should be something like  "If the WSDL specifies minoccurs=0,  ColdFusion omits the argument from the web service invocation."