Optional element in import parm webservice

Optional element in import parm webservice

We are calling a webservice from an OutSystems program
In the WSDL there is an import definition like this:

<xs:element minOccurs="0" maxOccurs="1" name="pdat0031LijstDervArtInfoImpSper1Personeel" type="jumarDataTypes:pdat0031LijstDervArtInfoImpSper1Personeel"/>

As you can see it's an optional element. So it can be skipped BUT not be null
How can I adjust the structure used as input to the webserice in a way that this element is deleted from the structure ?

Read this ... http://www.dimuthu.org/blog/2008/08/18/xml-schema-nillabletrue-vs-minoccurs0/

And no we cannot modify the WSDL/Webservice ...
Hi Joop,

Unfortunately that is not possible at this point in the Agile Platform. In the language all web reference call parameters are considered mandatory.
We actually have a continuous effort in widening the range of supported web services and this scenario will be added to our backlog so that it can be properly addressed in the mid-term.

What I can suggest right now is that you create an extension where you consume this web service using Visual Studio and later reuse it in your eSpace.

Best Regards,
To me this is a real bug if you say "...all web reference call parameters are considered mandatory..." whatever the WSDL tell the parameter is.

We maybe have a look at the extension solution.

By the way, there more, another issue is with a LONG in the WSDL converted to an INT in OutSystems...
As you might know.

any chance of knowing when this will be implemented?

any news on this issue?

Hermínio Mira
/bump for info

There is an upcoming revision of the Agile Platform 6.0 that will address this.

Elements that have minoccurs=0 can be skipped in the request payload.

To achieve this, we added a new property in the web method's input parameters and to the web reference structure attributes: the Default Value Behavior.
This property controls if the parameter or attribute shall be sent or not in the payload if its value is set to the default value, therefore making it optional. The values for this property are "Send" and "Don't Send", so that the developer control this behavior. The default for new web references will be "Send", to keep the same behavior as previous versions and don't break compatibility, but you can customize it to "Don't Send" for  the cases you want to skip the element in the request payload.

We also added the support to Nillable paramters or attributes. In this case there is another Default Value Behavior option: "Send Nil", that sends the nil="true" in the payload if the value is set to the default.

The release date is yet unknown, but we expect it to be available in the next 1 or 2 months.
I will let you know when this is released.

Hope this fits your needs!

Regarding the support for xs:long, although supporting it is in our roadmap, we don't have any plans for it in the short term. I suggest that in those cases, you replace the xs:long by xs:decimal - You'd have to make sure not to put decimal cases when passing the parameters...

We're currently working (at this specific moment) on the support for Optionals (minOccurs=0) and Nillables (nillable=true) when using webreferences in the platform. (check http://www.w3.org/TR/xmlschema-1/). It will be released in the short term in a revision of 6.0 (No exact date yet but it will be in the coming months)

Support for <choice> is already available in 6.0 and 5.1
Dear all,

The Agile Platform 6.0.1 was released yesterday and includes this improvement.
Existing community users can simply download the new version from www.outsystems.com/download/full.
Standalone installers can be found in the OutSystems Network.