Closed Antonikas58 closed 5 years ago
Hi @Antonikas58,
I'm guessing you are trying to POST to the v2 endpoints of the system. The v2/manageInvoice and v2/manageAnnulment endpoints are deliberately disabled on both the public test and on the production environment at the moment.
You can get the official deployment schedule on https://onlineszamla.nav.gov.hu/home (switch to english on the upper right corner).
TLDR: you will be able to use all the v2 endpoint tomorrow on the public test system, but the production system will remain closed until february, 2020 for v2 data disclosures.
Hi Team, Today i tried to send a request to new webservice but the issue is the same. I got the response without declared prefixes for several tags: header - timestamp; result - errorCode, message; software - softwareName,softwareMainVersion,softwareDevName,softwareDevContact,softwareDevCountryCode,softwareDevTaxNumber;
The response is looking like (please don't consider invalid request signature, that is because of our old hash mechanism sha-512, later it would be switched):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
So what i expect to see is prefix ns2 for all that tags that were mentioned.
Best regards Anton Liolia
Hi @Antonikas58,
I apologize in advance if I did not get the question correctly.
The responses of the API have the xmlns="http://schemas.nav.gov.hu/OSA/2.0/api" attribute, which means that each tag without a specific namespace attribute is considered the part of the default ns, in this case, the xmlns="http://schemas.nav.gov.hu/OSA/2.0/api". There won't be any other namespace element concerning the tags you mention. This is exactly how the v1 endpoints behaved, and the v2 endpoint will do the same.
Did I answer your question? If not, please post an example.
Hi team, I understand this, but the difference is that in your previous xsd schemas for v1 all tags were of xmlns="http://schemas.nav.gov.hu/OSA/2.0/api". But now based on your new xsd some tags now should have another namespace. Let me try to explain. For example. Element 'ManageInvoiceresponse', based on xsd v2 have type 'TransactionResponseType'->'BasicResponseType'->'BasicResultType'->'errorCode' has type (data:SimpleText50NotBlankType) data prefix in file InvoiceApi.xsd is - "http://schemas.nav.gov.hu/OSA/2.0/data". So the namespace of that element should be "http://schemas.nav.gov.hu/OSA/2.0/data" but not the "http://schemas.nav.gov.hu/OSA/2.0/api".
Hi team, Are there any updates for this topic?
Hi @Antonikas58,
I see what you are referring to, but this is not exactly the way namespaces work. I'm going to give you examples for a better understanding.
In case when a schema imports another - and because of that it has more than one namespace -, the namespace belonging to a specific element is not defined by where (under which namespace) the type of the specific element resides, but where the element is actually declared.
Let's take your example, the errorCode element. You are right in that, that it's type is imported from the invoiceData XSD (data:SimpleText50NotBlankType) but there is not an errorCode named element in there. The element is declared only in the invoiceApi schema, therefore it belongs to the default namespace.
What you say is implicitly true for complex types, because they normally contain the element definition too. The positive example for this is the QueryTaxpayerResponse example. Notice the second namespace declaration and the tags under taxpayerAddress.
`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Hi Team, I tried to validate by myself and i agree that this xml fit the xsd, the issue is resolved, thanks.
Very welcome, anytime.
Hi team, I have one question regarding response structures. When we got the response for ManageInvoice for example, the structure is looking like:
In xsd scheme we have "http://schemas.nav.gov.hu/OSA/2.0/data" namespace for tag 'message' but not the "http://schemas.nav.gov.hu/OSA/2.0/api". Also i met the similar issue in getToken response. I doesn't only connected with tag 'message', but another tags with "http://schemas.nav.gov.hu/OSA/2.0/data" namespace are involved. Could you please clarify, if it would be changed when webservice will start to work? Because in a such case we have some kind of inconsistency in comparison with xsd scheme.