IBM MDM, error while extending the Organization entity

1.1k Views Asked by At

I am doing a POC in IBM Infosphere MDM, with physical MDM to be specific.

I will go through the steps I did.

  1. Without doing any extensions or addition, I ran the addOrganization service with the default model provided with the ibm software. The Organization details was added in MDM with out any error. To keep things simple, I only kept TCRMOrganizationNameBObj (it is the only mandatory object) in TCRMOrganizationBObj. So far it was ok.

  2. I added an extension. XOrganization, with 2 attribute. One of the attribute is non nullable (CustomerHierarchyCode). new addOrganization service that we prepared is given below.

addOrganization

<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE TCRMService SYSTEM "myTCRM.dtd"-->
<TCRMService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="myTCRM.xsd">
    <RequestControl>
        <requestID>22456</requestID>
        <DWLControl>
            <requesterName>cusadmin</requesterName>
            <requesterLanguage>100</requesterLanguage>
        </DWLControl>
    </RequestControl>
   <TCRMTx>
        <TCRMTxType>addOrganization</TCRMTxType>
        <TCRMTxObject>TCRMOrganizationBObj</TCRMTxObject>
        <TCRMObject>
            <TCRMOrganizationBObj>
                <PartyId/>
                <NewPartyIdReference>333994</NewPartyIdReference>
                <DisplayName>MSI</DisplayName>
                <PreferredLanguageType>100</PreferredLanguageType>
                <ComputerAccessType>1</ComputerAccessType>
                <PartyType>O</PartyType>
                <AlertIndicator>Y</AlertIndicator>
                <SolicitationIndicator>N</SolicitationIndicator>
                <ConfidentialIndicator>N</ConfidentialIndicator>
                <ClientPotentialType>2</ClientPotentialType>
                <ClientImportanceType>4</ClientImportanceType>
                <MandatorySearchDone>Y</MandatorySearchDone>
                <BuySellAgreementType>2</BuySellAgreementType>
                <ProfitIndicator>Y</ProfitIndicator>
                <OrganizationType>1</OrganizationType>
                <EstablishedDate>2006-01-11</EstablishedDate>
                <IndustryType>9</IndustryType>
                <OrganizationLastUpdateDate/>
                <OrganizationLastUpdateUser/>                  
                <TCRMExtension>
                    <ExtendedObject>XOrganizationBObjExt</ExtendedObject>
                        <XOrganizationBObjExt>
                            <PrivateCompanyCustomerInd>Yes</PrivateCompanyCustomerInd>
                            <CustomerHierarchyCodeType>2</CustomerHierarchyCodeType>
                            <CustomerHierarchyCodeValue>name2</CustomerHierarchyCodeValue>
                        </XOrganizationBObjExt>
                </TCRMExtension>   
                <TCRMOrganizationNameBObj>
                    <OrganizationNameIdPK/>
                    <OrganizationPartyId/>
                    <OrganizationName>Media</OrganizationName>
                    <StartDate>2006-01-11</StartDate>
                    <EndDate/>
                    <NameUsageType>1</NameUsageType>
                </TCRMOrganizationNameBObj>                         
            </TCRMOrganizationBObj>
        </TCRMObject>
    </TCRMTx>
</TCRMService>

I ran the above addOrganization in which I got the following error. I believe that the some tag, either <TCRMExtension> or <CustomerHierarchyCodeType> is misplaced. Can any one help with this?

<?xml version="1.0" encoding="UTF-8"?>
<TCRMService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="tCRMResponse.xsd">
       <ResponseControl>
              <ResultCode>FATAL</ResultCode>
              <ServiceTime>32</ServiceTime>
              <DWLControl>
                     <requesterLanguage>100</requesterLanguage>
                     <requesterLocale>en</requesterLocale>
                     <requesterName>cusadmin</requesterName>
                     <requestID>22456</requestID>
              </DWLControl>
       </ResponseControl>
       <TxResponse>
              <RequestType>addOrganization</RequestType>
              <TxResult>
                     <ResultCode>FATAL</ResultCode>
                     <DWLError>
                           <ComponentType>106</ComponentType>
                           <ErrorMessage>Parser DWLTransaction failed. The format of the message is not correct or an application error occurred.</ErrorMessage>
                           <ErrorType>READERR</ErrorType>
                           <LanguageCode>100</LanguageCode>
                           <ReasonCode>4928</ReasonCode>
                           <Severity>0</Severity>
                            <Throwable>com.dwl.base.requestHandler.exception.RequestParserException: cvc-complex-type.2.4.a: Invalid content was found starting with element &apos;XOrganizationBObjExt&apos;. One of &apos;{ExtendedObject, CommonExtensionBObj}&apos; is expected.</Throwable>
                     </DWLError>
              </TxResult>
       </TxResponse>
</TCRMService>

The <TCRMExtension> tag is kept before TCRMOrganizationNameBObj (which is specified in the TCRMOrganizationBObjType xsd). Refer below for xsd.

TCRMOrganizationBObjType
<xsd:complexType name="TCRMOrganizationBObjType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexContent>
<xsd:extension base="CommonBObjType">
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element maxOccurs="1" minOccurs="0" ref="ObjectReferenceId"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyId"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="NewPartyIdReference"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="DisplayName"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PreferredLanguageType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PreferredLanguageValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ComputerAccessType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ComputerAccessValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="CreatedDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="SinceDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="LeftDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="InactivatedDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="LastStatementDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ReferredByPartyID"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="StatementFrequencyType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="StatementFrequencyValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientStatusType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientStatusValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="AlertIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="SolicitationIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ConfidentialIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientPotentialType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientPotentialValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientImportanceType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ClientImportanceValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="MandatorySearchDone"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyActiveIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="DoNotDeleteIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="LastUsedDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="LastVerifiedDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="SourceIdentifierType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="SourceIdentifierValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyLastUpdateDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyLastUpdateUser"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PartyLastUpdateTxId"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="AccessTokenValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationPartyId"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="BuySellAgreementType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="BuySellAgreementValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="ProfitIndicator"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="EstablishedDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="IndustryType"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="IndustryValue"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationLastUpdateDate"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationLastUpdateUser"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="OrganizationLastUpdateTxId"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="TCRMExtension"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="PrimaryKeyBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMOrganizationNameBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyAddressBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyContactMethodBObj"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="TCRMFinancialProfileBObj"/>
<xsd:element maxOccurs="1" minOccurs="0" ref="TCRMInactivatedPartyBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyIdentificationBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyRelationshipBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMSuspectBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMAlertBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMAdminContEquivBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyLobRelationshipBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyPrivPrefBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyValueBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="DWLAccessDateValueBObj"/>
<!-- ######## response element ######## -->
<xsd:element minOccurs="0" ref="ComponentID"/>
<xsd:element minOccurs="0" ref="PendingCDCIndicator"/>
<xsd:element minOccurs="0" ref="AddPartyStatus"/>
<xsd:element minOccurs="0" ref="PartyHistActionCode"/>
<xsd:element minOccurs="0" ref="PartyHistCreateDate"/>
<xsd:element minOccurs="0" ref="PartyHistCreatedBy"/>
<xsd:element minOccurs="0" ref="PartyHistEndDate"/>
<xsd:element minOccurs="0" ref="PartyHistoryIdPK"/>
Chapter 4. InfoSphere MDM Server business objects 905
<xsd:element minOccurs="0" ref="SearchPartyDone"/>
<xsd:element minOccurs="0" ref="OrganizationHistActionCode"/>
<xsd:element minOccurs="0" ref="OrganizationHistCreateDate"/>
<xsd:element minOccurs="0" ref="OrganizationHistCreatedBy"/>
<xsd:element minOccurs="0" ref="OrganizationHistEndDate"/>
<xsd:element minOccurs="0" ref="OrganizationHistoryIdPK"/>
<xsd:element minOccurs="0" ref="DWLStatus"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyLinkBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMDefaultPrivPrefBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartySearchBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMOrganizationSearchBObj"/>
<xsd:element minOccurs="0" ref="TCRMMultiplePartyCDCBObj"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="TCRMPartyDemographicsBObj"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
2

There are 2 best solutions below

0
On

The latest versions of MDM don't allow for the party objects to be easily extended. We used to do a workaround where we copy the jar (particularly a property) from an older version of MDM to RAD, which allows the party objects to be extended.

After building with this change in the jar, though RAD does not allow all capabilities, it will enable them to be extended and in the PhysicalMDM.xsd, which is enough for the extension to work.

P.S: I don't have the jar and the property handy; I will update here once I get it.

0
On

Following will work..

<TCRMService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://www.ibm.com/mdm/schema" xsi:schemaLocation="http://www.ibm.com/mdm/schema MDMDomains.xsd">
        <RequestControl>
                <requestID>3</requestID>
                <DWLControl>
                        <requesterName>Sankar</requesterName>
                        <requesterLanguage>100</requesterLanguage>
                </DWLControl>
        </RequestControl>
        <TCRMTx>
                <TCRMTxType>addParty</TCRMTxType>
                <TCRMTxObject>TCRMOrganizationBObj</TCRMTxObject>
                <TCRMObject>
                        <TCRMOrganizationBObj>
                                <PartyType>O</PartyType>
                                <DoNotDeleteIndicator>1</DoNotDeleteIndicator>
                                <OrganizationType>1</OrganizationType>
                                <EstablishedDate>1978-01-03</EstablishedDate>
                                <IndustryType>10</IndustryType>
<TCRMOrganizationNameBObj>
                    <OrganizationNameIdPK/>
                    <OrganizationPartyId/>
                    <OrganizationName>Medteck</OrganizationName>
                    <StartDate>2006-01-11</StartDate>
                    <EndDate/>
                    <NameUsageType>1</NameUsageType>
                </TCRMOrganizationNameBObj>
        </TCRMOrganizationBObj>
                </TCRMObject>
        </TCRMTx>
</TCRMService>