-
Notifications
You must be signed in to change notification settings - Fork 8
Validation error of AssignedCustodian #226
Comments
Missing XML: |
Hi @ScaAnders |
@ScaAnders thanks, but the provided document does not for me produce the errors you listed in the issue. Can you please verify you get the errors when using LPR3.txt?
|
I do get the errors using the attached document. What is the url for the test system you are using? Maybe we are not testing against the same instance... |
I suspect it might be encoding related. |
LPR3-Raw.txt |
When comparing your request to my request I notice a difference in the SOAP attachment's From https://www.w3.org/Protocols/rfc1341/5_Content-Transfer-Encoding.html
|
Hmm, I also noticed that your http Headers field contains I just stumbled across this (see bold part): https://www.w3.org/TR/SOAP-attachments#HTTPBinding
|
I find it very surprising that I receive a business-rule-error instead of a deserialization or encoding error if your assumption about the headers are correct. |
The reason I suspect encoding errors is because we have previously experienced a similar thing: Deserialization happens fine, but SCHEMATRON validation errors appear due to not using UTF-8 encoding. Now, I can see you use UTF-8 encoding in the attachment so that is not the problem here. My suspicion is that since you use 8bit Content-Transfer-Encoding that maybe the encoding or decoding inserts newlines (CRLF) because it is a fixed-width encoding and the Schematron rules do not allow linebreaks in strings like 'Erhvervs- og Selskabsstyrelsen'.
I don't really have other suggestions right now as to what your problem is :( |
@ScaAnders I see nothing different in your request 12:08:39 than the raw http request you already attached here. I can post LPR's log of your full request + LPR's response, but this is a public forum so I just want to make sure that your SAML token has expired before doing so. |
Do you have any documentation on this in relation to LPR3? The reason I ask is because we have been using a standard Microsoft implementation of the MTOM protocol and since this need to be changed it will be nice to know that this is a requirement in order to make a successful WS call to LPR3. |
No, this is purely speculation on my part (that the 8bit encoding is the problem). Before you start a huge undertaking let me try and run this issue by a few other people. |
Unfortunately we are starting the official integration test to LPR3 within 3 weeks and we still have not been able to submit a single ClinicalDocument. We are a bit pressed for time :) |
If @TueCN is right about the encoding issue causing a problem with |
@ScaAnders I had a chance to run your issue by @jkiddo and he spotted another difference between yours and ours request: Your request is not MTOM/XOP optimized.
https://wiki.ihe.net/index.php/XDS.b_Implementation#More_on_MTOM_vs_MTOM.2FXOP explains what MTOM/XOP optimization is:
Your request has the Here is an example of a MTOM/XOP optimized request: Please do not base64 encode the document as it requires unnecessary computation for both client and server. |
I have proposed a new error code in #227. |
@ScaAnders please retry your request employing XOP/MTOM encoding. |
I'm looking into it ASAP. |
We can see that Microsoft has some internal problems regarding the MTOM protocol. Do you know of any other clients that have successfully used Microsoft as a client for the LPR3 service? If so is it possible that you can find a contact person (of course with their blessing) so that we can reach out in order to get some input? |
Not to our knowledge. Please close this issue if you have no further comments. |
I am trying to submit a ClinicalDocument with the following 'assignedCustodian' element:
I get the following errors from LPR3:
ErrorCode: InvalidDocumentContent
Location: a737f970-f084-5a72-84b5-5039a6a4767d^3bea95a1-e269-4de0-84f7-7e0c6c1d9243|||/:ClinicalDocument[namespace-uri()='urn:hl7-org:v3'][1]/:custodian[namespace-uri()='urn:hl7-org:v3'][1]/:assignedCustodian[namespace-uri()='urn:hl7-org:v3'][1]/:representedCustodianOrganization[namespace-uri()='urn:hl7-org:v3'][1]/*:id[namespace-uri()='urn:hl7-org:v3'][1]
CodeContext: SCHEMATRON|||(DKCustodian): The value of the @extension SHALL be a valid Danish Business Identification number (cvr-nummer)
ErrorCode: InvalidDocumentContent
Location: a737f970-f084-5a72-84b5-5039a6a4767d^3bea95a1-e269-4de0-84f7-7e0c6c1d9243|||/:ClinicalDocument[namespace-uri()='urn:hl7-org:v3'][1]/:custodian[namespace-uri()='urn:hl7-org:v3'][1]/:assignedCustodian[namespace-uri()='urn:hl7-org:v3'][1]/:representedCustodianOrganization[namespace-uri()='urn:hl7-org:v3'][1]/*:id[namespace-uri()='urn:hl7-org:v3'][1]
CodeContext: SCHEMATRON|||(DKCustodian): The value for @assigningAuthorityName SHALL be 'Erhvervs- og Selskabsstyrelsen'.
Can you explain why I get these errors? The assigningAuthorityName is set to 'Erhvervs- og Selskabsstyrelsen' and the extension is a valid CVR number (8 digits).
The text was updated successfully, but these errors were encountered: