title: magento API v2, extending sales/order class
body: <p>I've been dealing with Magento API v2 for some days. I'm trying to extend the API to add a new method called "pago" (means payment) to the order/sales class.
  By now I'm able to do it using the v1 WSDL, but when using v2 I get this error:</p>
  
  <blockquote>
    <p>Procedure 'salesOrderPago' not present in ...</p>
  </blockquote>
  
  <p>My WSDL seems to be OK (http://www.hijole.com.py/ofertas/index.php/api/v2_soap/?wsdl)
  I think my error is somewhere in <strong>my api.xml file</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;api&gt;
          &lt;resources&gt;
              &lt;sales_order translate="title" module="sales"&gt;
                  &lt;model&gt;sales/order_api&lt;/model&gt;
                  &lt;title&gt;Order API&lt;/title&gt;
                  &lt;acl&gt;sales/order&lt;/acl&gt;
                  &lt;methods&gt;
                      &lt;pago translate="title" module="sales"&gt;
                          &lt;title&gt;Acepta un pago&lt;/title&gt;
                          &lt;acl&gt;sales/order/create&lt;/acl&gt;
                      &lt;/pago&gt;                 
                  &lt;/methods&gt;
              &lt;/sales_order&gt;
           &lt;/resources&gt;
       &lt;resources_alias&gt;
              &lt;order&gt;sales_order&lt;/order&gt;
           &lt;/resources_alias&gt;
          &lt;v2&gt;
              &lt;resources_function_prefix&gt;
                  &lt;order&gt;salesOrder&lt;/order&gt;
              &lt;/resources_function_prefix&gt;
          &lt;/v2&gt;
      &lt;/api&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>This is my api/v2.php file</p>
  
  <pre><code>&lt;?php
  class Neurona_Pagoexpress_Model_Sales_Order_Api_V2 extends Mage_Sales_Model_Order_Api
  {
      public function pago($ref, $medio, $moneda, $boleta)
      {
      try{
          //Crea invoice para la orden
          $invoice = Mage::getModel('sales/order_invoice_api');
          $invoice-&gt;create($ref, array(), 'PagoExpress - '.$boleta);
  
          $aut = "4894371870891274"; //Generar con algoritmo
          return array('00','Procedimiento correcto',$aut); // 00 = OK, Pago realizado
      }
      catch (Mage_Core_Exception $e) {
          return array('99'); 
      }
  }
  }
  </code></pre>
  
  <p>This is my <strong>conig.xml</strong> file</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config&gt;
      &lt;global&gt;
          &lt;models&gt;
              &lt;sales&gt;
                  &lt;rewrite&gt;
                      &lt;order_api&gt;Neurona_Pagoexpress_Model_Sales_Order_Api&lt;/order_api&gt;
                      &lt;order_api_v2&gt;Neurona_Pagoexpress_Model_Sales_Order_Api_V2&lt;/order_api_v2&gt;
                  &lt;/rewrite&gt;
              &lt;/sales&gt;
          &lt;/models&gt;
      &lt;/global&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>Here is my etc/wsdl.xml</p>
  
  <pre><code>    &lt;definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"&gt;
          &lt;message name="salesOrderPagoRequest"&gt;
              &lt;part name="sessionId" type="xsd:string" /&gt;
              &lt;part name="orderIncrementId" type="xsd:string" /&gt;
              &lt;part name="orderMedio" type="xsd:string" /&gt;
              &lt;part name="orderMoneda" type="xsd:string" /&gt;
              &lt;part name="orderBoleta" type="xsd:string" /&gt;
          &lt;/message&gt;
          &lt;message name="salesOrderPagoResponse"&gt;
              &lt;part name="result" type="typens:ArrayOfString" /&gt;
          &lt;/message&gt;
  
          &lt;portType&gt;
              &lt;operation name="salesOrderPago"&gt;
                  &lt;documentation&gt;Implementa el pago de una factura&lt;/documentation&gt;
                  &lt;input message="typens:salesOrderPagoRequest" /&gt;
                  &lt;output message="typens:salesOrderPagoResponse" /&gt;
              &lt;/operation&gt;
           &lt;/portType&gt;
  
          &lt;binding&gt;
              &lt;operation name="salesOrderPago"&gt;
                  &lt;soap:operation soapAction="urn:{{var wsdl.handler}}Action" /&gt;
                  &lt;input&gt;
                      &lt;soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
                  &lt;/input&gt;
                  &lt;output&gt;
                      &lt;soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
                  &lt;/output&gt;
              &lt;/operation&gt;
          &lt;/binding&gt;
      &lt;/definitions&gt;
  </code></pre>
  
  <p>Thanks in advance! </p>