private AdhocQueryResponse sendStoredQuery(String url, AdhocQueryRequest req) { AdhocQueryResponse rsp; URL registryURL = null; try { DocumentRegistryPortType port = DocumentRegistryPortTypeFactory.getDocumentRegistryPortSoap12(url); log.info("####################################################"); log.info("####################################################"); log.info("XCA Initiating Gateway: Send Stored Query Request to registry:"+url); log.info("####################################################"); log.info("####################################################"); log.info("org.jboss.security.ignoreHttpsHost:"+System.getProperty("org.jboss.security.ignoreHttpsHost")); registryURL = new URL(url); try { rsp = port.documentRegistryRegistryStoredQuery(req); } catch ( Exception x) { throw new XDSException( XDSException.XDS_ERR_REG_NOT_AVAIL, "Document Registry not available: "+url, x); } } catch (Exception x) { rsp = InfosetUtil.emptyAdhocQueryResponse(); if (x instanceof XDSException) { XDSUtil.addError(rsp, (XDSException) x); } else { XDSUtil.addError(rsp, new XDSException(XDSException.XDS_ERR_REGISTRY_ERROR, "Unexpected error in XDS service !: "+x.getMessage(),x)); } } XDSAudit.logClientQuery(req, XDSConstants.WS_ADDRESSING_ANONYMOUS, null, registryURL, !XDSConstants.XDS_B_STATUS_FAILURE.equals(rsp.getStatus())); return addHomeCommunityId(rsp); }
XDSAudit.logClientQuery(req, XDSConstants.WS_ADDRESSING_ANONYMOUS, null, registryURL, !XDSConstants.XDS_B_STATUS_FAILURE.equals(rsp.getStatus())); return addHomeCommunityId(rsp);
@Override @Action(input="urn:ihe:iti:2007:RegistryStoredQuery", output="urn:ihe:iti:2007:RegistryStoredQueryResponse") public AdhocQueryResponse documentRegistryRegistryStoredQuery( AdhocQueryRequest req) { log.info("################ documentRegistryRegistryStoredQuery called!"); log.debug("ReturnType:"+req.getResponseOption().getReturnType()); AdhocQueryResponse rsp; StoredQuery qry = null; try { qry = StoredQuery.getStoredQuery(req, this); rsp = qry.query(); } catch (Exception x) { log.error("Unexpected error in XDS service (query)!: "+x.getMessage(),x); rsp = factory.createAdhocQueryResponse(); XDSException e = (x instanceof XDSException) ? (XDSException) x : new XDSException(XDSException.XDS_ERR_REGISTRY_ERROR, "Unexpected error in XDS service !: "+x.getMessage(),x); XDSUtil.addError(rsp, e); rsp.setRegistryObjectList(factory.createRegistryObjectListType()); } XDSAudit.logRegistryQuery(req, new AuditRequestInfo(LogHandler.getInboundSOAPHeader(), wsContext), XDSConstants.XDS_B_STATUS_SUCCESS.equals(rsp.getStatus())); return rsp; }
XDSAudit.logClientXCAQuery(req, XDSConstants.WS_ADDRESSING_ANONYMOUS, null, registryURL, !XDSConstants.XDS_B_STATUS_FAILURE.equals(rsp.getStatus())); return addHomeCommunityId(rsp);
XDSConstants.XDS_B_STATUS_SUCCESS.equals(rsp.getStatus())); return rsp;