priority
Standard
status
New Issue

qcodo
0.4.16 (Development)
category
Web Services
php
Any



Votes
There are no votes for this issue.

reported: wednesday, august 25, 2010, 3:37 pm pdt  |  by: apselico  |  messages: 10 messages  |  last: about 8 years ago


#1  |  apselico (Trujillo, PE) Peru
Wednesday, August 25, 2010, 3:37 PM PDT

I recieve the message:
Call-time pass-by-reference has been deprecated
when i try to use QSoapService, i solved that
changing PHP configuration:
allow_call_time_pass_reference = true (php.ini)
but as it has been deprecated the base class needs to be changed

#2  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Thursday, August 26, 2010, 7:37 AM PDT
#3  |  apselico (Trujillo, PE) Peru
Thursday, August 26, 2010, 8:31 AM PDT

Thanks for your response Marcos, but i have already try that, the behavior of the class is not the same without that &. When i used the class without the &, the wsdl generated dont shows the xml structure of the qcodo class object returned. That makes the soap client to crash because it does not know how to map the response.

#4  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Thursday, August 26, 2010, 11:01 AM PDT

Could you please send me the piece of code that reproduces the issue?

Thanks

#5  |  apselico (Trujillo, PE) Peru
Sunday, August 29, 2010, 8:52 AM PDT

This is the table:

