private RegistryResponseType dispatchSubmitObjectsRequest(SubmitObjectsRequest submitRequest, URL xdsRegistryURI) throws MalformedURLException, JAXBException, XDSException { DocumentRegistryPortType port = DocumentRegistryPortTypeFactory.getDocumentRegistryPortSoap12(xdsRegistryURI.toString()); log.info("####################################################"); log.info("####################################################"); log.info("XDS.b: Send register document-b request to registry:"+xdsRegistryURI); log.info("####################################################"); log.info("####################################################"); log.info("org.jboss.security.ignoreHttpsHost:"+System.getProperty("org.jboss.security.ignoreHttpsHost")); RegistryResponseType rsp = null; try { rsp = port.documentRegistryRegisterDocumentSetB(submitRequest); } catch ( Exception x) { throw new XDSException( XDSException.XDS_ERR_REG_NOT_AVAIL, "Document Registry not available: "+xdsRegistryURI, x); } return rsp; }
private RegistryResponseType dispatchSubmitObjectsRequest(SubmitObjectsRequest submitRequest, URL xdsRegistryURI) throws MalformedURLException, JAXBException, XDSException { DocumentRegistryPortType port = DocumentRegistryPortTypeFactory.getDocumentRegistryPortSoap12(xdsRegistryURI.toString()); log.info("####################################################"); log.info("####################################################"); log.info("XDS.b: Send register document-b request to registry:"+xdsRegistryURI); log.info("####################################################"); log.info("####################################################"); log.info("org.jboss.security.ignoreHttpsHost:"+System.getProperty("org.jboss.security.ignoreHttpsHost")); RegistryResponseType rsp = null; try { rsp = port.documentRegistryRegisterDocumentSetB(submitRequest); } catch ( Exception x) { throw new XDSException( XDSException.XDS_ERR_REG_NOT_AVAIL, "Document Registry not available: "+xdsRegistryURI, x); } return rsp; }
public static void initializeRegistry(List<String> filenames, boolean defaultInit, DocumentRegistryPortType docRegistry) { for (String fn : filenames) { SubmitObjectsRequest req; try { req = getSubmitObjectsRequest(fn, defaultInit); } catch (FileNotFoundException | JAXBException e) { throw new RuntimeException(e); } RegistryResponseType rsp = docRegistry.documentRegistryRegisterDocumentSetB(req); if (!"urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success".equals(rsp.getStatus())){ String errorMsg = ""; int i = 1; for (RegistryError err : rsp.getRegistryErrorList().getRegistryError()) { errorMsg += (i++)+") "+err.getErrorCode()+" : "+err.getCodeContext()+"\n"; } throw new RuntimeException(errorMsg); } } }