title: WCF Service SOAP Object
body: <p>I have a web service in WCF, my contract/interface of my sample method looks like this:</p>
  
  <pre><code>[ServiceContract]
  public interface INTERFACE
  {
      [OperationContract]
      os_consultar oe_consultar(oe_consultar obj_consultar);
  }
  </code></pre>
  
  <p>This method generates and XML like this:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org soap/envelope/" xmlns:wses="http://org.com/wses/"
  xmlns:ean="http://schemas.datacontract.org/2004/07 Ean.PaymentGateway.Bank.BankInterfaceEntity"&gt;
  &lt;soapenv:Header/&gt;
  &lt;soapenv:Body&gt;
    &lt;wses:oe_consultar&gt;
       &lt;!--Optional:--&gt;
       &lt;wses:obj_consultar&gt;
          &lt;cod1&gt;?&lt;/cod1&gt;
          &lt;cod2&gt;?&lt;/cod2&gt;
       &lt;/wses:obj_consultar&gt;
    &lt;/wses:oe_consultar&gt;
   &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I want to know if it is possible to generate the xml this way:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org soap/envelope/" xmlns:wses="http://org.com/wses/"
  xmlns:ean="http://schemas.datacontract.org/2004/07 Ean.PaymentGateway.Bank.BankInterfaceEntity"&gt;
  &lt;soapenv:Header/&gt;
  &lt;soapenv:Body&gt;
    &lt;wses:oe_consultar&gt;
      &lt;cod1&gt;?&lt;/cod1&gt;
      &lt;cod2&gt;?&lt;/cod2&gt;
    &lt;/wses:oe_consultar&gt;
   &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Thanks in advance</p>