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 #588304] Tue, 23 February 2010 13:32
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.executeS end(AbstractOHFSOAPSender.java:253)
at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.send(Abs tractOHFSOAPSender.java:363)
at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.send(Abs tractOHFSOAPSender.java:384)
at org.eclipse.ohf.ihe.xds.soap.AbstractXDSSoapClient.send(Abst ractXDSSoapClient.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.createSoc ket(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.configur eTransportProtocol(AbstractOHFSOAPSender.java:195)
at org.eclipse.ohf.ihe.common.ws.AbstractOHFSOAPSender.executeS end(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(repositor yUri);

// 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(putDocumen tInitiatingUser);

// 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.SEV ERE, null, ex);
} catch (Exception ex) {
Logger.getLogger(MyXDSManager.class.getName()).log(Level.SEV ERE, null, ex);
}

Does someone know what I did wrong ?

Thanks for your help ...
Previous Topic:XDS & HL7
Next Topic:Query Document Failure using the OHF
Goto Forum:
  


Current Time: Sat Apr 27 02:36:23 GMT 2024

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

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

Back to the top