[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.ohf] Re: Query Document Failure using the OHF

Hi Jason,

You've uncovered an issue that I'm not 100% sure how to fix and/or workaround. IF you could provide the use scenario, that'll help us determine a fix.

OHF's XDS component uses Apache Axis2 to handle the XDS Web service transaction. Apache Axis2 uses the Apache Commons HTTPClient component to handle the HTTP Web service. HTTPClient handles proxies without a problem. Ordinarily the fix would be to uncover the static / threadlocal API into HTTPClient that exposes how to set the HTTP proxy's hostname, port, username, and password. This is well-documented.

The complicating factor is that, in OHF, we manage the socket connection top to bottom. That is, we give Axis2 / HTTP Client the java.io.Socket instance that it uses for the Web service connection. The principal reason is because of the complicated requirements for mutual TLS under IHE specifications. Now, we also do the same thing for non-TLS (plain HTTP) connections, but mainly for consistency. This breaks the ability to use HTTP proxies in OHF. We could easily revert this for plain HTTP, but it is impossible for us to allow HTTPClient to create the socket for TLS connections.

My question for you is... is this simply a development use case (e.g. HTTP connections in your organization are proxied?) or something more larger-scale? Also, are you expecting to use "IHE Node Authentication" (e.g. mutual TLS) through this proxy as well? If so, could you maybe help me better understand how that would work. These questions should help us to find a fix.

Thanks for the report - this is definitely an important gap that needs to be addressed.

-Matt


Jason wrote:
Hi there,

I am currently working on a solution to retrieve the document metadata from the registry using the document UniqueId. I am behind a proxy. I guess am not able to send a query to the registry using the following code because of the exception. Does anybody know a solution how to fix this problem because i set the proxy correctly and the transaction iti-14 works also for this registry except the query. I did not find anything about such a problem. It seems that invokeStoredQuery throws this exception. Indeed, i guess its the sending part inside the invokeStoredQuery method.


Initializing:
--------------
..
String registryURI = "http://129.6.24.109:9080/axis2/services/xdsregistryb";;
java.net.URI regURI = new java.net.URI(registryURI);
bConsumer = new B_Consumer(regURI); Config.start(true);
AtnaAgentFactory.getAtnaAgent().setDoAudit(false);
..


Sending:
--------
..
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", proxyHost);
System.setProperty("http.proxyPort", proxyPort); ..
GetDocumentsQuery q = new GetDocumentsQuery(new String[]{"the document uniqueid gets here"}, false);
XDSQueryResponseType response = null;
try {
response = this.bConsumer.invokeStoredQuery(q, true);
} catch (Exception e) {
logger.error(e.toString());
}
..



Failure caused after execution:
-------------------------------
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.soap.AbstractXDSSoapClient.send(AbstractXDSSoapClient.java:104)

at org.eclipse.ohf.ihe.xds.consumer.Consumer.sendQuery(Consumer.java:533)
at org.eclipse.ohf.ihe.xds.consumer.Consumer.invokeStoredQuery(Consumer.java:314)


at com.siemens.pse.ihe.source.ITI_18.testGetDocumentsByUniqueId(ITI_18.java:88)

at com.siemens.pse.ihe.source.ITI_18.main(ITI_18.java:167)
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)

    ... 8 more