Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » OHF » Submit document failure using the OHF
Submit document failure using the OHF [message #516276] Tue, 23 February 2010 13:32 Go to next message
Raph is currently offline RaphFriend
Messages: 10
Registered: February 2010
Junior Member
Hi !

I'm trying to submit a document on a repository using OHF, but I have the following error :
org.eclipse.ohf.ihe.common.ws.OHFSOAPException: Error Sending SOAP Message  [Caused by java.net.SocketException: Socket retries exhausted.]
        at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.executeSend(AbstractOHFSOAPSender.java:253)
        at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.send(AbstractOHFSOAPSender.java:363)
        at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.send(AbstractOHFSOAPSender.java:384)
        at org.eclipse.ohf.ihe.xds.soap.AbstractXDSSoapClient.send(AbstractXDSSoapClient.java:148)
        at org.eclipse.ohf.ihe.xds.source.B_Source.submit(B_Source.java:166)
        at testohf.MyXDSManager.putDocument(MyXDSManager.java:104)
        at testohf.Main.main(Main.java:28)
Caused by: java.net.SocketException: Socket retries exhausted. 
        at org.eclipse.ohf.ihe.atna.transport.TransporterImpl.createSocket(TransporterImpl.java:306)
        at org.eclipse.ohf.ihe.atna.transport.TransporterImpl.getSocket(TransporterImpl.java:100)
        at org.eclipse.ohf.ihe.atna.agent.AtnaAgent.getSocket(AtnaAgent.java:223)
        at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.configureTransportProtocol(AbstractOHFSOAPSender.java:195)
        at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.executeSend(AbstractOHFSOAPSender.java:228)
        ... 6 more



Here is my code :

            // création de l'objet transaction qui servira par la suite
            SubmitTransactionData txnData = new SubmitTransactionData();

            // création du document CDA à partir de l'url du fichier
            Document clinicalDocument = new Document(urlDocument, DocumentDescriptor.CDA_R2);

            // ajout du document ainsi créé à la transaction
            String docEntryUUID = txnData.addDocument(clinicalDocument);

            // récupération d'une partie des metadonnées du document pour les compléter
            DocumentEntryType docEntry = txnData.getDocumentEntry(docEntryUUID);

            // ajout de métadonnées concernant l'identifiant du patient
            CX patientId = Hl7v2Factory.eINSTANCE.createCX();
            patientId.setIdNumber(patientIdNumber);
            patientId.setAssigningAuthorityUniversalId("1.3.6.1.4.1.21367.2005.1.1");
            patientId.setAssigningAuthorityUniversalIdType("ISO");
            docEntry.setPatientId(patientId);

            // récupération d'une autre partie des métadonnées du document pour les compléter
            SubmissionSetType subset = txnData.getSubmissionSet();
            CodedMetadataType contentTypeCode = MetadataFactory.eINSTANCE.createCodedMetadataType();

            // ajout de métadonnées
            contentTypeCode.setCode("Consult");
            // contentTypeCode.setDisplayName("Consult");
            subset.setContentTypeCode(contentTypeCode);

            // définition de l'url du repository dans lequel on va envoyer le document
            URI repositoryUri = URI.create(repositoryUrl);
            B_Source source = new B_Source(repositoryUri);
            AtnaAgentFactory.getAtnaAgent().setAuditRepository(repositoryUri);

            // définition du proxy
            System.setProperty("http.proxySet", "true");
            System.setProperty("http.proxyHost", proxyHost);
            System.setProperty("http.proxyPort", proxyPort);

            // identification de l'auteur de la requête
            AtnaAgentFactory.getAtnaAgent().setInitiatingUser(putDocumentInitiatingUser);

            // exécution de la requête pour envoyer le document vers le repository
            XDSResponseType xdsresponsetype = source.submit(txnData);
            System.out.println("xdsresponsetype : " + xdsresponsetype);

        } catch (MetadataExtractionException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SubmitTransactionCompositionException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (OHFSOAPException ex) {
            Logger.getLogger(MyXDSManager.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(MyXDSManager.class.getName()).log(Level.SEVERE, null, ex);
        }


Does someone know what I did wrong ?

Thanks for your help ...
Re: Submit document failure using the OHF [message #517982 is a reply to message #516276] Tue, 02 March 2010 16:20 Go to previous messageGo to next message
Raph is currently offline RaphFriend
Messages: 10
Registered: February 2010
Junior Member
For information, OHF has been replaced by OHT ... I asked the same question on the OHT forum :
https://iheprofiles.projects.openhealthtools.org/ds/viewMess age.do?dsForumId=212&dsMessageId=14122
Re: Submit document failure using the OHF [message #588339 is a reply to message #516276] Tue, 02 March 2010 16:20 Go to previous message
Raph is currently offline RaphFriend
Messages: 10
Registered: February 2010
Junior Member
For information, OHF has been replaced by OHT ... I asked the same question on the OHT forum :
https://iheprofiles.projects.openhealthtools.org/ds/viewMess age.do?dsForumId=212&dsMessageId=14122
Previous Topic:Sample creating a CDA r2 message
Next Topic:Eclipse UOMo
Goto Forum:
  


Current Time: Thu Apr 25 02:20:21 GMT 2024

Powered by FUDForum. Page generated in 0.03122 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top