php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33684 SOAPfault
Submitted: 2005-07-13 21:11 UTC Modified: 2005-07-21 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: deucalion at lycos dot co dot uk Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.0.4 OS: Windows2000,XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
26 + 28 = ?
Subscribe to this entry?

 
 [2005-07-13 21:11 UTC] 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> } 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-13 21:23 UTC] tony2001@php.net
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.
 [2005-07-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC