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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC