|  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
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:
Solve the problem:
38 + 22 = ?
Subscribe to this entry?

 [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: Sat Jun 03 22:03:41 2023 UTC