xsd2php
xsd2php copied to clipboard
Hevy code (hevy xml) in the handler
I'm traversing the nodes in Domdocument to deserialize/serialize. I've tried visitor and visitorObject() and haven't gotten any results. Is there a way to process data in the handler? One of the problems with UBL is extensions, for example, electronic signatures:
I pulled the serializer into the handler but it returns an empty extension. My cuestion is... Is there another way without using my spaghetti code?
<ext:ExtensionContent>
<ds:Signature Id="xmldsig-8bc....8-a660-61327289aa2a">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<ds:SignatureMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<ds:Reference Id="xmldsig-8bcadf1a....660-61327289aa2a-ref0" URI="">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384" />
<ds:DigestValue>
BeMJ9+a7liP.....JqKc9M6oSlCzBUFLjH</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#xmldsig-87d128....5-3d9cfa0eec26-keyinfo">
<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384" />
<ds:DigestValue>
3ZYyqXrGwQa......cMhAo/</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties"
URI="#xmldsig-8bcad....1327289aa2a-signedprops">
<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384" />
<ds:DigestValue>
ujZZlWi7z6L82ayqj...JvbVccliHWPV1lpXsFxv2i2YX</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="xmldsig-8b...a660-61327289aa2a-sigvalue">
...
592Y39kpnSrLsHwkSqzGW10hE3WNGO20irI0Yg==
</ds:SignatureValue>
<ds:KeyInfo Id="xmldsig-87....9cfa0eec26-keyinfo">
<ds:X509Data>
<ds:X509Certificate>
MIIIODCCBiCgAwIBAgIIbAsHYmJtoOIwDQYJKoZIhvcNAQELBQAwgbQxIzAhBgkqhkiG9w0BCQEW
....
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties
Target="#xmldsig-8bc....60-61327289aa2a">
<xades:SignedProperties
Id="xmldsig-8bcadf1....0-61327289aa2a-signedprops">
<xades:SignedSignatureProperties>
<xades:SigningTime>2019-11-28T18:24:12.293-05:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384" />
<ds:DigestValue>
Thanks and regards!