ID: 33684 Updated by: [EMAIL PROTECTED] Reported By: deucalion at lycos dot co dot uk -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows2000,XP PHP Version: 5.0.4 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Are you sure all this HTML-code, MySQL queries etc. are related to the problem? I'm sure they are not. And what did you expect to get? There was a special field in the form called "Expected result", please fill it next time. Previous Comments: ------------------------------------------------------------------------ [2005-07-13 21:11:53] deucalion at lycos dot co dot uk Description: ------------ I WROTE THE FOLLOWING WEBSERVICE : WSDL FILE IS THAT: <?xml version="1.0" encoding="ISO-8859-1"?> <definitions name ="Elements" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" targetNamespace="http://members.lycos.co.uk/deucalion/webservices/elements.wsdl" xmlns:tns="http://members.lycos.co.uk/deucalion/webservices/elements.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <message name="getElementRequest"> <part name="nome" type="xsd:string"/> </message> <message name="getElementResponse"> <part name="return" type="xsd:string[]"/> </message> <portType name="ElementPortType"> <operation name="getElement"> <input message="tns:getElementRequest"/> <output message="tns:getElementResponse"/> </operation> </portType> <binding name="ElementBinding" type="tns:ElementPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="getElement"> <soap:operation soapAction="Element#getElement"/> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Element"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Element"/> </output> </operation> </binding> <service name="ElementService"> <port name="ElementPort" binding="tns:ElementBinding"> <soap:address location="http://localhost/elements.wsdl"/> </port> </service> </definitions> Reproduce code: --------------- THE SOURCE CODE OF SOAPCLIENT IS THAT: <? $client = new SoapClient ( "elements.wsdl" , array ( ' encoding ' => ' ISO-8859-1 ' ) ) ; try { $return = $client ->getElement (Carbono) ; echo " <table border = 1 > " ; echo "<tr bgcolor = gray ><td> Column</td> <td> content</td></tr> " ; echo "<tr><td> Num_Atom </td> <td> ' . $return [ 'num_atom' ] . ' </td></tr> " ; echo "<tr><td> Nome </td> <td> ' . $return [ 'nome' ] . '</td></tr>" ; echo "<tr><td> Simbol </td> <td> ' . $return [ 'simbol' ] . ' </td></tr> " ; echo "<tr><td> Massa_Atom </td> <td> ' . $return [ 'massa_atom' ] . ' </td></tr> " ; echo "<tr><td> Dens </td> <td> ' . $return [ ' dens ' ] . ' </td></tr> " ; echo "<tr><td> Pto_Fusao </td> <td> ' . $return [ 'pto_fusao ' ] . ' </td></tr> " ; echo "<tr><td> Pto_Ebul </td> <td> ' . $return [ ' pto_ebul ' ] . ' </td></tr> " ; echo "<tr><td> Tipo </td> <td> ' . $return [ ' tipo ' ] . ' </td></tr> " ; echo "<tr><td> Orbitais </td> <td> ' . $return [ ' orbitais ' ] . ' </td></tr> " ; echo "<tr><td> Estrutura_molecular </td> <td> ' . $return [ ' estrutura_molecular ' ] . </td></tr> "; echo "</table> " ; } catch ( SoapFault $exception ) { echo " Error: " ; echo " <b> { $exception -> faultstring } </b> "; } ?> ------------------------------------------------------------ THE SOAPSERVER IS THAT: <? function getElement ( $nome) { if ( ! $nome) { throw new SoapFault (' Client ', ' Param not found'); } $id = @mysql_connect ( "www.freesq.org", "alphaX9", ""); mysql_select_db ("periodical_table",$id); if ( ! $id) throw new SoapFault (' Server ' , 'Server not found '); $query = " SELECT * FROM elements WHERE name='$name'"; $result = mysql_query ($id,$query); $array=mysql_fetch_array($result); if ( $array == null ) throw new SoapFault (' Server ' , 'Client not found '); return $array [0]; } $server = new SoapServer ( "elements.wsdl " , array (' encoding ' => ' ISO -8859-1 ' ) ) ; $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA,TRUE); ?> Actual result: -------------- SOAPCLIENT Error message: { Object id #2 <fault string> } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33684&edit=1