CREATE TABLE `venta` (
`codigo` int(11) NOT NULL auto_increment,
`fecha` date NOT NULL,
`cliente` int(11) NOT NULL,
`observacion` text NOT NULL,
`estado` char(1) NOT NULL,
PRIMARY KEY  (`codigo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

I have tested the example with the last release of qcodo(0.4.17), I have a class like this:
bc.
<?php
include_once “../includes/prepend.inc.php”;

class Servicio extends QSoapService{
  /**
   * servicio encargado de mostrar ventas
   * @param int $intVenta
   *  @return Venta
   */
  public function getVenta($intVenta){
      $objVenta = Venta::Load($intVenta);
      return $objVenta;
  }
}
Servicio::Run(“Servicio”);
?>
.bc

In linux Ubuntu 10.04 ( php 5.3.2 ) If I keep the & symbol in line 43 of QSoapService class and i have the php.ini with allow_call_time_pass_reference=On, i get this CORRECT wsdl:

<?xml version=“1.0” encoding=“UTF-8” ?>
<definitions name=“Servicio” targetNamespace=“http://qcodo.defaultnamespace.com”>
<service name=“Servicio”>
<documentation/>
<port name=“Port” binding=“tns:Binding”>
<soap:address location=“http://localhost/~jorge/qcodo-0.4.17/www/servicio.php”/>
</port>
</service>
<binding name=“Binding” type=“tns:PortType”>
<soap:binding transport=“http://schemas.xmlsoap.org/soap/http” style=“rpc”/>
<operation name=“getVenta”>
<soap:operation soapAction=“http://qcodo.defaultnamespace.com/getVenta”/>
<input>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/>
</input>
<output>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/>
</output>
</operation>
</binding>
<portType name=“PortType”>
<operation name=“getVenta”>
<input message=“tns:getVentaRequest”/>
<output message=“tns:getVentaResponse”/>
</operation>
</portType>
<message name=“getVentaRequest”>
<part name=“intVenta” type=“xsd:int”/>
</message>
<message name=“getVentaResponse”>
<part name=“getVentaResult” type=“xsd1:Venta”/>
</message>
<types>
<schema targetNamespace=“http://qcodo.defaultnamespace.com”>
<complexType name=“Venta”>
<sequence>
<element name=“Codigo” type=“xsd:int”/>
<element name=“Fecha” type=“xsd:dateTime”/>
<element name=“Cliente” type=“xsd:int”/>
<element name=“Observacion” type=“xsd:string”/>
<element name=“Estado” type=“xsd:string”/>
<element name=“__blnRestored” type=“xsd:boolean”/>
</sequence>
</complexType>
</schema>
</types>
</definitions>

If i delete the & symbol on QSoapService class and keep php.ini with allow_call_time_pass_reference=On
In windows 7 (php 5.2.6 - appserv 5.2.10) this is the wsdl generated:

<?xml version=“1.0” encoding=“UTF-8” ?>
<definitions name=“Servicio” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns=“http://schemas.xmlsoap.org/wsdl/” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=“http://qcodo.defaultnamespace.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsd1=“http://qcodo.defaultnamespace.com”>
<service name=“Servicio”>
<documentation />
<port name=“Port” binding=“tns:Binding”>
<soap:address location=“http://localhost/qcodo-0.4.17/www/servicio.php” />
</port>
</service>
<binding name=“Binding” type=“tns:PortType”>
<soap:binding transport=“http://schemas.xmlsoap.org/soap/http” style=“rpc” />
<operation name=“getVenta”>
<soap:operation soapAction=“http://qcodo.defaultnamespace.com/getVenta” />
<input>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” />
</input>
<output>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” />
</output>
</operation>
</binding>
<portType name=“PortType”>
<operation name=“getVenta”>
<input message=“tns:getVentaRequest” />
<output message=“tns:getVentaResponse” />
</operation>
</portType>
<message name=“getVentaRequest”>
<part name=“intVenta” type=“xsd:int” />
</message>
<message name=“getVentaResponse”>
<part name=“getVentaResult” type=“xsd1:Venta” />
</message>
<types>
<schema xmlns=“http://www.w3.org/2001/XMLSchema” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/” />
</types>
</definitions>


and in linux ubuntu 10.04 (php 5.3.2, i have tried with another linux also) without & symbol but with allow_call_time_pass_reference=On the same example generates this WSDL:

<?xml version=“1.0” encoding=“UTF-8”?>
<definitions name=“Servicio” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns=“http://schemas.xmlsoap.org/wsdl/” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=“http://qcodo.defaultnamespace.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsd1=“http://qcodo.defaultnamespace.com”>
<service name=“Servicio”>
<documentation/>
<port name=“Port” binding=“tns:Binding”>
<soap:address location=“http://localhost/~jorge/qcodo-0.4.17/www/servicio.php”/>
</port>
</service>
<binding name=“Binding” type=“tns:PortType”>
<soap:binding transport=“http://schemas.xmlsoap.org/soap/http” style=“rpc”/>
<operation name=“getVenta”>
<soap:operation soapAction=“http://qcodo.defaultnamespace.com/getVenta”/>
<input>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/>
</input>
<output>
<soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/>
</output>
</operation>
</binding>
<portType name=“PortType”>
<operation name=“getVenta”>
<input message=“tns:getVentaRequest”/>
<output message=“tns:getVentaResponse”/></operation>
</portType>
<message name=“getVentaRequest”><part name=“intVenta” type=“xsd:int”/></message>
<message name=“getVentaResponse”><part name=“getVentaResult” type=“xsd1:Venta”/></message>
<types>
<schema xmlns=“http://www.w3.org/2001/XMLSchema” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/”>
</schema>
</types>
</definitions>

#6  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Tuesday, September 14, 2010, 5:17 PM PDT

I'm sorry Apselico, but I can't reproduce your issue.

I'm running on Ubuntu 10.04
PHP 5.3.2-1ubuntu4.2

The code of version 0.4.17 shows me this wsdl and no deprecated error:
<definitions name=“Servicio” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns=“http://schemas.xmlsoap.org/wsdl/” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=“http://qcodo.defaultnamespace.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsd1=“http://qcodo.defaultnamespace.com”><service name=“Servicio”><documentation/><port name=“Port” binding=“tns:Binding”><soap:address location=“http://qcodo.local/Servicio.php”/></port></service><binding name=“Binding” type=“tns:PortType”><soap:binding transport=“http://schemas.xmlsoap.org/soap/http” style=“rpc”/><operation name=“getVenta”><soap:operation soapAction=“http://qcodo.defaultnamespace.com/getVenta”/><input><soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/></input><output><soap:body use=“encoded” namespace=“http://qcodo.defaultnamespace.com/getVenta” encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”/></output></operation></binding><portType name=“PortType”><operation name=“getVenta”><input message=“tns:getVentaRequest”/><output message=“tns:getVentaResponse”/></operation></portType><message name=“getVentaRequest”><part name=“intVenta” type=“xsd:int”/></message><message name=“getVentaResponse”><part name=“getVentaResult” type=“xsd1:Venta”/></message><types><schema xmlns=“http://www.w3.org/2001/XMLSchema” targetNamespace=“http://qcodo.defaultnamespace.com” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/”><complexType name=“Venta”><sequence><element name=“Codigo” type=“xsd:int”/><element name=“Fecha” type=“xsd:dateTime”/><element name=“Cliente” type=“xsd:int”/><element name=“Observacion” type=“xsd:string”/><element name=“Estado” type=“xsd:string”/><element name=“__blnRestored” type=“xsd:boolean”/></sequence></complexType></schema></types></definitions>

My php.ini hasn't got the allow_call_time_pass_reference setting.

Please let me know if you still have the issue,

Thanks,

Marcos

#7  |  apselico (Trujillo, PE) Peru
Sunday, September 19, 2010, 8:17 PM PDT

Hi Marcos, you dont see the error or warning because in your php.ini file you have this:

error_reporting = E_ALL & ~E_DEPRECATED

but in order to show what is deprecated you must have:

error_reporting = E_ALL

greetings

#8  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Monday, September 20, 2010, 7:12 AM PDT

Hi Apselico,

Unfortunately, my php ini setting is :

error_reporting = E_ALL

Furthermore, I added this function

split($pattern,$string)

to test deprecated errors and I got the qcodo error page telling me that split is deprecated but I don't have the error with your service.

I will investigate this issue further tonight.

Thanks,

Marcos

#9  |  Mike Ho (San Diego, CA) United States of America Qcodo Administrator
Monday, September 20, 2010, 3:32 PM PDT

I was able to replicate it -- I believe you need to have PHP > 5.3.x in order to get the error (it doesn't show up if I'm using 5.2.x)

Thanks for the post -- the entire call will need to be altered (and perhaps the structure of the code generated SOAP method on the generated class side will need to be changed as well)...

#10  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Monday, September 20, 2010, 4:04 PM PDT

Sorry. Still no issue here:

marcos@marcos-desktop:~/Proyectos/qcodo$ cat /etc/php5/apache2/php.ini |grep ^error_reporting\ =
error_reporting = E_ALL
marcos@marcos-desktop:~/Proyectos/qcodo$ php -version
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:03:45) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

Code:

<?php
    
// Include prepend.inc.php to load Qcodo    
    
require(dirname(__FILE__) . '/../includes/prepend.inc.php');

    class 
Servicio extends QSoapService {

        
/**
         * servicio encargado de mostrar ventas
         * @param int $intVenta
         *  @return Venta
         */
        
public function getVenta($intVenta) {
            
$objVenta Venta::Load($intVenta);
            return 
$objVenta;
        }

    }

    
Servicio::Run("Servicio");
    
?>
.bc


Copyright © 2005 - 2019, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.