Ispravan xml zahtjev

Dec 17, 2012 at 10:15 PM

Pozdrav svima...

Da li netko moze staviti negdje ispravni xml zahtjev te potpisani xml zahtjev ? kako bi znao kako treba izgledati xml i kako bi mogao testirati?

Hvala svima unaprijed...

Dorijan

Coordinator
Dec 17, 2012 at 10:27 PM

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
  <soapenv:Body>
    <tns:PoslovniProstorZahtjev xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="signXmlId" xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73">
      <tns:Zaglavlje>
        <tns:IdPoruke>cd9e4ad5-5155-4745-90f8-e7cace21f7b8</tns:IdPoruke>
        <tns:DatumVrijeme>14.12.2012T23:17:21</tns:DatumVrijeme>
      </tns:Zaglavlje>
      <tns:PoslovniProstor xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73">
        <tns:Oib>12345678910</tns:Oib>
        <tns:OznPoslProstora>POS7</tns:OznPoslProstora>
        <tns:AdresniPodatak>
          <tns:Adresa>
            <tns:Ulica>Kristijana Andabaka</tns:Ulica>
            <tns:KucniBroj>11</tns:KucniBroj>
            <tns:KucniBrojDodatak>B</tns:KucniBrojDodatak>
            <tns:BrojPoste>10040</tns:BrojPoste>
            <tns:Naselje>Zagreb</tns:Naselje>
            <tns:Opcina>Dubrava</tns:Opcina>
          </tns:Adresa>
        </tns:AdresniPodatak>
        <tns:RadnoVrijeme>10-22 svakim danom</tns:RadnoVrijeme>
        <tns:DatumPocetkaPrimjene>01.12.2012</tns:DatumPocetkaPrimjene>
        </tns:PoslovniProstor>
      <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
          <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
          <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
          <Reference URI="#signXmlId">
            <Transforms>
              <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
              <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <DigestValue>nOxxxxxxxxx8vMNxnH4pLQ=</DigestValue>
          </Reference>
        </SignedInfo>
        <SignatureValue>xxxxxxxyyyyyyyPOJTwDjWZMJUeljVQrSx5e0isyyyyyyyxxxxxxxxX0hG6OOjW0wnTy6rHI7UG32A4VLrE/tFrrEyKYUfr0OAF+3kmd15YlqmDUCYKlLgLt2XsHHN7Xi4zBJHnphsxmcOvRXqdjgrLPUXd8qRdKlaH/ias5rljxrnBEXpX5XqX1a7ZXZGKtjLwCufpwHkZAe6S4hiEUqdWJcHoX9x0KdV6QUUxsEtYZuGjr9qQVDezEUwZWYIPwPQ/ui2Rq65pVGqUBZ185FCOwj/jCAVeQ==</SignatureValue>
        <KeyInfo>
          <X509Data>
            <X509IssuerSerial>
              <X509IssuerName>OU=DEMO, O=FINA, C=HR</X509IssuerName>
              <X509SerialNumber>1234567890</X509SerialNumber>
            </X509IssuerSerial>
            <X509Certificate>xxxxxxAsGA1UEChMERklOQTENMAsGA1UECxMEREVxxxxxxxxxDEhczQ0z/zsBUUV41LlAzySkFLdby5qYvFEB5yWoG+YLaJcBlQRIKsl/ViQIkr1RG2V6CosHhflSLHtzfpWIMoeoUZ7Zw97YlMrUwu6SwhQ3gKGemQunyyyyybWK62EDu6NYdu+AUg360MKmJoEFePCOeHfiZ6oY9HXqyyyy+vI32VpOl+U06wGBjKArTx9eSIdTyJA4EdVxUWdJHtEaq3FrH7tuWtYFy1hHYrJOcpSiOQr87sRtV/exxxxxxxBnb3JhbkBzYWd1YXJvLmhyMIHOBgNVHR8EgcYwgcMwQqBAoD6kPDA6MQswyyyyyyuaHIvY3JsL2RlbW9jYS5jcmwwKwYDVR0QBCQwIoAPMjAxMjEwMjQxMzM2NTFagQ8yMDE0MTAyNDE0MDY1MVowHwYDVR0jBBgwFoAUemAjjkidMmuk5S3duFm0lPxCYp4wHQYDVR0OBBYEFKm72/2q7CBZ0jKosIAczblMIrAiMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBACMdn6Vx005P9yrfEqsWlnfqkr3/il3eAzHuNaOXszCEyuyWCZGURj7LTRzFN6IrGZVoplvevSU62nxlg7wTD8JNvxiIDDSnkt70n8NsCfm6oEoOe+mYQxqDLAWbGefuo/MRUG1LOHEQfFx/BtVRrtbAzmTr2U6QS0Z9Skn5UZ9w/xVpxfamHGXNut7HIOX9aE3/22rOyXRBzbMqX8PQ38R55/OS/QuwUwYADZd3UBAxtiHcqpumOzJgVxEec9WM8syBbW7+gGg4AqD7U8r3QrDaq+kvqJhs7ix0lKx9/AZtsvDdgaVl71z5wKSkadBDRygf9nwu6+tiOIIep5IlkQU=</X509Certificate>
          </X509Data>
        </KeyInfo>
      </Signature>
    </tns:PoslovniProstorZahtjev>
  </soapenv:Body>
</soapenv:Envelope>

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
  <soapenv:Body>
    <tns:RacunZahtjev xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="signXmlId" xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73">
      <tns:Zaglavlje>
        <tns:IdPoruke>868241ce-ea3d-4459-842b-721af438e4e8</tns:IdPoruke>
        <tns:DatumVrijeme>17.12.2012T12:42:16</tns:DatumVrijeme>
      </tns:Zaglavlje>
      <tns:Racun>
        <tns:Oib>12345678910</tns:Oib>
        <tns:USustPdv>true</tns:USustPdv>
        <tns:DatVrijeme>17.12.2012T14:02:15</tns:DatVrijeme>
        <tns:OznSlijed>N</tns:OznSlijed>
        <tns:BrRac>
          <tns:BrOznRac>1</tns:BrOznRac>
          <tns:OznPosPr>POS2</tns:OznPosPr>
          <tns:OznNapUr>1</tns:OznNapUr>
        </tns:BrRac>
        <tns:Pdv>
          <tns:Porez>
            <tns:Stopa>25.00</tns:Stopa>
            <tns:Osnovica>100.00</tns:Osnovica>
            <tns:Iznos>2.50</tns:Iznos>
          </tns:Porez>
          <tns:Porez>
            <tns:Stopa>10.00</tns:Stopa>
            <tns:Osnovica>10.00</tns:Osnovica>
            <tns:Iznos>1.00</tns:Iznos>
          </tns:Porez>
          <tns:Porez>
            <tns:Stopa>0.00</tns:Stopa>
            <tns:Osnovica>10.00</tns:Osnovica>
            <tns:Iznos>0.00</tns:Iznos>
          </tns:Porez>
        </tns:Pdv>
        <tns:Pnp>
          <tns:Porez>
            <tns:Stopa>3.00</tns:Stopa>
            <tns:Osnovica>100.00</tns:Osnovica>
            <tns:Iznos>0.30</tns:Iznos>
          </tns:Porez>
        </tns:Pnp>
        <tns:Naknade>
          <tns:Naknada>
            <tns:NazivN>Povratna naknada</tns:NazivN>
            <tns:IznosN>5.00</tns:IznosN>
          </tns:Naknada>
        </tns:Naknade>
        <tns:IznosUkupno>1250.99</tns:IznosUkupno>
        <tns:NacinPlac>K</tns:NacinPlac>
        <tns:OibOper>12345678901</tns:OibOper>
        <tns:ZastKod>60d6f706a09a57336f797ae8a1635232</tns:ZastKod>
        <tns:NakDost>false</tns:NakDost>
      </tns:Racun>
      <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
          <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
          <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
          <Reference URI="#signXmlId">
            <Transforms>
              <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
              <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <DigestValue>xxxxxxxxxx6mIKPxc=</DigestValue>
          </Reference>
        </SignedInfo>
        <SignatureValue>LbDxxxxxE4fGvzPnmHga9QpekQnfVIdbyEQuW9mefli6+rRXiZdlK4e/8j8tWXxvBprJ6XmL5BbMesLUF6rq6r0M4jkHMvc09Gx/5V1XAFdbdZPwm3oayd/cE2RTkarjXkxxxxxxxxdRNFIRHHRUbXDY9b5DOWK04FugayxxxxxT2zk1c36+aSZdpbFT55HGtLSI/OIrQI6uND19rQxS1cwaVn0pj4qz3y+mMToK5DS0hV19YHXJKD6Kcv7Fst6x9+s9X0AQ==</SignatureValue>
        <KeyInfo>
          <X509Data>
            <X509IssuerSerial>
              <X509IssuerName>OU=DEMO, O=FINA, C=HR</X509IssuerName>
              <X509SerialNumber>1234567890</X509SerialNumber>
            </X509IssuerSerial>
            <X509Certificate>xxxxxMjQxMzM2NTFaFw0xNDEwMjQxNDA2NTFaMF0xCzAJBgNVBAYTAkhSMSowKAYDVQQKEyFTQUdVQVJPIElORk8gRC5PLk8uIEhSNTY5NDEzMDU4MjMxDzANBgNVBAcTBlpBR1JFQjERMA8GA1UEAxMIRklTS0FxxxxxxwwKwYDVR0QBCQwIoAPMjAxMjEwMjQxMzM2NTFagQ8yMDE0MTAyNDE0MDY1MVowHwYDVR0jBBgwFoAUemAjjkidMmuk5S3duFm0lPxCYp4wHQYDVR0OBBYEFKm72/2q7CBZ0jKosIAczblMIrAiMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBACMdnxxxxxxxaq+kvqJhs7ix0lKx9/AZtsvDdgaVl71z5wKSkadBDRygf9nwu6+tiOIIep5IlkQU=</X509Certificate>
          </X509Data>
        </KeyInfo>
      </Signature>
    </tns:RacunZahtjev>
  </soapenv:Body>
