Is it possible for a web service operation to return multiple types? <p>I'm working with a web service which is written by another team.</p> <p>The operation which I'm using in the WSDL is:</p> <pre><code>&lt;wsdl:operation name="transactionReport"&gt; &lt;wsdl:input name="transactionReportRequest" message="schema:transactionReportRequest"&gt; &lt;/wsdl:input&gt; &lt;wsdl:output name="transactionReportResponse" message="schema:transactionReportResponse"&gt; &lt;/wsdl:output&gt; &lt;/wsdl:operation&gt; </code></pre> <p>As it describes in WSDL the result of the <code>transactionReport</code> operation must be of type <code>transactionReportResponse</code>.</p> <p>But in some cases (on error) it returns this XML as result:</p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;SOAP-ENV:Header /&gt; &lt;SOAP-ENV:Body&gt; &lt;errorOccur xmlns="http://thecompany/servicesCompanyInfo/definitions"&gt; &lt;errorCode&gt;3&lt;/errorCode&gt; &lt;errorDescription&gt;CUSTOMER_ID or FROM_DATE should have value&lt;/errorDescription&gt; &lt;/errorOccur&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>It seems that it's against the WSDL. Am I true?</p> <p>I expect this operation to return just <code>transactionReportResponse</code> or <code>Fault</code>.</p> <p><strong>Question1:</strong> Is it OK for this operation to return a <code>errorOccur</code> too?</p> <p><strong>Question2:</strong> If it's OK, then how can I get this object in C#? (As it returns null despite of the XML which contains a <code>errorOccur</code>)</p>