/** * @throws RepositoryException * @throws DerivedArtifactsCreationException */ private WsdlDocument addWsdlDoc() throws SrampException { String artifactFileName = "jcr-sample.wsdl"; //$NON-NLS-1$ InputStream contentStream = this.getClass().getResourceAsStream("/sample-files/wsdl/" + artifactFileName); //$NON-NLS-1$ try { WsdlDocument wsdlDoc = new WsdlDocument(); wsdlDoc.setArtifactType(BaseArtifactEnum.WSDL_DOCUMENT); wsdlDoc.setName(artifactFileName); wsdlDoc.setContentEncoding("application/xml"); //$NON-NLS-1$ // Persist the artifact BaseArtifactType artifact = persistenceManager.persistArtifact(wsdlDoc, contentStream); Assert.assertNotNull(artifact); return (WsdlDocument) artifact; } finally { IOUtils.closeQuietly(contentStream); } }
testSrcArtifact.setName("ws-humantask-api.wsdl"); //$NON-NLS-1$ testSrcArtifact.setVersion("200803"); //$NON-NLS-1$ testSrcArtifact.setContentEncoding("UTF-8"); //$NON-NLS-1$ testSrcArtifact.setContentType("application/xml"); //$NON-NLS-1$ testSrcArtifact.setContentSize(92779L);
testSrcArtifact.setName("sample.wsdl"); //$NON-NLS-1$ testSrcArtifact.setVersion("2012/09"); //$NON-NLS-1$ testSrcArtifact.setContentEncoding("UTF-8"); //$NON-NLS-1$ testSrcArtifact.setContentType("application/xml"); //$NON-NLS-1$ testSrcArtifact.setContentSize(92779L);