|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74698 Add a Namespace Map Option to the SoapClient
Submitted: 2017-06-04 15:35 UTC Modified: -
From: chad dot sikorra at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant OS: N/A
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.
Bug Type:
From: chad dot sikorra at gmail dot com
New email:
PHP Version: OS:


 [2017-06-04 15:35 UTC] chad dot sikorra at gmail dot com
When the SoapClient generates XML for the request it also generates the namespace prefixes used in the XML (ie. ns1, ns2, ns3, etc). While this ultimately doesn't matter as far as the XML goes, it makes it unpredictable/difficult to work with requests that have many namespaces involved. It also hinders the ability to always have a predictable prefix for a specific namespace. This can be useful if you're generating a complex request with a mixture of namespaces where the SoapClient often makes things difficult to work with.

I think a good feature would be to implement a namespaceMap option for the SoapClient (following the naming for classMap). Basically you would just pass an array of prefix => namespace pairs. For namespaces not in the map it could fallback to the ns1, ns2, etc strategy I guess.

Unfortunately it doesn't seem like anyone really works on the Soap extension anymore, so this will probably go unanswered. If only my C skills were better, hah.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Jun 01 22:03:39 2023 UTC