Closed ignacioalles closed 2 years ago
Hello @ignacioalles. Thank you in your interest for this repository.
The PartyList is covered already. It can be "zero to many" and hence is part of DedexBundle\Entity\Ern41\NewReleaseMessage
, in property partyList
. It can be accessed with function addToPartyList
.
Now, of course this should be called and populated automatically. I did not add a comprehensive test suite for ERN 4.1 (opposedly to 3.8.1 that I use more often). Could you help me reproducing your issue by providing me the ERN 4.1 that you are working on, maybe by anonmyzing it's content (unique IDS and names).
Thanks for your help and your interest.
As an additional note, I am not (yet) keen to approve your PR, because the entities are automatically generated by the tool xsd2php, hence I don't want to modify them manually, but rather understand why it's not parsed properly.
Hi @miqwit I've used some xml derived from ERN 4.1.1 provided samples (only changed namespace to match ERN 4.1). I could not find actual 4.1 samples.
The same problem occurs in DealList
> ReleaseDeal
.
I've added a very basic test case in PR. Perhaps you can take it from there.
It seems that generated classes expects document to be:
<PartyList>
<PartyReference>PSaekoShu</PartyReference>
<PartyName>
<FullName>Saeko Shu</FullName>
<FullNameIndexed>Shu, Saeko</FullNameIndexed>
</PartyName>
<PartyName LanguageAndScriptCode="ja-Jpan">
<FullName>しゅうさえこ</FullName>
</PartyName>
</PartyList>
<PartyList>
<PartyReference>PEMI</PartyReference>
<PartyName>
<FullName>EMI MUSIC JAPAN INC.</FullName>
</PartyName>
</PartyList>
instead of
<PartyList>
<Party>
<PartyReference>PSaekoShu</PartyReference>
<PartyName>
<FullName>Saeko Shu</FullName>
<FullNameIndexed>Shu, Saeko</FullNameIndexed>
</PartyName>
<PartyName LanguageAndScriptCode="ja-Jpan">
<FullName>しゅうさえこ</FullName>
</PartyName>
</Party>
<Party>
<PartyReference>PEMI</PartyReference>
<PartyName>
<FullName>EMI MUSIC JAPAN INC.</FullName>
</PartyName>
</Party>
</PartyList>
but the first document does not pass xsd validation: Error: XMLReader::read(): Element 'PartyReference': This element is not expected. Expected is ( Party ).
Hello @ignacioalles. I am still working on it. I made some progress in branch ddex411 but still some tests fail.
It is not related to DDEX 4.1.1 in fact, but to a special case in DDEX modelling (from XSD) where some List tags, such as PartyList (which is new to DDEX 4.1.1) or ReleaseResourceReferenceList (which is not new but is badly ignored in current version) that do not have a specific class in the model. They are just a list of objects attached to parent node, in fact. And the parser does not support it yet.
Soon! Be patient (and try my branch if you want).
Hello @ignacioalles I fixed it in branch ddex411 which is now merge to master. Check the last version!
Sorry for the late reply. I can confirm it works fine with our testing files.
There is an error while parsing a message
PartyList
node in NewReleaseMessage using ERN 4.1 spec. Error message is:and the reason is that it seems an intermediate class
PartyListType
is required between NewReleaseMessage and PartyType.Message looks like:
Here is some documentation explaining the addition in ERN-4
I can make a pull request if you'd like.