thanks a lot for your help. The problem is that I had a WAS upgrade from 7 to 8.5. Before the upgrade this was a typical answer:
<SoftwareProductResponse xmlns="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v1.0"> <softwareProducts> <productName>WebSphere Application Server</productName> <productSynonym> <productSource>masterSoftwareIndex</productSource> <productName>WebSphere Application Server</productName> </productSynonym>... ... .. .
And after the WAS upgrade I get the following, notice the prefix "a:" in some tags:
<a:SoftwareProductResponse xmlns:a="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v1.0"> <softwareProducts> <a:productName>WebSphere Application Server</a:productName> <productSynonym> <a:productSource>masterSoftwareIndex</a:productSource> <a:productName>WebSphere Application Server</a:productName> </productSynonym>... ... ..
The consumers of this response are too many and I can't ask them to modify their clients to process this new prefixes so I have tried several things trying to completely remove any prefix with no success. I know this is because I have two different namespaces and seems that WAS 8 automatically creates the a and b prefixes. But, why didn't prefixes bother me before in WAS 7?
One important questions is: is it possible to get rid of any prefix when multiple namespaces are in question?
XSDs fragments:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v3.0"
xmlns:pti="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v3.0"
elementFormDefault="qualified">
<!-- Indicates schema version, which can be used by server to dictate client
responses; format is X.YY.ZZ where YY and ZZ can be 00-99 (00 is assumed
if there is a single 0) -->
<simpleType name="PTISchemaVersion">
<restriction base="string">
<enumeration value="v1.0.10" />
</restriction>
</simpleType>
<!--============================================================ -->
<!-- Response related -->
<!--============================================================ -->
<!-- Defining responses as elements allows them to be an XML root node for
JAXB. -->
<element name="SoftwareProductResponse" nillable="true"
type="pti:SoftwareProductResponse" />
<complexType name="SoftwareProductResponse">
<sequence>
<element name="softwareProducts" nillable="true"
type="pti:SoftwareProduct" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="SoftwareProduct">
<complexContent>
<extension base="pti:Product">
<sequence>
<element name="productName" nillable="true" type="string"
minOccurs="0" />
<!-- Describes primary product names from other "software product name"
data sources -->
<element name="productSynonym" nillable="true"
type="pti:SoftwareProductSynonym" minOccurs="0" maxOccurs="unbounded" />
<!-- Aliases for the product name -->
<element name="aliases" nillable="true" type="pti:NameAlias"
minOccurs="0" maxOccurs="unbounded" />
<!-- Human-readable description of the SSP -->
<element name="description" nillable="true" type="string"
minOccurs="0" />
<!-- Associated product codes -->
<element name="offeringClassificationCode" nillable="true"
type="pti:OfferingClassificationCode" minOccurs="0" />
<element name="masterSoftwareIndexSynKey" nillable="true"
type="string" minOccurs="0" />
<element name="questCode" nillable="true" type="pti:QuestCode"
minOccurs="0" />
<element name="originalBrandQuestCode" nillable="true"
type="pti:QuestCode" minOccurs="0" />
<element name="relatedSearchOfferingClassificationCodes"
nillable="true" type="pti:OfferingClassificationCode" minOccurs="0"
maxOccurs="unbounded" />
<!-- Associated miscellaneous properties -->
<!-- primary brand (generally used for reporting and metrics) -->
<element name="primaryBrand" nillable="true" type="pti:Brand"
minOccurs="0" />
<!-- secondary brands (generally used for on-the-glass organizational
purposes) -->
<element name="secondaryBrands" nillable="true" type="pti:Brand"
minOccurs="0" maxOccurs="unbounded" />
<element name="owningDivision" nillable="true" type="string"
minOccurs="0" />
<element name="productType" nillable="true" type="string"
minOccurs="0" />
<element name="masterSoftwareIndexWebShortName" nillable="true"
type="string" minOccurs="0" />
<!-- Deprecated as of v1.0.10; instead use productType -->
<element name="masterSoftwareIndexProductType" nillable="true"
type="string" minOccurs="0" />
<element name="supportAToZ" nillable="true" type="boolean"
minOccurs="0" />
<!-- i.e., indicates the presence of a Q115A IConS template -->
<element name="supportContentAvailable" nillable="true"
type="boolean" minOccurs="0" />
<element name="myNotificationsSupport" nillable="true"
type="boolean" minOccurs="0" />
<!-- Indicates whether this software product is considered to be a ServiceableSoftwareProduct
(SSP) -->
<element name="ssp" nillable="true" type="boolean"
minOccurs="0" />
<!-- Indicates whether this software product is considered to be in
preview mode -->
<element name="preview" nillable="true" type="boolean"
minOccurs="0" />
<!-- Indicates whether this software product is expandable (only applicable
for SSPs) -->
<element name="expandable" nillable="true" type="boolean"
minOccurs="0" />
<element name="supportURL" nillable="true" type="pti:ReferenceURI"
minOccurs="0" />
<!-- Associated VRMs -->
<element name="vrms" nillable="true" type="pti:SoftwareProductVRM"
minOccurs="0" maxOccurs="unbounded" />
<!-- Associated ContentComponents (i.e., DCF components) -->
<element name="contentComponents" nillable="true"
type="pti:ContentComponent" minOccurs="0" maxOccurs="unbounded" />
<!-- Defines child software products; only applicable for SSPs -->
<element name="softwareProductChildren" nillable="true"
type="pti:SoftwareProduct" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</extension>
</complexContent>
</complexType>
<!-- Indicates software product synonyms -->
<complexType name="SoftwareProductSynonym">
<complexContent>
<extension base="pti:PTIBaseType">
<sequence>
<element name="productSource" nillable="true"
type="pti:SoftwareProductSource" minOccurs="0" />
<element name="productName" nillable="true" type="string"
minOccurs="0" />
</sequence>
</extension>
</complexContent>
</complexType>
and
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v1.0"
xmlns:pti="http://w3.ibm.com/xmlns/ibmww/expt/ProductTaxonomyInformation/v1.0"
elementFormDefault="qualified">
<!-- Indicates schema version; can be used by server to dictate client responses -->
<simpleType name="PTISchemaVersion">
<restriction base="string">
<enumeration value="v1.0.0" />
</restriction>
</simpleType>
<element name="SoftwareProductResponse" nillable="true" type="pti:SoftwareProductResponse"/>
<complexType name="SoftwareProductResponse">
<sequence>
<element name="softwareProducts" nillable="true" type="pti:SoftwareProduct" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="SoftwareProduct">
<complexContent>
<extension base="pti:Product">
<sequence>
<element name="productName" nillable="true" type="string" minOccurs="0"/>
<element name="productSynonym" nillable="true" type="pti:SoftwareProductSynonym" minOccurs="0" maxOccurs="unbounded"/>
<!-- Associated product codes -->
<element name="offeringClassificationCode" nillable="true" type="pti:OfferingClassificationCode" minOccurs="0"/>
<element name="masterSoftwareIndexSynKey" nillable="true" type="string" minOccurs="0"/>
<element name="questCode" nillable="true" type="pti:QuestCode" minOccurs="0"/>
<element name="relatedSearchOfferingClassificationCodes" nillable="true" type="pti:OfferingClassificationCode" minOccurs="0" maxOccurs="unbounded"/>
<!-- Associated miscellaneous properties -->
<element name="owningDivision" nillable="true" type="string" minOccurs="0"/>
<element name="masterSoftwareIndexProductType" nillable="true" type="string" minOccurs="0"/>
<element name="supportAToZ" nillable="true" type="boolean" minOccurs="0"/>
<!-- i.e., indicates the presence of a Q115A IConS template -->
<element name="supportContentAvailable" nillable="true" type="boolean" minOccurs="0"/>
<element name="myNotificationsSupport" nillable="true" type="boolean" minOccurs="0"/>
<element name="supportURL" nillable="true" type="pti:ReferenceURI" minOccurs="0"/>
<!-- Associated VRMs -->
<element name="vrms" nillable="true" type="pti:SoftwareProductVRM" minOccurs="0" maxOccurs="unbounded"/>
<!-- Associated ContentComponents (i.e., DCF components) -->
<element name="contentComponents" nillable="true" type="pti:ContentComponent" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- Indicates software product synonyms -->
<complexType name="SoftwareProductSynonym">
<sequence>
<element name="productSource" nillable="true" type="pti:SoftwareProductSource" minOccurs="0"/>
<element name="productName" nillable="true" type="string" minOccurs="0"/>
</sequence>
</complexType>
SoftwareProductResponse.java:
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SoftwareProductResponse", propOrder = { "softwareProducts" }) public class SoftwareProductResponse {
@XmlElement(nillable = true)
protected List<SoftwareProduct> softwareProducts;
/**
* Gets the value of the softwareProducts property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the softwareProducts property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSoftwareProducts().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SoftwareProduct }
*
*
*/
public List<SoftwareProduct> getSoftwareProducts() {
if (softwareProducts == null) {
softwareProducts = new ArrayList<SoftwareProduct>();
}
return this.softwareProducts;
}
}
What can I do to remove all prefixes?
Thanks!