{"action":"created","issue":{"url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/159","repository_url":"https://api.github.com/repos/scandihealth/lpr3-docs","labels_url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/159/comments","events_url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/159/events","html_url":"https://github.com/scandihealth/lpr3-docs/issues/159","id":349436361,"node_id":"MDU6SXNzdWUzNDk0MzYzNjE=","number":159,"title":"\"could not parse ClinicalDocument\" when sending unprettified CDA document","user":{"login":"JacobBangSSE","id":36299108,"node_id":"MDQ6VXNlcjM2Mjk5MTA4","avatar_url":"https://avatars3.githubusercontent.com/u/36299108?v=4","gravatar_id":"","url":"https://api.github.com/users/JacobBangSSE","html_url":"https://github.com/JacobBangSSE","followers_url":"https://api.github.com/users/JacobBangSSE/followers","following_url":"https://api.github.com/users/JacobBangSSE/following{/other_user}","gists_url":"https://api.github.com/users/JacobBangSSE/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobBangSSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobBangSSE/subscriptions","organizations_url":"https://api.github.com/users/JacobBangSSE/orgs","repos_url":"https://api.github.com/users/JacobBangSSE/repos","events_url":"https://api.github.com/users/JacobBangSSE/events{/privacy}","received_events_url":"https://api.github.com/users/JacobBangSSE/received_events","type":"User","site_admin":false},"labels":[{"id":634298718,"node_id":"MDU6TGFiZWw2MzQyOTg3MTg=","url":"https://api.github.com/repos/scandihealth/lpr3-docs/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"JacobBangSSE","id":36299108,"node_id":"MDQ6VXNlcjM2Mjk5MTA4","avatar_url":"https://avatars3.githubusercontent.com/u/36299108?v=4","gravatar_id":"","url":"https://api.github.com/users/JacobBangSSE","html_url":"https://github.com/JacobBangSSE","followers_url":"https://api.github.com/users/JacobBangSSE/followers","following_url":"https://api.github.com/users/JacobBangSSE/following{/other_user}","gists_url":"https://api.github.com/users/JacobBangSSE/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobBangSSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobBangSSE/subscriptions","organizations_url":"https://api.github.com/users/JacobBangSSE/orgs","repos_url":"https://api.github.com/users/JacobBangSSE/repos","events_url":"https://api.github.com/users/JacobBangSSE/events{/privacy}","received_events_url":"https://api.github.com/users/JacobBangSSE/received_events","type":"User","site_admin":false},"assignees":[{"login":"JacobBangSSE","id":36299108,"node_id":"MDQ6VXNlcjM2Mjk5MTA4","avatar_url":"https://avatars3.githubusercontent.com/u/36299108?v=4","gravatar_id":"","url":"https://api.github.com/users/JacobBangSSE","html_url":"https://github.com/JacobBangSSE","followers_url":"https://api.github.com/users/JacobBangSSE/followers","following_url":"https://api.github.com/users/JacobBangSSE/following{/other_user}","gists_url":"https://api.github.com/users/JacobBangSSE/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobBangSSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobBangSSE/subscriptions","organizations_url":"https://api.github.com/users/JacobBangSSE/orgs","repos_url":"https://api.github.com/users/JacobBangSSE/repos","events_url":"https://api.github.com/users/JacobBangSSE/events{/privacy}","received_events_url":"https://api.github.com/users/JacobBangSSE/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2018-08-10T09:13:00Z","updated_at":"2018-08-13T08:46:15Z","closed_at":null,"author_association":"NONE","body":"**This issue is blocking**\r\n\r\nWhen we are sending a CDA XML document in a single line we gets the following answer back from the LPR3 test service:\r\n```xml\r\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\">\r\n   <env:Header xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\"/>\r\n   <soap:Body>\r\n      <soap:Fault>\r\n         <soap:Code>\r\n            <soap:Value>soap:Receiver</soap:Value>\r\n         </soap:Code>\r\n         <soap:Reason>\r\n            <soap:Text xml:lang=\"en\">Could not insert log entry regarding: \r\ncould not parse ClinicalDocument&lt;br>java.lang.RuntimeException: could not parse ClinicalDocument\r\n\tat com.dxc.lpr.cda.CDADocument.getClinicalDocument(CDADocument.java:43)\r\n\tat com.dxc.lpr.cda.helpers.DocumentHelper.getAssignedAuthor(DocumentHelper.java:56)\r\n\tat com.dxc.lpr.cda.helpers.DocumentHelper.validateAuthorCustodianRelation(DocumentHelper.java:23)\r\n\tat com.dxc.lpr.cda.helpers.DocumentHelper$Proxy$_$$_WeldClientProxy.validateAuthorCustodianRelation(Unknown Source)\r\n\tat java.util.ArrayList.forEach(ArrayList.java:1255)\r\n\tat com.dxc.lpr.cda.ws.CDAWebService.validateAuthorCustodianRelation(CDAWebService.java:132)\r\n\tat com.dxc.lpr.cda.ws.CDAWebService.handleRequest(CDAWebService.java:80)\r\n\tat com.dxc.lpr.cda.ws.endpoints.PatientHealthcareValidateReportingService.documentRepositoryProvideAndRegisterDocumentSetB(PatientHealthcareValidateReportingService.java:64)\r\n\tat sun.reflect.GeneratedMethodAccessor802.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:87)\r\n\tat org.jboss.weld.interceptor.proxy.WeldInvocationContext.interceptorChainCompleted(WeldInvocationContext.java:98)\r\n\tat org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:117)\r\n\tat com.dxc.lpr.cda.ws.interceptors.CDAWebServiceInterceptor.handleExceptions(CDAWebServiceInterceptor.java:60)\r\n\tat sun.reflect.GeneratedMethodAccessor596.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)\r\n\tat org.jboss.weld.interceptor.proxy.WeldInvocationContext.invokeNext(WeldInvocationContext.java:83)\r\n\tat org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:115)\r\n\tat org.jboss.weld.bean.InterceptorImpl.intercept(InterceptorImpl.java:108)\r\n\tat org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:77)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:68)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:80)\r\n\tat org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)\r\n\tat org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)\r\n\tat org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)\r\n\tat org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)\r\n\tat org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)\r\n\tat org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(Concurren</soap:Text>\r\n         </soap:Reason>\r\n      </soap:Fault>\r\n   </soap:Body>\r\n</soap:Envelope>\r\n```\r\n\r\nI have attached the CDA document here:\r\n[cda-fail.txt](https://github.com/scandihealth/lpr3-docs/files/2277299/cda-fail.txt)\r\n\r\nThe strange part is if I open the document in Notepad++ and use the function \"Pretty print (XML only - with line breaks)\" I gets the following document which the LPR3 test service does accept:\r\n[cda-ok.txt](https://github.com/scandihealth/lpr3-docs/files/2277307/cda-ok.txt)\r\n\r\n```xml\r\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\">\r\n   <soap:Header>\r\n      <ns10:Header xmlns:ns10=\"http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd\" xmlns:ns11=\"http://www.nsi.dk/hsuid/2016/08/hsuid-1.1.xsd\" xmlns:ns12=\"urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0\" xmlns:ns13=\"urn:lpr\" xmlns:ns2=\"urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0\" xmlns:ns3=\"urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0\" xmlns:ns4=\"urn:ihe:iti:xds-b:2007\" xmlns:ns5=\"urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0\" xmlns:ns6=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:ns7=\"urn:oasis:names:tc:SAML:2.0:assertion\" xmlns:ns8=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:ns9=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\r\n         <ns10:SecurityLevel>3</ns10:SecurityLevel>\r\n         <ns10:Linking>\r\n            <ns10:MessageID>22f2e7287f00000100d8c41832612084</ns10:MessageID>\r\n         </ns10:Linking>\r\n         <ns10:FlowStatus>flow_finalized_succesfully</ns10:FlowStatus>\r\n      </ns10:Header>\r\n   </soap:Header>\r\n   <soap:Body>\r\n      <ns2:RegistryResponse status=\"urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure\" xmlns:ns10=\"http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd\" xmlns:ns11=\"http://www.nsi.dk/hsuid/2016/08/hsuid-1.1.xsd\" xmlns:ns12=\"urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0\" xmlns:ns13=\"urn:lpr\" xmlns:ns2=\"urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0\" xmlns:ns3=\"urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0\" xmlns:ns4=\"urn:ihe:iti:xds-b:2007\" xmlns:ns5=\"urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0\" xmlns:ns6=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:ns7=\"urn:oasis:names:tc:SAML:2.0:assertion\" xmlns:ns8=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:ns9=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\r\n         <ns2:RegistryErrorList highestSeverity=\"urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error\">\r\n            <ns2:RegistryError codeContext=\"BUSINESS_RULE|||En SOR-enhed, der angives som ansvarlig enhed for et forløbselement, skal være gyldig på forløbselementets starttidspunkt\" errorCode=\"InvalidDocumentContent\" location=\"FD3EAE71-BE61-41B1-ABB7-31C7358BBF05^68567024-6e25-4e16-9af4-ae04974ed99f|||//*[child::*[local-name()='id' and @root='FD3EAE71-BE61-41B1-ABB7-31C7358BBF05' and @extension='5E59BC3E-38BE-5234-B85E-44595B30A8B3']]|||sds:lpr:3.0.4|||02.42\" severity=\"urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error\"/>\r\n         </ns2:RegistryErrorList>\r\n      </ns2:RegistryResponse>\r\n   </soap:Body>\r\n</soap:Envelope>\r\n```\r\nThe content in both documents is the same and the documentation does not specify that the attached CDA document should be formatted in a specific way. At last, it has worked before so I think this must be a newly introduced bug.\r\n"},"comment":{"url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/comments/412449461","html_url":"https://github.com/scandihealth/lpr3-docs/issues/159#issuecomment-412449461","issue_url":"https://api.github.com/repos/scandihealth/lpr3-docs/issues/159","id":412449461,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjQ0OTQ2MQ==","user":{"login":"JacobBangSSE","id":36299108,"node_id":"MDQ6VXNlcjM2Mjk5MTA4","avatar_url":"https://avatars3.githubusercontent.com/u/36299108?v=4","gravatar_id":"","url":"https://api.github.com/users/JacobBangSSE","html_url":"https://github.com/JacobBangSSE","followers_url":"https://api.github.com/users/JacobBangSSE/followers","following_url":"https://api.github.com/users/JacobBangSSE/following{/other_user}","gists_url":"https://api.github.com/users/JacobBangSSE/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobBangSSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobBangSSE/subscriptions","organizations_url":"https://api.github.com/users/JacobBangSSE/orgs","repos_url":"https://api.github.com/users/JacobBangSSE/repos","events_url":"https://api.github.com/users/JacobBangSSE/events{/privacy}","received_events_url":"https://api.github.com/users/JacobBangSSE/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T08:46:15Z","updated_at":"2018-08-13T08:46:15Z","author_association":"NONE","body":"Ok, I can live with the pretty print workaround if it is only needed for SoapUI. :)"}}
{"actor":{"display_login":"JacobBangSSE"}}