File | Line |
---|
it/imolinfo/jbi4ejb/processor/Jbi4EjbDenormalizer.java | 76 |
it/imolinfo/jbi4ejb/processor/Jbi4EjbNormalizer.java | 78 |
String msg=MESSAGES.getString("EJB000602_Jbi4Ejb_processor", new Object[]{ex.getMessage()});
LOG.error(msg,ex);
throw new Jbi4EjbException(msg,ex);
}
try {
TransformerFactory factory = TransformerFactory.newInstance();
mTrans = factory.newTransformer();
} catch (TransformerFactoryConfigurationError ex) {
String msg=MESSAGES.getString("EJB000602_Jbi4Ejb_processor", new Object[]{ex.getMessage()});
LOG.error(msg,ex);
throw new Jbi4EjbException(msg,ex);
} catch (TransformerConfigurationException e) {
String msg=MESSAGES.getString("EJB000602_Jbi4Ejb_processor", new Object[]{e.getMessage()});
LOG.error(msg,e);
throw new Jbi4EjbException(msg,e);
}
}
/**
* Normalize the message.
*
* @param xmlSource
* the xmlSource to normalize
* @param normalizedMsg
* the normlized message
* @param endpoint
* the invoked endpoint
* @param operation
* the invoked operation
* @param toWrap
* if the message must be wrapped
* @throws Jbi4EjbException
* if some problem occurs in normalization
*/
public void normalize(Source xmlSource, |
File | Line |
---|
it/imolinfo/jbi4ejb/webservice/generator/JarUtil.java | 54 |
it/imolinfo/jbi4ejb/webservice/generator/JarUtil.java | 106 |
public static void unjar(File jarFile, String resource, File targetDir)
throws IOException {
// clear target directory:
if (targetDir.exists()) {
targetDir.delete();
}
// create new target directory:
targetDir.mkdirs();
// read jar-file:
String targetPath = targetDir.getAbsolutePath() + File.separatorChar;
byte[] buffer = new byte[ BUFFER_LENGTH * BUFFER_LENGTH ];
JarFile input = new JarFile( jarFile, false, ZipFile.OPEN_READ );
Enumeration<JarEntry> enumeration = input.entries();
for (; enumeration.hasMoreElements();) {
JarEntry entry = (JarEntry) enumeration.nextElement();
if (!entry.isDirectory()) {
// do not copy anything from the package cache:
if (entry.getName().equals(resource)) { |
File | Line |
---|
it/imolinfo/jbi4ejb/webservice/generator/JarUtil.java | 72 |
it/imolinfo/jbi4ejb/webservice/generator/JarUtil.java | 123 |
if (entry.getName().equals(resource)) {
String path = targetPath + entry.getName();
File file = new File( path );
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
FileOutputStream out = new FileOutputStream( file);
InputStream in = input.getInputStream(entry);
int read;
while ( (read = in.read( buffer )) != -1) {
out.write( buffer, 0, read );
}
in.close();
out.close();
}
}
}
} |
File | Line |
---|
org/slf4j/impl/JDK14LoggerAdapter.java | 120 |
org/slf4j/impl/Log4jLoggerAdapter.java | 111 |
}
/**
* Formats the specified message, applying I18N if it is available for this
* logger.
*
* @param format the format string.
* @param args the optional arguments.
* @return the formatted message, eventually internationalized.
*/
private String formatMessage(final String format, final Object ... args) {
String msg;
if (isI18N()) {
if (args.length == 0) {
msg = messages.getString(format);
} else {
msg = messages.getString(format, args);
}
} else {
if (args.length == 0) {
msg = format;
} else {
try {
msg = MessageFormat.format(format, args);
} catch (IllegalArgumentException e) {
msg = format;
}
}
}
return msg;
}
/**
* Gets the name of this <code>Logger</code>.
*
* @return the name of this <code>Logger</code> instance.
*/
public String getName() { |
File | Line |
---|
it/imolinfo/jbi4ejb/jbi/component/Jbi4EjbSUManager.java | 579 |
it/imolinfo/jbi4ejb/webservice/generator/WSDLGenerator.java | 464 |
private static Definition readWsdl(final File f) throws WSDLException {
final WSDLFactory wsdlFactory = WSDLFactory.newInstance();
ExtensionRegistry registry = wsdlFactory
.newPopulatedExtensionRegistry();
final WSDLReader reader = ((WSDLFactoryImpl) wsdlFactory)
.newWSDLReader();
reader.setFeature(Constants.FEATURE_VERBOSE, false);
reader.setFeature(Constants.FEATURE_IMPORT_DOCUMENTS, true);
Jbi4EjbExtension.register(registry);
LOG.debug("Extension QName: " + Jbi4EjbExtension.NS_URI_JBI4EJB);
reader.setExtensionRegistry(registry);
final Definition def = reader.readWSDL(f.getAbsolutePath());
return def;
} |
File | Line |
---|
it/imolinfo/jbi4ejb/configuration/InterfaceExtractorUtil.java | 83 |
it/imolinfo/jbi4ejb/configuration/InterfaceExtractorUtil.java | 391 |
public static String extractEarClassesInTempDirectory(String earPath) throws EJBWSDLGenerationException {
// Creates the temp dir
File tempDir;
try {
tempDir = File.createTempFile(EAR_TEMP_DIR, null);
} catch (IOException e) {
String msg=MESSAGES.getString("EJB000001_Could_not_create_directory", new Object[]{EAR_TEMP_DIR});
LOG.error(msg,e);
throw new EJBWSDLGenerationException(msg,e);
}
tempDir.delete();
tempDir.mkdir();
try {
JarUtil.unjar(new File(earPath), tempDir);
} catch (IOException e) {
String msg=MESSAGES.getString("EJB000001_Could_not_create_directory", new Object[]{EAR_TEMP_DIR}); |