Note that there are some explanatory texts on larger screens.

plurals
  1. POWebservice method returning empty when called from .NET code
    primarykey
    data
    text
    <p>I'm doing some tests with a client's webservice. The WSDL is defined like this:</p> <pre><code>&lt;xs:element name="CorretoresGeralRequest"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="codEvPesq" type="xs:long" minOccurs="0"/&gt; &lt;xs:element name="nmeEvPesq" type="xs:string" minOccurs="0"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:element name="CorretoresGeralResponse"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="resultCorretoresGeral" type="tr:ResultCorretoresGeral" minOccurs="0" maxOccurs="unbounded" nillable="true"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:complexType name="ResultCorretoresGeral"&gt; &lt;xs:sequence&gt; &lt;xs:element name="corretoresGeral" type="tr:CorretorGeral" minOccurs="0" maxOccurs="unbounded" nillable="true"/&gt; &lt;xs:element name="listCompleta" type="xs:boolean"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;xs:complexType name="CorretorGeral"&gt; &lt;xs:sequence&gt; &lt;xs:element name="codAtiv" type="xs:int" minOccurs="0"/&gt; &lt;xs:element name="dscAtiv" type="xs:string" minOccurs="0"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; </code></pre> <p>When I use soapUI to call the method passing a parameter, it returns me correctly: <img src="https://i.stack.imgur.com/GxGwG.jpg" alt="enter image description here"></p> <p>However, when I create a web reference for it in my project and call it via C# code, it returns me an empty array(ServicoTeste is the name of the webreferece I've created for the service): <img src="https://i.stack.imgur.com/dqklt.png" alt="enter image description here"></p> <pre><code>ServicoTeste.TransporteClient servico = new ServicoTeste.TransporteClient(); ServicoTeste.CorretoresGeralRequest request = new ServicoTeste.CorretoresGeralRequest(); ServicoTeste.ResultCorretoresGeral[] response; request.nmeEvPesq = "MAS"; response = servico.CorretoresGeral(request); </code></pre> <p>Any ideas on what I'm doing wrong?</p> <p>Thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload