php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">SOAP-ENV:-1245</faultcode>
<faultstring xsi:type="xsd:base64Binary">Q291bGQgbm90IHZlcmlmeSBwYXltZW50X3R5cGUgKMOMKS4gW0RSQVNNL1NRTC5wbSwxMTA0XSBbRFJBU00vU1FMLnBtLDI5N10gW0FjY291bnQucG0sMzA3XQ==</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC