• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfinvokeargument omit attribute behavior

Explorer ,
Sep 06, 2011 Sep 06, 2011

Copy link to clipboard

Copied

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?

TOPICS
Advanced techniques

Views

683

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2011 Sep 12, 2011

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation