You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, sometimes qualified XML is not allowed to be used by certain web services. Do not ask me why, but some developers choose to NOT allow qualified XML elements in requests, for example in this WSDL, note the elementFormDefault="unqualified". I don't understand why to use namespaces in the first place, when not allowing them, but ok, that is reality.
One approach would be to strip all the XML namespace definitions from my metadata files. A more elegant way would be to instruct the serializer to ignore these XML namespaces during serialization.
It seems this kind of 'configuring' the serializer is currently not possible. What would be a nice approach to realize this? Maybe by setting a boolean flag 'useXmlNamespace' in the Context that is handed over to the serializer?
The text was updated successfully, but these errors were encountered:
One approach would be to strip all the XML namespace definitions from my metadata files
Sorry for the long feedback loop. Probably you have already solved the issue, but yes, I suggest to play with metadata files and to adapt them to what they require
Currently, when an XML namespace is defined in the metadata, serialization results in qualified XML elements (read: with namespaces). This seems logical and is implemented in code like this: https://github.com/schmittjoh/serializer/blob/master/src/JMS/Serializer/XmlSerializationVisitor.php#L287
However, sometimes qualified XML is not allowed to be used by certain web services. Do not ask me why, but some developers choose to NOT allow qualified XML elements in requests, for example in this WSDL, note the
elementFormDefault="unqualified"
. I don't understand why to use namespaces in the first place, when not allowing them, but ok, that is reality.One approach would be to strip all the XML namespace definitions from my metadata files. A more elegant way would be to instruct the serializer to ignore these XML namespaces during serialization.
It seems this kind of 'configuring' the serializer is currently not possible. What would be a nice approach to realize this? Maybe by setting a boolean flag 'useXmlNamespace' in the Context that is handed over to the serializer?
The text was updated successfully, but these errors were encountered: