php.net |  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-06-04 15:35 UTC] chad dot sikorra at gmail dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 17:01:27 2019 UTC