1 package org.jbpm.bpel.xml; 2 3 import java.io.ByteArrayInputStream ; 4 5 import org.xml.sax.InputSource ; 6 7 import org.jbpm.jpdl.par.ProcessArchive; 8 9 13 public class ArchiveWsdlLocator extends ImportWsdlLocator { 14 15 private final ProcessArchive archive; 16 17 public ArchiveWsdlLocator(String bpelURI, ProcessArchive archive) { 18 super(bpelURI); 19 this.archive = archive; 20 } 21 22 protected InputSource createInputSource(String importURI) { 23 InputSource inputSource = new InputSource (importURI); 24 byte[] entry = archive.removeEntry(importURI); 25 if (entry != null) { 26 inputSource.setByteStream(new ByteArrayInputStream (entry)); 27 } 28 return inputSource; 29 } 30 31 } | Popular Tags |