Hi! I have a web service question. I'm exposing a process as a web-

Hi!
I have a web service question. I'm exposing a process as a web-service where i need to have an array of CDTs as an input like so:

<problemdefinition>
<owner></owner>
<problemtypeid></problemtypeid>
<remarks></remarks>
</problemdefinition>

Since Appian can't expose CDT process inputs as WS, we had to break down the input into 3 StringArray types. So in the WSDL, it would be like this:

<message name="startRequest">
<part name="username" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="owner" type="ns2:StringArray"/>
<part name="problemtypeid" type="ns2:StringArray"/>
<part name="remarks" type="ns2:StringArray"/>
</message>

Since this would be passed to a CDT array, the number of elements for these 3 arrays must always be the same. However, remarks field is optional (meaning it can have no value)

We're always getting an error when remarks field is blank like so:

<owner>
<...

OriginalPostID-166497

OriginalPostID-166497

  Discussion posts and replies are publicly visible

Parents
  • ...value>name 1</value>
    <value>name 2</value>
    </owner>
    <problemtypeid>
    <value>ABCD</value>
    <value>WXYZ</value>
    </problemtypeid>

    <remarks>
    <value></value>
    <value>testing 123</value>
    </remarks>

    RESPONSE
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/.../">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Sender</faultcode>
    <faultstring>Error parsing array correspoding to parameter: remarks. Check the value specified</faultstring>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Is there anyway we can make these optional parameters accept null/empty values?
Reply
  • ...value>name 1</value>
    <value>name 2</value>
    </owner>
    <problemtypeid>
    <value>ABCD</value>
    <value>WXYZ</value>
    </problemtypeid>

    <remarks>
    <value></value>
    <value>testing 123</value>
    </remarks>

    RESPONSE
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/.../">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Sender</faultcode>
    <faultstring>Error parsing array correspoding to parameter: remarks. Check the value specified</faultstring>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Is there anyway we can make these optional parameters accept null/empty values?
Children
No Data