diff --git a/src/DTO/PDZRecord.php b/src/DTO/PDZRecord.php index a6786f7..6b3e5f7 100644 --- a/src/DTO/PDZRecord.php +++ b/src/DTO/PDZRecord.php @@ -45,8 +45,8 @@ class PDZRecord #[Serializer\Type('string')] #[Serializer\SerializedName('p:ODZIdent')] #[Serializer\XmlElement(cdata: false)] - #[Assert\NotBlank(allowNull: false)] - protected string $ident; + #[Assert\NotBlank(allowNull: true)] + protected ?string $ident; public function getType(): string { @@ -103,12 +103,12 @@ public function setCount(?int $count): PDZRecord return $this; } - public function getIdent(): string + public function getIdent(): ?string { return $this->ident; } - public function setIdent(string $ident): PDZRecord + public function setIdent(?string $ident): PDZRecord { $this->ident = $ident; return $this; diff --git a/src/DTO/Response/PDZInfo.php b/src/DTO/Response/PDZInfo.php index 3acbebc..1f09713 100644 --- a/src/DTO/Response/PDZInfo.php +++ b/src/DTO/Response/PDZInfo.php @@ -19,8 +19,9 @@ class PDZInfo extends IResponse * @var PDZRecord[] */ #[Serializer\Type('array')] - #[Serializer\XmlList(entry: 'dbPDZRecord', inline: false)] - #[Serializer\SerializedName('p:dbPDZRecords')] + #[Serializer\XmlList(entry: 'dbPDZRecord', inline: false, namespace: 'http://isds.czechpoint.cz/v20')] + #[Serializer\SerializedName('dbPDZRecords')] + #[Serializer\XmlElement(cdata: false, namespace: 'http://isds.czechpoint.cz/v20')] #[Assert\All([ new Assert\Type(type: PDZRecord::class) ])]