</soapenv:Envelope>

Dec 17, 2012 at 10:27 PM
Edited Dec 17, 2012 at 10:32 PM

Na dnu linka s uputama za korištenje programa su dva primjera (Račun i Poslovni prostor)

 http://fiskalizacija.codeplex.com/wikipage?title=Potpisivanje%20i%20slanje%20XML%20dokumenata%20pozivanjem%20vanjskog%20programa%20%28EXE%29

Dec 19, 2012 at 12:34 PM
Edited Dec 19, 2012 at 12:36 PM

dkustec hvala na xmlovima...ovo su pretpostavljam potpisani xmlovi...imas slucajno nepotpisani? ili maknem samo ovaj dio <SignatureValue> i <X509Certificate>?

kuky tu xml izgleda ovako:

<?xml version="1.0" encoding="utf-8"?><tns:RacunZahtjev xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="signXmlId" xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73"><tns:Zaglavlje><tns:IdPoruke>60c06a12-ff4c-4210-bf4f-d730866b1e68</tns:IdPoruke><tns:DatumVrijeme>22.10.2012T18:04:26</tns:DatumVrijeme></tns:Zaglavlje><tns:Racun><tns:Oib>44718633471</tns:Oib><tns:USustPdv>true</tns:USustPdv><tns:DatVrijeme>22.10.2012T18:04:26</tns:DatVrijeme><tns:OznSlijed>P</tns:OznSlijed><tns:BrRac><tns:BrOznRac>1</tns:BrOznRac><tns:OznPosPr>123</tns:OznPosPr><tns:OznNapUr>1</tns:OznNapUr></tns:BrRac><tns:Pdv><tns:Porez><tns:Stopa>25.00</tns:Stopa><tns:Osnovica>10.00</tns:Osnovica><tns:Iznos>2.50</tns:Iznos></tns:Porez></tns:Pdv><tns:IznosUkupno>12.50</tns:IznosUkupno><tns:NacinPlac>G</tns:NacinPlac><tns:OibOper>12345678900</tns:OibOper><tns:ZastKod>e4d909c290d0fb1ca068ffaddf22cbd0</tns:ZastKod><tns:NakDost>false</tns:NakDost></tns:Racun></tns:RacunZahtjev>



pretpostavljam da je to sa novom shemom?
hvala,Dorijan
Coordinator
Dec 19, 2012 at 12:42 PM

da, makni ovo samo:

<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
          <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
          <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
          <Reference URI="#signXmlId">
            <Transforms>
              <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
              <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <DigestValue>xxxxxxxxxx6mIKPxc=</DigestValue>
          </Reference>
        </SignedInfo>
        <SignatureValue>LbDxxxxxE4fGvzPnmHga9QpekQnfVIdbyEQuW9mefli6+rRXiZdlK4e/8j8tWXxvBprJ6XmL5BbMesLUF6rq6r0M4jkHMvc09Gx/5V1XAFdbdZPwm3oayd/cE2RTkarjXkxxxxxxxxdRNFIRHHRUbXDY9b5DOWK04FugayxxxxxT2zk1c36+aSZdpbFT55HGtLSI/OIrQI6uND19rQxS1cwaVn0pj4qz3y+mMToK5DS0hV19YHXJKD6Kcv7Fst6x9+s9X0AQ==</SignatureValue>
        <KeyInfo>
          <X509Data>
            <X509IssuerSerial>
              <X509IssuerName>OU=DEMO, O=FINA, C=HR</X509IssuerName>
              <X509SerialNumber>1234567890</X509SerialNumber>
            </X509IssuerSerial>
            <X509Certificate>xxxxxMjQxMzM2NTFaFw0xNDEwMjQxNDA2NTFaMF0xCzAJBgNVBAYTAkhSMSowKAYDVQQKEyFTQUdVQVJPIElORk8gRC5PLk8uIEhSNTY5NDEzMDU4MjMxDzANBgNVBAcTBlpBR1JFQjERMA8GA1UEAxMIRklTS0FxxxxxxwwKwYDVR0QBCQwIoAPMjAxMjEwMjQxMzM2NTFagQ8yMDE0MTAyNDE0MDY1MVowHwYDVR0jBBgwFoAUemAjjkidMmuk5S3duFm0lPxCYp4wHQYDVR0OBBYEFKm72/2q7CBZ0jKosIAczblMIrAiMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBACMdnxxxxxxxaq+kvqJhs7ix0lKx9/AZtsvDdgaVl71z5wKSkadBDRygf9nwu6+tiOIIep5IlkQU=</X509Certificate>
          </X509Data>
        </KeyInfo>
      </Signature>