php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44363 Fatal error using SOAP Extension
Submitted: 2008-03-07 13:02 UTC Modified: 2008-03-18 01:00 UTC
Votes:6
Avg. Score:4.5 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: ryanmhuc at yahoo dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.5 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ryanmhuc at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-03-07 13:02 UTC] ryanmhuc at yahoo dot com
Description:
------------
I recieve the following error:

Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: Violation of encoding rules in

When using the SOAP extension & WSDL on Windows XP w/ Apache 2.2 on PHP 5.2.5. This only occurs on types of requests. Others run successfully. I don't know but i suspect that a certain type of character(s) in the response is causing an issue for the SOAP extension in Windows. The same exact code, WSDL file runs on Linux without a problem. 

The API URL is https so is is possible the problem could lie there.

Reproduce code:
---------------
The WSDL file is too long to post here. I would also have to provide the API files and a login to duplicate.

But i will do so if you contact me. 

Expected result:
----------------
I would expect to be returned a stdClass object. 

Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: Violation of encoding rules in E:\Web\imagepath.net\intranet\lib\Attask\Attask.php:180 Stack trace: #0 [internal function]: SoapClient->__call('getTemplateTask...', Array) #1 [internal function]: SoapClient->getTemplateTasksByTemplateID('213110666430904...', 4085) #2 E:\Web\imagepath.net\intranet\lib\Attask\Attask.php(180): call_user_func_array(Array, Array) #3 [internal function]: Attask->__call('getTemplateTask...', Array) #4 E:\Web\imagepath.net\intranet\lib\Attask\TemplateBean.php(55): Attask->getTemplateTasksByTemplateID(4085) #5 E:\Web\imagepath.net\intranet\lib\Attask\TemplateBean.php(18): TemplateBean->getTasks() #6 E:\Web\imagepath.net\intranet\attask\template_importer.php(149): TemplateBean->deleteTasks() #7 {main} thrown in

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-10 11:36 UTC] felipe@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 the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2008-03-18 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".
 [2008-03-19 12:51 UTC] wim dot vanderveen at westlandenergie dot nl
i get the same problem.
i suspect it is caused by my server trying to return a (class containing an array containing some) NaN
found about the same bug-description in #43045, therefore updated php (both client and server side) to 5.2.6-dev as indicated
but alas, still the same problem

Wim
 [2008-10-16 10:28 UTC] jitka at darbujanova dot cz
same problem on php 5.2.6.
It happened when some transmited ComplexType (eg. in PHP stdClass) have some member variable with mixing small and big letters (this was my case).

For example this causes an error:
class MyStdClass {
 var $cisloDokladu;
}
server code: 
$myStdClass = new MyStdClass();
$myStdClass->cisloDokladu = 'what you want';
return $myStdClass;

when changing on $cislodokladu, it is ok.

but some varibles doesn't cause this problem fo example:
 var $someElseVar;

Thanks for reopening this issue. Not critical for me, I have only changed variable name but it is a bug.
 [2010-02-01 09:23 UTC] jitka at darbujanova dot cz
Or problem may sit here (copied and tried from another commercial server):

It took me hours to find out the cause of the problem, so I like to share it with you.

In the WSDL we defined some (optional) numeric attributes (xsd:integer). It turns out that the mock service response generation functionality creates responses that contain example values in these attributes.
The example value generated is "?", and that is not an integer value. Changing it to value "1" for example solves the problem.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon May 10 17:01:26 2021 UTC