You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Mikhail GRUSHINSKIY <mi...@us.bnpparibas.com> on 2013/06/11 20:59:11 UTC
CXF Aegis binding and namespace inheritance
Hello CXF Devs,
After upgrade of CXF from 2.2.7 to 2.7.4 we started getting different namespace for an element in XML SOAP messages
2.2.7 -->
<ns2:status xmlns:ns2="http://pb.bnpp.com/common/clientdata/to/account/">
<ns3:code xmlns:ns3="http://pb.bnpp.com/common/clientdata/to/common-ref/">A</ns3:code>
<ns3:description xmlns:ns3="http://pb.bnpp.com/common/clientdata/to/common-ref/">Active</ns3:description>
</ns2:status>
2.7.4 -->
<ns2:status xmlns:ns2="http://pb.bnpp.com/common/clientdata/to/common-ref/">
<ns2:code>A</ns2:code>
<ns2:description>Active</ns2:description>
</ns2:status>
'status' element namespace changed. 'status' property is defined not in Account class but in its superclass Party.
So in case of 2.2.7
aegis is taking namespace for 'status' from 'Account'
and in case of 2.7.4 from its superclass 'Party'.
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Account", namespace = "http://pb.bnpp.com/common/clientdata/to/account/", propOrder = {
"accountCode",
...
})
public class Account
extends Party
implements Serializable
{
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Party", propOrder = {
"status"
})
public class Party
implements Serializable
package-info.java
@javax.xml.bind.annotation.XmlSchema(
namespace = "http://pb.bnpp.com/common/clientdata/to/common-ref/",
xmlns = {
@javax.xml.bind.annotation.XmlNs(
prefix = "xsi",
namespaceURI="http://www.w3.org/2001/XMLSchema-instance")
}
)
package com.bnpp.pb.common.clientdata.to;
How can we change XML serialization to be backward compatible? (I.e. make aegis 2.7.4 generate same namespaces as in older version)
Is there an option to turn on or any other way?
Thanks,
--MG
This message and any attachments (the "message") is intended solely for
the addressees and is confidential. If you receive this message in error,
please delete it and immediately notify the sender. Any use not in accord
with its purpose, any dissemination or disclosure, either whole or partial,
is prohibited except formal approval. The internet can not guarantee the
integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will)
not therefore be liable for the message if modified. Please note that certain
functions and services for BNP Paribas may be performed by BNP Paribas RCC, Inc.