|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17986 SOAP Class Fault encoding issue
Submitted: 2002-06-25 19:48 UTC Modified: 2002-06-26 13:32 UTC
From: programming at cari dot net Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.1.2 OS: Linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: programming at cari dot net
New email:
PHP Version: OS:


 [2002-06-25 19:48 UTC] programming at cari dot net
We noticed this specifically when a Fault occurs on the server (we are using SOAPLite for our server).  If the Fault is Base64 encoded, the soap class does not decode it.  This is what the raw XML looks like:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="" SOAP-ENV:encodingStyle="" xmlns:xsi="" xmlns:SOAP-ENV="" xmlns:xsd="">
<faultcode xsi:type="xsd:string">SOAP-ENV:-1245</faultcode>
<faultstring xsi:type="xsd:base64Binary">Q291bGQgbm90IHZlcmlmeSBwYXltZW50X3R5cGUgKMOMKS4gW0RSQVNNL1NRTC5wbSwxMTA0XSBbRFJBU00vU1FMLnBtLDI5N10gW0FjY291bnQucG0sMzA3XQ==</faultstring>

The fault string should probably be decoded before being placed in the message variable in the soap_fault Object.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-25 21:11 UTC] shane at caraveo dot com
This is the fault response that SOAP::Lite produces?  If so I don't plan on doing anything about it.  If pear::soap is producing this, I need code to reproduce this so I can fix the bug.

The spec is fairly clear about what should be in faultcode and faultstring.  This message faultcode is completely invalid, and per soap spec faultstring is 'intended to provide a human readable explanation of the fault and is not intended for algorithmic processing'.
 [2002-06-26 12:03 UTC] programming at cari dot net
Yes that is what SOAP::Lite returns when the faultstring contains "strange" characters (which in this case happened because of the previous bug I opened).  You are right about the SOAP spec.  I will contact the author of SOAP::Lite and inform him of this problem.
 [2002-06-26 13:32 UTC] programming at cari dot net
I have confirmation from the SOAP::Lite developer that he will be fixing this in the "next" release.  Current release is 0.55.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Sep 25 14:01:25 2023 UTC