1 Reply Latest reply on Sep 12, 2011 11:34 AM by BKBK

    cfinvokeargument omit attribute behavior

    SteveTX Level 1

      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?

        • 1. Re: cfinvokeargument omit attribute behavior
          BKBK Adobe Community Professional & MVP

          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."