Web service activity error handling

When executing a Web service activity, a web service proxy is generated for the web service WSDL, and if an array of a complex type includes an element that is also an array of a complex type and for which only one element exists, errors may occur: For example:

  • Unable to generate a temporary class (result=1).
  • Error CS0029: Cannot implicitly convert type 'CustomTypeXXX' to 'CustomTypeXXX[]'
  • Error CS0030: Cannot implicitly convert type 'CustomTypeXXX[]' to 'CustomTypeXXX'

Use either workaround to resolve these issues:

  • Change the data type in the desired WSDL so that a second, optional element is included in the definition. You can add the following element:
    <xs:element min0ccurs="0" name="dummyElement"nillable="true"type="xs"string"/>
  • Change the complex type in the desired WSDL so that the boundary attributes are part of the complex type instead of part of the element. That is, you can move the minOccurs and maxOccurs attributes to the complex type and then remove them from the element.