getContextMap() {
- return Collections.unmodifiableMap(contextMap);
- }
-
- /**
- * @return the listenerName
- */
- public String getListenerName() {
- return listenerName;
- }
-
- /**
- * @return the port
- */
- public int getPort() {
- return port;
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsAnnotationScanner.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsAnnotationScanner.java
deleted file mode 100755
index b281ae22f..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsAnnotationScanner.java
+++ /dev/null
@@ -1,383 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import com.sun.jersey.core.reflection.ReflectionHelper;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.Attribute;
-import org.objectweb.asm.ClassReader;
-import org.objectweb.asm.ClassVisitor;
-import org.objectweb.asm.FieldVisitor;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Opcodes;
-
-/**
-* Search for Java classes that are annotated with one or more of a set
-* of annotations.
-*
-* The search is restricted to Java classes that are publically scoped.
-* Inner static public classes are also searched.
-*
-* @author Frank D. Martinez. fmartinez@asimovt.com
-*/
-public class JaxrsAnnotationScanner {
- private static final Logger LOGGER =
- Logger.getLogger(JaxrsAnnotationScanner.class.getName());
-
- /** Matching annotated classes. */
- private Set> classes;
-
- /** Set of annotations to search for. */
- private final Set annotations;
-
- /** The class loader to use to load matching Java class files */
- private final ClassLoader classloader;
-
-
- /**
- *
- * @param annotations the set of annotations to match
- */
- public JaxrsAnnotationScanner(ClassLoader classloader, Class... annotations) {
- this.classloader = classloader;
- this.annotations = getAnnotationSet(annotations);
- this.classes = new HashSet>();
- }
-
- /**
- * Scans paths for matching Java classes
- *
- * @param paths An array of absolute paths to search.
- * @return The set of matching classes that are annotated with one or more of
- * the specified annotations.
- */
- public Set> scan(File[] paths) {
- this.classes = new HashSet>();
-
- for (File file : paths) {
- index(file);
- }
-
- return classes;
- }
-
- /**
- * Scans packages for matching Java classes.
- *
- * @param packages An array of packages to search.
- * @return The set of matching classes that are annotated with one or more of
- * the specified annotations.
- */
- public Set> scan(String[] packages) {
- this.classes = new HashSet>();
-
- for (String p : packages) {
- try {
- String fileP = p.replace('.', '/');
- Enumeration urls = classloader.getResources(fileP);
- while (urls.hasMoreElements()) {
- URL url = urls.nextElement();
- try {
- URI uri = getURI(url);
- index(uri, fileP);
- } catch (URISyntaxException e) {
- LOGGER.warning("URL, " +
- url +
- "cannot be converted to a URI");
- }
- }
- } catch (IOException ex) {
- String s = "The resources for the package" +
- p +
- ", could not be obtained";
- LOGGER.severe(s);
- throw new RuntimeException(s, ex);
- }
- }
-
- return classes;
- }
-
- private URI getURI(URL url) throws URISyntaxException {
- if (url.getProtocol().equalsIgnoreCase("vfsfile")) {
- // Used with JBoss 5.x: trim prefix "vfs"
- return new URI(url.toString().substring(3));
- } else {
- return url.toURI();
- }
- }
-
- /**
- * Get the current set of matching classes.
- *
- * @return The set of matching classes that are annotated with one or more of
- * the specified annotations.
- */
- public Set> getMatchingClasses() {
- return classes;
- }
-
- private Set getAnnotationSet(Class... annotations) {
- Set a = new HashSet();
- for (Class cls : annotations) {
- a.add(
- "L" + cls.getName().replaceAll("\\.", "/") + ";");
- }
- return a;
- }
-
- private void index(File file) {
- if (file.isDirectory()) {
- indexDir(file, true);
- } else if (file.getName().endsWith(".jar") ||
- file.getName().endsWith(".zip")) {
- indexJar(file);
- } else {
- LOGGER.warning("File, " +
- file.getAbsolutePath() +
- ", is ignored, it not a directory, a jar file or a zip file");
- }
- }
-
- private void index(URI u, String filePackageName) {
- String scheme = u.getScheme();
- if (scheme.equals("file")) {
- File f = new File(u.getPath());
- if (f.isDirectory()) {
- indexDir(f, false);
- } else {
- LOGGER.warning("URL, " +
- u +
- ", is ignored. The path, " +
- f.getPath() +
- ", is not a directory");
- }
- } else if (scheme.equals("jar") || scheme.equals("zip")) {
- URI jarUri = URI.create(u.getRawSchemeSpecificPart());
- String jarFile = jarUri.getPath();
- jarFile = jarFile.substring(0, jarFile.indexOf('!'));
- indexJar(new File(jarFile), filePackageName);
- } else {
- LOGGER.warning("URL, " +
- u +
- ", is ignored, it not a file or a jar file URL");
- }
- }
-
- private void indexDir(File root, boolean indexJars) {
- for (File child : root.listFiles()) {
- if (child.isDirectory()) {
- indexDir(child, indexJars);
- } else if (indexJars && child.getName().endsWith(".jar")) {
- indexJar(child);
- } else if (child.getName().endsWith(".class")) {
- analyzeClassFile(child.toURI());
- }
- }
- }
-
- private void indexJar(File file) {
- indexJar(file, "");
- }
-
- private void indexJar(File file, String parent) {
- final JarFile jar = getJarFile(file);
- try {
- final Enumeration entries = jar.entries();
- while (entries.hasMoreElements()) {
- JarEntry e = entries.nextElement();
- if (!e.isDirectory() && e.getName().startsWith(parent) &&
- e.getName().endsWith(".class")) {
- analyzeClassFile(jar, e);
- }
- }
- } catch (Exception e) {
- LOGGER.log(Level.SEVERE, "Exception while processing file, " + file, e);
- } finally {
- try {
- if (jar != null) {
- jar.close();
- }
- } catch (IOException ex) {
- String s = "Error closing jar file, " +
- jar.getName();
- LOGGER.severe(s);
- }
- }
- }
-
- private JarFile getJarFile(File file) {
- if (file == null) {
- return null;
- }
- try {
- return new JarFile(file);
- } catch (IOException ex) {
- String s = "File, " +
- file.getAbsolutePath() +
- ", is not a jar file";
- LOGGER.severe(s);
- throw new RuntimeException(s, ex);
- }
- }
-
- private void analyzeClassFile(URI classFileUri) {
- getClassReader(classFileUri).accept(classVisitor, 0);
- }
-
- private void analyzeClassFile(JarFile jarFile, JarEntry entry) {
- getClassReader(jarFile, entry).accept(classVisitor, 0);
- }
-
-
- private ClassReader getClassReader(JarFile jarFile, JarEntry entry) {
- InputStream is = null;
- try {
- is = jarFile.getInputStream(entry);
- ClassReader cr = new ClassReader(is);
- return cr;
- } catch (IOException ex) {
- String s = "Error accessing input stream of the jar file, " +
- jarFile.getName() + ", entry, " + entry.getName();
- LOGGER.severe(s);
- throw new RuntimeException(s, ex);
- } finally {
- try {
- if (is != null) {
- is.close();
- }
- } catch (IOException ex) {
- String s = "Error closing input stream of the jar file, " +
- jarFile.getName() + ", entry, " + entry.getName() + ", closed.";
- LOGGER.severe(s);
- }
- }
- }
-
-
- private ClassReader getClassReader(URI classFileUri) {
- InputStream is = null;
- try {
- is = classFileUri.toURL().openStream();
- ClassReader cr = new ClassReader(is);
- return cr;
- } catch (IOException ex) {
- String s = "Error accessing input stream of the class file URI, " +
- classFileUri;
- LOGGER.severe(s);
- throw new RuntimeException(s, ex);
- } finally {
- try {
- if (is != null) {
- is.close();
- }
- } catch (IOException ex) {
- String s = "Error closing input stream of the class file URI, " +
- classFileUri;
- LOGGER.severe(s);
- }
- }
- }
-
- private Class getClassForName(String className) {
- try {
- return ReflectionHelper.classForNameWithException(className, classloader);
- } catch (ClassNotFoundException ex) {
- String s = "A class file of the class name, " +
- className +
- "is identified but the class could not be found";
- LOGGER.severe(s);
- throw new RuntimeException(s, ex);
- }
- }
-
- private final AnnotatedClassVisitor classVisitor = new AnnotatedClassVisitor();
-
- private final class AnnotatedClassVisitor implements ClassVisitor {
- /**
- * The name of the visited class.
- */
- private String className;
-
- /**
- * True if the class has the correct scope
- */
- private boolean isScoped;
-
- /**
- * True if the class has the correct declared annotations
- */
- private boolean isAnnotated;
-
- public void visit(int version, int access, String name,
- String signature, String superName, String[] interfaces) {
- className = name;
- isScoped = (access & Opcodes.ACC_PUBLIC) != 0;
- isAnnotated = false;
- }
-
- public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
- isAnnotated |= annotations.contains(desc);
- return null;
- }
-
- public void visitInnerClass(String name, String outerName,
- String innerName, int access) {
- // If the name of the class that was visited is equal
- // to the name of this visited inner class then
- // this access field needs to be used for checking the scope
- // of the inner class
- if (className.equals(name)) {
- isScoped = (access & Opcodes.ACC_PUBLIC) != 0;
-
- // Inner classes need to be statically scoped
- isScoped &= (access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC;
- }
- }
-
- public void visitEnd() {
- if (isScoped && isAnnotated) {
- // Correctly scoped and annotated
- // add to the set of matching classes.
- classes.add(getClassForName(className.replaceAll("/", ".")));
- }
- }
-
-
- public void visitOuterClass(String string, String string0,
- String string1) {
- // Do nothing
- }
-
- public FieldVisitor visitField(int i, String string,
- String string0, String string1, Object object) {
- // Do nothing
- return null;
- }
-
- public void visitSource(String string, String string0) {
- // Do nothing
- }
-
- public void visitAttribute(Attribute attribute) {
- // Do nothing
- }
-
- public MethodVisitor visitMethod(int i, String string,
- String string0, String string1, String[] string2) {
- // Do nothing
- return null;
- }
- };
-}
\ No newline at end of file
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsServletContainer.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsServletContainer.java
deleted file mode 100755
index 7bdbfcef7..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsServletContainer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import javax.servlet.ServletException;
-
-import com.sun.jersey.spi.container.servlet.ServletContainer;
-
-/**
- * JaxrsServletContainer.java
- *
- * @author Edward Chou
- */
-public class JaxrsServletContainer extends ServletContainer {
-
- private ClassLoader cl;
-
- public JaxrsServletContainer(ClassLoader cl) {
- this.cl = cl;
- }
-
- @Override
- public void init() throws ServletException {
- ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(cl);
- super.init();
- Thread.currentThread().setContextClassLoader(oldCl);
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyEndpointConfig.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyEndpointConfig.java
deleted file mode 100755
index 13181420f..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyEndpointConfig.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.core.Application;
-
-/**
- * JerseyEndpointConfig.java
- *
- * @author Edward Chou
- */
-public class JerseyEndpointConfig extends Application {
-
- /* (non-Javadoc)
- * @see javax.ws.rs.core.Application#getClasses()
- */
- @Override
- public Set> getClasses() {
- Set> classes = new HashSet> ();
- classes.add(JerseyRootResource.class);
- return classes;
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResource.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResource.java
deleted file mode 100755
index c15f7d4aa..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResource.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HEAD;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.SecurityContext;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
-
-import com.sun.jbi.restbc.jbiadapter.I18n;
-
-/**
- * JerseyRootResource.java
- *
- * @author Edward Chou
- */
-@Path("{path:.*}")
-public class JerseyRootResource {
-
- /*
- * 101-110
- */
- private final static Logger logger = Logger.getLogger(JerseyRootResource.class.getName());
-
- @Context UriInfo uriInfo;
- @Context HttpHeaders headers;
- @Context SecurityContext security;
-
- @GET
- public Response get() {
- return delegate("GET", null);
- }
-
- @PUT
- public Response put(InputStream payload) {
- return delegate("PUT", payload);
- }
-
- @POST
- public Response post(InputStream payload) {
- return delegate("POST", payload);
- }
-
- @DELETE
- public Response delete() {
- return delegate("DELETE", null);
- }
-
- @HEAD
- public Response head() {
- return delegate("HEAD", null);
- }
-
- private Response delegate(String method, InputStream payload) {
- if (logger.isLoggable(Level.FINEST)) {
- StringBuilder sb = new StringBuilder();
- sb.append("\n");
- sb.append(" URI: " + uriInfo.getRequestUri().toString() + "\n");
- sb.append(" Method: " + method + "\n");
- sb.append(" Headers: " + headers.getRequestHeaders() + "\n");
-
- String msg = I18n.lf("RESTBC-1101: Inbound Request: {0}", sb.toString());//NOI18N
- logger.finest(msg);
- }
-
- InboundDelegator inboundDelegator = InboundDelegator.getInstance();
- if (inboundDelegator == null) {
- String msg = I18n.loc("RESTBC-7101: Inbound delegator not initialized yet");
- logger.severe(msg);
- ResponseBuilder responseBuilder = Response.serverError();
- responseBuilder.entity(msg);
- return responseBuilder.build();
- }
-
- try {
- ResponseBuilder responseBuilder = inboundDelegator.delegateRequest(method, uriInfo, headers, security, payload);
-
- Response response = responseBuilder.build();
-
- if (logger.isLoggable(Level.FINEST)) {
- StringBuilder sb = new StringBuilder();
- sb.append("\n");
- sb.append(" URI: " + uriInfo.getRequestUri().toString() + "\n");
- sb.append(" Method: " + method + "\n");
- sb.append(" Status: " + response.getStatus());
- sb.append(" Headers: " + response.getMetadata() + "\n");
-
- String msg = I18n.lf("RESTBC-1102: Inbound Response: {0}", sb.toString()); // NOI18N
- logger.finest(msg);
- }
-
- return response;
-
- } catch (Exception e) {
- String msg = I18n.loc("RESTBC-7102: Error while serving inbound request {0}", e);
- logger.severe(msg);
- ResponseBuilder responseBuilder = Response.serverError();
- responseBuilder.entity(msg);
-
- Response response = responseBuilder.build();
-
- if (logger.isLoggable(Level.FINEST)) {
- StringBuilder sb = new StringBuilder();
- sb.append("\n");
- sb.append(" URI: " + uriInfo.getRequestUri().toString() + "\n");
- sb.append(" Method: " + method + "\n");
- sb.append(" Status: " + response.getStatus());
- sb.append(" Headers: " + response.getMetadata() + "\n");
-
- String responseMsg = I18n.lf("RESTBC-1102: Inbound Response: {0}", sb.toString()); // NOI18N
- logger.finest(responseMsg);
- }
-
- return response;
- }
-
-
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResourceApplication.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResourceApplication.java
deleted file mode 100755
index 94e1683d6..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JerseyRootResourceApplication.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.core.Application;
-
-/**
- * JerseyRootResourceApplication.java
- *
- * @author Edward Chou
- */
-public class JerseyRootResourceApplication extends Application {
-
- /* (non-Javadoc)
- * @see javax.ws.rs.core.Application#getClasses()
- */
- @Override
- public Set> getClasses() {
- Set> classes = new HashSet> ();
- classes.add(JerseyRootResource.class);
- return classes;
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/PathUtil.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/PathUtil.java
deleted file mode 100755
index d998bb72c..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/PathUtil.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-/**
- * PathUtil.java
- *
- * @author Edward Chou
- */
-public class PathUtil {
-
-
- public static String normalizePath(String path) {
- // compact all slashes
- String s = path.replaceAll("/++", "/");
-
- // remove starting and ending slashes
- if (s.startsWith("/")) {
- s = s.substring(1);
- }
- if (s.endsWith("/")) {
- s = s.substring(0, s.length() - 1);
- }
-
- return s.toLowerCase();
- }
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/RestServiceUnit.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/RestServiceUnit.java
deleted file mode 100755
index 497bf40ae..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/RestServiceUnit.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import java.io.File;
-import java.util.logging.Logger;
-
-import javax.jbi.component.ComponentContext;
-import javax.xml.namespace.QName;
-import javax.xml.transform.stream.StreamSource;
-
-import com.sun.grizzly.http.servlet.ServletAdapter;
-import com.sun.jbi.restbc.jbiadapter.RestComponent;
-import com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig;
-
-/**
- * RestServiceUnit.java
- *
- * @author Edward Chou
- */
-public class RestServiceUnit implements ServiceUnitConfig {
-
- public final static String REST_CONFIG_FILE_NAME = "rest-config.xml";
-
- private final static Logger logger = Logger.getLogger(RestServiceUnit.class.getName());
-
- private RestComponent component;
- private ComponentContext context;
- private String serviceUnitName;
- private String serviceUnitRootPath;
-
- public RestServiceUnit(RestComponent component, ComponentContext context, String serviceUnitName, String serviceUnitRootPath) throws Exception {
- this.component = component;
- this.context = context;
- this.serviceUnitName = serviceUnitName;
- this.serviceUnitRootPath = serviceUnitRootPath;
-
- init();
- }
-
- private void init() throws Exception {
- File rootDir = new File(serviceUnitRootPath);
- File configXML = new File(rootDir, REST_CONFIG_FILE_NAME);
-
- }
-
-
- public void start() throws Exception {
- /*
- for (InboundConfig inboundConfig : restConfig.getInboundConfig()) {
- String listenerName = inboundConfig.getListenerName();
- String contextRoot = inboundConfig.getContextRoot();
-
- InboundHttpListener listener = component.getInboundHttpListener(listenerName);
- if (listener == null) {
- throw new Exception("cannot find listener with name: " + listenerName);
- }
-
- // register contextRoot
- ServletAdapter servletAdapter = null;
- listener.registerContext(contextRoot, servletAdapter);
- }
- */
- }
-
- public void stop() throws Exception {
- /*
- for (InboundConfig inboundConfig : restConfig.getInboundConfig()) {
- String listenerName = inboundConfig.getListenerName();
- String contextRoot = inboundConfig.getContextRoot();
-
- InboundHttpListener listener = component.getInboundHttpListener(listenerName);
- if (listener == null) {
- throw new Exception("cannot find listener with name: " + listenerName);
- }
-
- // unregister contextRoot
- listener.unregisterContext(contextRoot);
- }
- */
- }
-
- public void shutdown() throws Exception {
-
- }
-
-
- public String getServiceUnitName() {
- return serviceUnitName;
- }
-
- /* (non-Javadoc)
- * @see com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig#getEndpointName()
- */
- public String getEndpointName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig#getServiceName()
- */
- public QName getServiceName() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java b/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java
deleted file mode 100755
index 8055b3402..000000000
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
-
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.ws.rs.Path;
-import javax.ws.rs.ext.Provider;
-
-import com.sun.jersey.api.core.DefaultResourceConfig;
-
-/**
- * ServiceUnitResourceConfig.java
- *
- * @author Edward Chou
- */
-public class ServiceUnitResourceConfig extends DefaultResourceConfig {
-
- public static final String PROPERTY_CLASSPATH
- = "com.sun.jersey.config.property.classpath";
-
- public static final String SERVICE_UNIT_ROOT =
- "com.sun.jbi.config.property.serviceunitroot";
-
- private static final Logger LOGGER =
- Logger.getLogger(ServiceUnitResourceConfig.class.getName());
-
- private final String[] paths;
-
- private ClassLoader serviceUnitClassLoader;
-
- public ServiceUnitResourceConfig() {
- this(getPaths(), null);
- }
-
- public ServiceUnitResourceConfig(Map props) {
- this(getPaths(props), props);
-
- setPropertiesAndFeatures(props);
- }
-
- public ServiceUnitResourceConfig(String[] paths, Map props) {
- super();
-
- if (paths == null || paths.length == 0)
- throw new IllegalArgumentException(
- "Array of paths must not be null or empty");
-
- this.paths = paths.clone();
-
- try {
- Object v = props.get(SERVICE_UNIT_ROOT);
- if (v == null)
- throw new IllegalArgumentException(SERVICE_UNIT_ROOT + " property is missing");
-
- String serviceUnitRoot = (String) v;
- URL serviceUnitRootURL = new File(serviceUnitRoot).toURL();
- serviceUnitClassLoader = new URLClassLoader(new URL[] { serviceUnitRootURL }, this.getClass().getClassLoader());
- } catch(Exception e) {
- LOGGER.log(Level.WARNING, "unable to create ServiceUnit ClassLoader", e);
- }
-
- init(paths);
- }
-
- /**
- * Perform a new search for resource classes and provider classes.
- */
- public void reload() {
- getClasses().clear();
- init(paths);
- }
-
- private void init(String[] paths) {
- File[] roots = new File[paths.length];
- for (int i = 0; i< paths.length; i++) {
- roots[i] = new File(paths[i]);
- }
-
- if (LOGGER.isLoggable(Level.INFO)) {
- StringBuilder b = new StringBuilder();
- b.append("Scanning for root resource and provider classes in the paths:");
- for (String p : paths)
- b.append('\n').append(" ").append(p);
-
- LOGGER.log(Level.INFO, b.toString());
- }
-
-
- JaxrsAnnotationScanner scanner = new JaxrsAnnotationScanner(serviceUnitClassLoader, Path.class, Provider.class);
-
- scanner.scan(roots);
-
- getClasses().addAll(scanner.getMatchingClasses());
-
- if (LOGGER.isLoggable(Level.INFO) && !getClasses().isEmpty()) {
- StringBuilder b = new StringBuilder();
- b.append("Root resource classes found:");
- for (Class c : getClasses()) {
- if (c.isAnnotationPresent(Path.class)) {
- b.append('\n').append(" ").append(c);
- }
- }
-
- LOGGER.log(Level.INFO, b.toString());
-
- b = new StringBuilder();
- b.append("Provider classes found:");
- for (Class c : getClasses()) {
- if (c.isAnnotationPresent(Provider.class)) {
- b.append('\n').append(" ").append(c);
- }
- }
-
- LOGGER.log(Level.INFO, b.toString());
- }
- }
-
- private static String[] getPaths() {
- String classPath = System.getProperty("java.class.path");
- return classPath.split(File.pathSeparator);
- }
-
- private static String[] getPaths(Map props) {
- Object v = props.get(PROPERTY_CLASSPATH);
- if (v == null)
- throw new IllegalArgumentException(PROPERTY_CLASSPATH +
- " property is missing");
-
- String[] paths = getPaths(v);
- if (paths.length == 0)
- throw new IllegalArgumentException(PROPERTY_CLASSPATH +
- " contains no paths");
-
- return paths;
- }
-
- private static String[] getPaths(Object param) {
- if (param instanceof String) {
- return getElements(new String[] { (String)param });
- } else if (param instanceof String[]) {
- return getElements((String[])param);
- } else {
- throw new IllegalArgumentException(PROPERTY_CLASSPATH + " must " +
- "have a property value of type String or String[]");
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.jersey.api.core.DefaultResourceConfig#getClasses()
- */
- @Override
- public Set> getClasses() {
- Set> classes = super.getClasses();
- classes.add(BundleContextProvider.class);
- return classes;
- }
-
-}
diff --git a/ojc-core/restbc/jbiadapter/src/main/java/com/sun/jbi/common/util/msgs.properties b/ojc-core/restbc/jbiadapter/src/main/java/com/sun/jbi/common/util/msgs.properties
new file mode 100644
index 000000000..a069abdfe
--- /dev/null
+++ b/ojc-core/restbc/jbiadapter/src/main/java/com/sun/jbi/common/util/msgs.properties
@@ -0,0 +1,330 @@
+# DO NOT EDIT
+# THIS FILE IS GENERATED AUTOMATICALLY FROM JAVA SOURCES/CLASSES
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1001 = ComponentLifeCycle.init() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1002 = ComponentLifeCycle.shutdown() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1003 = ComponentLifeCycle.start() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1004 = ComponentLifeCycle.stop() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-1021 = Bootstrap init called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1031 = ServiceUnitManager.deploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1032 = ServiceUnitManager.init() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1033 = ServiceUnitManager.init() successful serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1034 = ServiceUnitManager.shutdown() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1035 = ServiceUnitManager.start() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1036 = ServiceUnitManager.stop() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1037 = ServiceUnitManager.undeploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1051 = ServiceUnit.start() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1052 = ServiceUnit.stop() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1053 = ServiceUnit.shutdown() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1061 = creating NMR Receiver\: threadPoolSize\={0}, maxTheadPoolSize\={1}, maxWaitMillis\={2},
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1062 = starting NMR Receiver
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1063 = stopping NMR Receiver
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1064 = received a MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1121 = WSDLEndpoint.start()
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1122 = WSDLEndpoint.stop()
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1123 = WSDLEndpoint.shutdown()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1131 = PropertyServiceUnitConfig.start()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1132 = PropertyServiceUnitConfig.stop()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1133 = PropertyServiceUnitConfig.shutdown()
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1202 = Application Configuration deleted {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1204 = New application variable added {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1205 = Application variable deleted {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4001 = Initializing Keystore at location {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4002 = Initializing Truststore at location {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4003 = Started listener {0} at port {1}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-4121 = activating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-4122 = deactivating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-4131 = activating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-4132 = deactivating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5001 = Initialized {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5002 = Shut down {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5003 = Start {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5004 = Stop {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-5031 = Deployed ServiceUnit {0}.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6001 = Unable to initialize SSLContext, install root is not a directory {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6002 = Unable to initialize SSLContext, keystore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6003 = Unable to initialize SSLContext, truststore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6004 = Unable to initialize SSLContext {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6005 = Unable to initialize SSLConfig, install root is not a directory {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6006 = Unable to initialize SSLConfig, keystore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6007 = Unable to initialize SSLConfig, truststore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6051 = unable to instantiate PropertyServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6052 = unable to instantiate JaxrsPojoServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6053 = unable to instantiate WSDLServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7003 = {0} failed to start {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7004 = {0} failed to stop {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7005 = {0} failed to stop HTTP listener {1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7021 = Failed to parse component descriptor\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7022 = Failed to initialize component bootstrap\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7023 = Failed to register component bootstrap\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7031 = Duplicate ServiceUnit {0}, cannot proceed with deployment.
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7032 = Error shutting down Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7033 = Cannot find Service Unit {0} to shutdown
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7034 = Error starting Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7035 = Cannot find Service Unit {0} to start
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7036 = Error stopping Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7037 = Cannot find Service Unit {0} to stop
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-7061 = Error during DeliveryChannel.accept() {0}
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-7062 = Error during Receiver.run() {0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7071 = error processing MessageExchange\: id\={0}, {1}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7072 = unsupported MEP\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7073 = Inbound MEP should not get here\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7074 = cannot find corresponding endpoint for this MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7075 = error when processing MessageExchange\: id\={0}, {1}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7076 = got ERROR status for MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7111 = Request URL {0} does not match any ServiceUnit with listenerName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7112 = Unexcepted error\: unable to match request path with a inbound configuration
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7113 = Inbound request timed-out after {0} ms
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7114 = Error during inbound request {0}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7115 = Incorrect return status for inbound request
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7116 = Unsupported MEP type {0}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7121 = http-listener-name\={0} specified in the inbound configuration for WSDL operation {1} does not match an existing HTTP Listener.
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7122 = unable to activate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7123 = unable to deactivate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7131 = http-listener-name\={0} specified in the inbound configuration for PropertyConfiguration does not match an existing HTTP Listener.
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7132 = unable to activate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7133 = unable to deactivate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7134 = {0} property cannot be empty.
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7201 = Application Config already exists {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7202 = Invalid item size for Application Config {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7203 = Invalid key for composite data for Application Config {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7204 = Application Configuration does not exist for delete {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7205 = Application Configuration does not exist for set {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7206 = Invalid item size for app config {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7207 = Invalid key for composite data for app config
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7208 = Unable to construct composite data for app config {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7209 = Application variable name already exists {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7210 = Invalid item size for app variable {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7211 = Invalid key for composite data for app variable {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7212 = Invalid app variable composite data no value field {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7213 = Invalid app variable composite data no type field
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7214 = Application variable does not exist for delete {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7215 = Application variable does not exist for set {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7216 = Invalid item size for app variable
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7219 = Invalid app variable composite data no type field {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7220 = Unable to construct composite data for app variable
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7221 = Invalid app config composite data null url
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7224 = Failed to persist application variables {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7225 = Failed to load application variables {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7226 = Failed to persist application configurations {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7227 = Failed to load application configurations {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7228 = Failed during mbean initialization {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7521 = Exception while persisting configuration changes.
+
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/I18n.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/I18n.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/I18n.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/I18n.java
index 654550548..08ff75094
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/I18n.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/I18n.java
@@ -27,15 +27,15 @@
*
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import com.sun.jbi.alerter.Alerter;
import com.sun.jbi.alerter.AlerterImpl;
import com.sun.jbi.alerter.NotificationEvent;
-import java.util.regex.Pattern;
-
import com.sun.jbi.common.util.LocalizationSupport;
-import java.util.regex.Matcher;
/**
* I18n utility
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/InboundConfiguration.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/InboundConfiguration.java
old mode 100755
new mode 100644
similarity index 92%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/InboundConfiguration.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/InboundConfiguration.java
index a25e08e5e..46ebeb31c
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/InboundConfiguration.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/InboundConfiguration.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.util.ArrayList;
import java.util.Collections;
@@ -10,13 +10,14 @@ import javax.ws.rs.core.MediaType;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.inbound.InboundHttpListener;
-import com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
-import com.sun.jbi.restbc.jbiadapter.util.JsonUtil;
-import com.sun.jbi.restbc.jbiadapter.util.PropertiesUtil;
-import com.sun.jbi.restbc.jbiadapter.wsdl.RestOperation;
-import com.sun.jersey.api.uri.UriTemplate;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.inbound.InboundHttpListener;
+import net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
+import net.openesb.jbi.restbc.jbiadapter.util.JsonUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.RestOperation;
+
+import org.glassfish.jersey.uri.UriTemplate;
/**
* InboundConfiguration.java
@@ -70,6 +71,7 @@ public class InboundConfiguration {
this.serviceName = serviceName;
this.endpointName = endpointName;
this.endpointIdentifier = endpointIdentifier;
+
httpListenerName = PropertiesUtil.safeGetProperty(p, HTTP_LISTENER_NAME_PROP, InboundHttpListener.DEFAULT_LISTENER);
String appConfigName = endpointIdentifier.getApplicationConfigurationName();
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/JerseyClientWrapper.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/JerseyClientWrapper.java
old mode 100755
new mode 100644
similarity index 74%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/JerseyClientWrapper.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/JerseyClientWrapper.java
index 76e966ac8..466289967
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/JerseyClientWrapper.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/JerseyClientWrapper.java
@@ -1,16 +1,5 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
-import com.sun.jbi.restbc.jbiadapter.descriptor.Filter;
-import com.sun.jbi.restbc.jbiadapter.util.*;
-import com.sun.jbi.restbc.jbiadapter.wsdl.RestOperation;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientRequest;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
-import com.sun.jersey.api.uri.UriTemplate;
-import com.sun.jersey.api.uri.UriBuilderImpl;
-import com.sun.jersey.client.urlconnection.HTTPSProperties;
-import com.sun.jersey.client.urlconnection.URLConnectionClientHandler;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -22,6 +11,7 @@ import java.util.Map;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
+
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.jbi.messaging.NormalizedMessage;
@@ -29,13 +19,33 @@ import javax.mail.util.ByteArrayDataSource;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.ClientRequestFilter;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.Filter;
+import net.openesb.jbi.restbc.jbiadapter.util.BeanUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.JbiMessageUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.JsonUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.MediaTypeUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.NMPropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PathUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.RestOperation;
+
+import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
+import org.glassfish.jersey.uri.UriTemplate;
+
/**
* JerseyClientWrapper.java
*
@@ -59,7 +69,7 @@ public final class JerseyClientWrapper {
return instance;
}
- public ClientRequest buildClientRequest(
+ public Invocation buildClientRequest(
RestComponent component,
NormalizedMessage requestMsg,
OutboundConfiguration outboundConfig) throws Exception {
@@ -79,7 +89,7 @@ public final class JerseyClientWrapper {
UriTemplate uriTemplate = new UriTemplate(url);
String resultURL = uriTemplate.createURI(pathParams);
- UriBuilder uriBuilder = UriBuilderImpl.fromUri(resultURL);
+ UriBuilder uriBuilder = UriBuilder.fromUri(resultURL);
// build params
String paramStyle = PropertiesUtil.safeGetProperty(requestMsg, NMProps.NM_PARAM_STYLE_PROP);
@@ -165,29 +175,34 @@ public final class JerseyClientWrapper {
}
// create ClientRequest.Builder
- ClientRequest.Builder requestBuilder = ClientRequest.create();
+ Client client = ClientBuilder.newClient();
+ WebTarget target = client.target(uriBuilder.build().toString());
+ target = register(target, requestMsg, outboundConfig);
+
+
+ Invocation.Builder invocationBuilder = target.request();
boolean isContentTypeSet = false;
if (contentType.length() > 0) {
- requestBuilder.type(contentType);
+ invocationBuilder.header("Content-Type", contentType);
isContentTypeSet = true;
}
boolean isDateSet = false;
if (date.length() > 0) {
- requestBuilder.header("Date", date);
+ invocationBuilder.header("Date", date);
isDateSet = true;
}
boolean isAcceptSet = false;
for (MediaType acceptType : acceptMediaTypes) {
- requestBuilder.accept(acceptType);
+ invocationBuilder.accept(acceptType);
isAcceptSet = true;
}
boolean isAcceptLanguageSet = false;
for (String acceptLanguage : acceptLanguages) {
- requestBuilder.acceptLanguage(acceptLanguage);
+ invocationBuilder.acceptLanguage(acceptLanguage);
isAcceptLanguageSet = true;
}
@@ -215,11 +230,12 @@ public final class JerseyClientWrapper {
continue;
}
- requestBuilder.header(header.getKey(), header.getValue());
+ invocationBuilder.header(header.getKey(), header.getValue());
}
+
URI uri = uriBuilder.build();
- ClientRequest clientRequest = requestBuilder.build(uri, requestMethod);
+ Invocation invocation = null;
// set security if necessary
if (uri.getScheme() != null && uri.getScheme().equalsIgnoreCase("https")) { // NOI18N
@@ -235,9 +251,9 @@ public final class JerseyClientWrapper {
}
};
}
-
- HTTPSProperties prop = new HTTPSProperties(hostnameVerifier, sslContext);
- clientRequest.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, prop);
+ //LDE : todo
+ //HTTPSProperties prop = new HTTPSProperties(hostnameVerifier, sslContext);
+ //WebTarget.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, prop);
} else {
String msg = I18n.loc("RESTBC-7081: SSLContext is unavailable to make HTTPS Request");//NOI18N
@@ -253,7 +269,8 @@ public final class JerseyClientWrapper {
String msg = I18n.lf("RESTBC-1081: ignored reading payload for {0} method", requestMethod);//NOI18N
logger.finest(msg);
}
- return clientRequest;
+ invocation = invocationBuilder.build(requestMethod);
+ return invocation;
}
// use the entity as payload
@@ -265,8 +282,9 @@ public final class JerseyClientWrapper {
logger.finest(msg);
}
String entityString = (String) entity;
- clientRequest.setEntity(entityString);
- return clientRequest;
+ invocation = invocationBuilder.build(requestMethod, Entity.text(entityString));
+ //clientRequest.setEntity(entityString);
+ return invocation;
} else if (entity instanceof org.w3c.dom.Node) {
if (logger.isLoggable(Level.FINEST)) {
String msg = I18n.lf("RESTBC-1083: sending entity located in NM property for the request as a DOMSource object");//NOI18N
@@ -275,18 +293,18 @@ public final class JerseyClientWrapper {
org.w3c.dom.Node entityNode = (org.w3c.dom.Node) entity;
DOMSource domSource = new DOMSource(entityNode);
if (isContentTypeSet && PathUtil.isJSONMediaType(contentType)) {
- String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(domSource);
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
- com.sun.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
+ String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(domSource, outboundConfig.isStripNamespaces());
+ net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
+ net.openesb.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
if (jsonObject != null) {
- clientRequest.setEntity(jsonObject.toString());
+ invocation =invocationBuilder.build(requestMethod, Entity.json(jsonObject.toString()));
} else {
- clientRequest.setEntity(xmlPayloadAsString);
+ invocation =invocationBuilder.build(requestMethod, Entity.json(xmlPayloadAsString));
}
} else {
- clientRequest.setEntity(JbiMessageUtil.convertXmlToString(domSource));
+ invocation =invocationBuilder.build(requestMethod, Entity.xml(JbiMessageUtil.convertXmlToString(domSource)));
}
- return clientRequest;
+ return invocation;
} else if (entity instanceof Source) {
if (logger.isLoggable(Level.FINEST)) {
String msg = I18n.lf("RESTBC-1084: sending entity located in NM property for the request as a Source object");//NOI18N
@@ -294,18 +312,18 @@ public final class JerseyClientWrapper {
}
Source entitySource = (Source) entity;
if (isContentTypeSet && PathUtil.isJSONMediaType(contentType)) {
- String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(entitySource);
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
- com.sun.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
+ String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(entitySource, outboundConfig.isStripNamespaces());
+ net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
+ net.openesb.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
if (jsonObject != null) {
- clientRequest.setEntity(jsonObject.toString());
+ invocation =invocationBuilder.build(requestMethod, Entity.json(jsonObject.toString()));
} else {
- clientRequest.setEntity(xmlPayloadAsString);
+ invocation =invocationBuilder.build(requestMethod, Entity.json(xmlPayloadAsString));
}
} else {
- clientRequest.setEntity(JbiMessageUtil.convertXmlToString(entitySource));
+ invocation =invocationBuilder.build(requestMethod, Entity.xml(JbiMessageUtil.convertXmlToString(entitySource)));
}
- return clientRequest;
+ return invocation;
}
}
@@ -315,32 +333,34 @@ public final class JerseyClientWrapper {
if (requestPayload instanceof Source) {
Source xmlPayload = (Source) requestPayload;
if (isContentTypeSet && PathUtil.isJSONMediaType(contentType)) {
- String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(xmlPayload);
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
- com.sun.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
+ String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(xmlPayload, outboundConfig.isStripNamespaces());
+ net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
+ net.openesb.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
if (jsonObject != null) {
- clientRequest.setEntity(jsonObject.toString());
+ invocation = invocationBuilder.build(requestMethod, Entity.json(jsonObject.toString()));
} else {
- clientRequest.setEntity(xmlPayloadAsString);
+ invocation = invocationBuilder.build(requestMethod, Entity.json((xmlPayloadAsString)));
}
} else {
- clientRequest.setEntity(JbiMessageUtil.convertXmlToString(xmlPayload));
+ invocation = invocationBuilder.build(requestMethod, Entity.xml(JbiMessageUtil.convertXmlToString(xmlPayload)));
}
} else {
DataHandler streamPayload = (DataHandler) requestPayload;
- clientRequest.setEntity(streamPayload.getInputStream());
+ //LDE : todo
+ //invocation = invocationBuilder.build(requestMethod, streamPayload.getInputStream());
}
}
- return clientRequest;
+ return invocation;
+
}
public void buildNormalizedReplyMessage(NormalizedMessage replyMsg,
- ClientRequest clientRequest,
- ClientResponse clientResponse,
+ String method,
+ Response clientResponse,
OutboundConfiguration outboundConfig) throws Exception {
- String method = clientRequest.getMethod();
+
replyMsg.setProperty(NMProps.NM_RESPONSE_STATUS_PROP, clientResponse.getStatus());
@@ -348,15 +368,16 @@ public final class JerseyClientWrapper {
replyMsg.setProperty(NMProps.NM_RESPONSE_URL_PROP, clientResponse.getLocation().toString());
}
- if (clientResponse.getType() != null) {
- replyMsg.setProperty(NMProps.NM_RESPONSE_CONTENT_TYPE_PROP, MediaTypeUtil.mediaTypeToString(clientResponse.getType()));
+ if (clientResponse.getHeaderString("Content-Type") != null) {
+ replyMsg.setProperty(NMProps.NM_RESPONSE_CONTENT_TYPE_PROP, MediaTypeUtil.mediaTypeToString(clientResponse.getMediaType()));
}
- Map headers = NMPropertiesUtil.multivaluedMapToMap(clientResponse.getHeaders());
+ Map headers = NMPropertiesUtil.multivaluedMapToMap(clientResponse.getStringHeaders());
replyMsg.setProperty(NMProps.NM_RESPONSE_HEADERS_PROP, JsonUtil.buildJson(headers));
NMPropertiesUtil.setDynamicNMProperties(replyMsg, NMProps.NM_RESPONSE_HEADERS_PROP, headers);
- InputStream inputStream = clientResponse.getEntity(InputStream.class);
+ //LDE : todo
+ InputStream inputStream = (InputStream)clientResponse.getEntity();
RestOperation restOp = outboundConfig.getRestOp();
Definition definition = outboundConfig.getDefinition();
@@ -364,8 +385,8 @@ public final class JerseyClientWrapper {
// has WSDL configuration
Source replyContent = null;
- if (inputStream != null && clientResponse.getType() != null && !method.equalsIgnoreCase("head")) {
- MediaType mediaType = clientResponse.getType();
+ if (inputStream != null && clientResponse.getMediaType() != null && !method.equalsIgnoreCase("head")) {
+ MediaType mediaType = clientResponse.getMediaType();
if (PathUtil.isXMLMediaType(mediaType) && !outboundConfig.isForwardAsAttachment()) {
// this is XML content and don't forward as attachment
replyContent = JbiMessageUtil.createJbiWrappedMsg(inputStream, restOp, definition, true);
@@ -378,8 +399,8 @@ public final class JerseyClientWrapper {
sb.append(currentString);
currentString = reader.readLine();
}
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new com.sun.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
- String xmlString = com.sun.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
+ net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
+ String xmlString = net.openesb.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
replyContent = JbiMessageUtil.createJbiWrappedMsg(xmlString, restOp, definition, false);
} else {
// treat as attachment
@@ -404,8 +425,8 @@ public final class JerseyClientWrapper {
} catch (IllegalArgumentException iae) {
// ignore
}
- if (inputStream != null && clientResponse.getType() != null && !method.equalsIgnoreCase("head")) {
- MediaType mediaType = clientResponse.getType();
+ if (inputStream != null && clientResponse.getMediaType() != null && !method.equalsIgnoreCase("head")) {
+ MediaType mediaType = clientResponse.getMediaType();
if (PathUtil.isXMLMediaType(mediaType) && !outboundConfig.isForwardAsAttachment()) {
// this is XML content and don't forward as attachment
replyContent = JbiMessageUtil.createJbiWrappedMsg(msgType, inputStream);
@@ -418,13 +439,13 @@ public final class JerseyClientWrapper {
sb.append(currentString);
currentString = reader.readLine();
}
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new com.sun.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
- String xmlString = com.sun.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
+ net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
+ String xmlString = net.openesb.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
replyContent = JbiMessageUtil.createJbiWrappedMsg(msgType, new ByteArrayInputStream(xmlString.getBytes()));
} else {
// treat as attachment
- DataSource ds = new ByteArrayDataSource(inputStream, MediaTypeUtil.mediaTypeToString(clientResponse.getType()));
+ DataSource ds = new ByteArrayDataSource(inputStream, MediaTypeUtil.mediaTypeToString(clientResponse.getMediaType()));
DataHandler dataHandler = new DataHandler(ds);
String uuid = UUID.randomUUID().toString();
@@ -440,12 +461,14 @@ public final class JerseyClientWrapper {
}
}
-
- public ClientResponse makeRequest(ClientRequest request,
+
+
+ public WebTarget register(WebTarget webTarget,
NormalizedMessage requestMsg,
OutboundConfiguration outboundConfig) throws Exception {
- Client client = new Client(new URLConnectionClientHandler(new HttpProxyURLConnectionFactory()));
+ //LDE : what?
+ //Client client = new Client(new URLConnectionClientHandler(new HttpProxyURLConnectionFactory()));
// add basic auth filter
String basicAuthUsername = PropertiesUtil.safeGetProperty(requestMsg, NMProps.NM_BASICAUTH_USERNAME_PROP);
@@ -459,18 +482,19 @@ public final class JerseyClientWrapper {
}
if (basicAuthUsername.length() > 0 && basicAuthPassword.length() > 0) {
- client.addFilter(new HTTPBasicAuthFilter(basicAuthUsername, basicAuthPassword));
+ webTarget.register(HttpAuthenticationFeature.basic(basicAuthUsername, basicAuthPassword));
}
- if (logger.isLoggable(Level.FINEST)) {
- logger.finest(getClientRequestAsString(request));
- }
+ //LDE : todo
+ //if (logger.isLoggable(Level.FINEST)) {
+ // logger.finest(getClientRequestAsString(request.));
+ //}
// apply all custom filters
for (Filter filter : outboundConfig.getEndpointIdentifier().getFilters()) {
try {
Class> filterClass = outboundConfig.getServiceUnit().loadFilterClass(filter.getClassName());
- if (!com.sun.jersey.api.client.filter.ClientFilter.class.isAssignableFrom(filterClass)) {
+ if (!ClientRequestFilter.class.isAssignableFrom(filterClass)) {
String msg = I18n.lf("RESTBC-6085: filter class {0} is not a subclass of com.sun.jersey.api.client.filter.ClientFilter, skipping ...", filter.getClassName());//NOI18N
logger.warning(msg);
continue;
@@ -483,7 +507,7 @@ public final class JerseyClientWrapper {
BeanUtil.setProperty(filterObject, key, val);
}
- client.addFilter((com.sun.jersey.api.client.filter.ClientFilter) filterObject);
+ webTarget.register((ClientRequestFilter) filterObject);
} catch (Exception e) {
String msg = I18n.lf("RESTBC-6086: unable to instantiate filter class {0} skipping ..., {1}", filter.getClassName(), e);//NOI18N
@@ -493,22 +517,21 @@ public final class JerseyClientWrapper {
}
- ClientResponse response = client.handle(request);
+ //LDE toto
+ //if (logger.isLoggable(Level.FINEST)) {
+ // logger.finest(getClientResponseAsString(response));
+ //}
- if (logger.isLoggable(Level.FINEST)) {
- logger.finest(getClientResponseAsString(response));
- }
-
- return response;
+ return webTarget;
}
-
+/*
private String getClientRequestAsString(ClientRequest request) {
StringBuilder sb = new StringBuilder();
try {
sb.append("Client Request: \n");
- sb.append(" URI = " + request.getURI() + "\n");
+ sb.append(" URI = " + request.getUri()+ "\n");
sb.append(" Method = " + request.getMethod() + "\n");
- sb.append(" Headers = " + request.getMetadata() + "\n");
+ sb.append(" Headers = " + request.getHeaders()+ "\n");
} catch (Exception e) {
logger.log(Level.WARNING, "error logging client request", e);
}
@@ -519,12 +542,12 @@ public final class JerseyClientWrapper {
StringBuilder sb = new StringBuilder();
try {
sb.append("Client Response: \n");
- sb.append(" Status = " + response.getResponseStatus() + " \n");
- sb.append(" Type = " + MediaTypeUtil.mediaTypeToString(response.getType()) + " \n");
+ sb.append(" Status = " + response.getStatus()+ " \n");
+ sb.append(" Type = " + MediaTypeUtil.mediaTypeToString(response.getMediaType()) + " \n");
sb.append(" Headers = " + response.getHeaders() + " \n");
} catch (Exception e) {
logger.log(Level.WARNING, "error logging client response", e);
}
return sb.toString();
- }
-}
+ }*/
+}
\ No newline at end of file
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/MessageProcessor.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/MessageProcessor.java
old mode 100755
new mode 100644
similarity index 85%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/MessageProcessor.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/MessageProcessor.java
index 172371b47..58e03e1b2
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/MessageProcessor.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/MessageProcessor.java
@@ -1,4 +1,6 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
+
+import java.util.logging.Logger;
import javax.jbi.component.ComponentContext;
import javax.jbi.messaging.ExchangeStatus;
@@ -6,14 +8,17 @@ import javax.jbi.messaging.InOnly;
import javax.jbi.messaging.InOut;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.NormalizedMessage;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.core.Response;
+
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
+
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.ClientResponse;
import com.sun.jbi.common.qos.ServiceQuality;
import com.sun.jbi.common.qos.messaging.BaseMessagingChannel;
import com.sun.jbi.common.qos.messaging.MessagingChannel;
-import com.sun.jersey.api.client.ClientRequest;
-import com.sun.jersey.api.client.ClientResponse;
-
-import java.util.logging.Logger;
/**
@@ -108,16 +113,26 @@ public class MessageProcessor implements Runnable {
NormalizedMessage requestMsg = inOut.getInMessage();
+ //TODO process request
JerseyClientWrapper clientWrapper = JerseyClientWrapper.getInstance();
- ClientRequest clientRequest = clientWrapper.buildClientRequest(component, requestMsg,
- outboundConfig);
+ // build method
+ String requestMethod = PropertiesUtil.safeGetProperty(requestMsg, NMProps.NM_METHOD_PROP);
+ if (requestMethod.length() == 0) {
+ requestMethod = outboundConfig.getMethod();
+ }
- ClientResponse clientResponse = clientWrapper.makeRequest(clientRequest, requestMsg,
- outboundConfig);
+ Invocation clientRequest = clientWrapper.buildClientRequest(component, requestMsg,
+ outboundConfig);
+
+ Response clientResponse = clientRequest.invoke();
+ // Response clientResponse = clientWrapper.makeRequest(clientRequest, requestMsg,
+ // outboundConfig);
NormalizedMessage replyMsg = inOut.createMessage();
- clientWrapper.buildNormalizedReplyMessage(replyMsg, clientRequest, clientResponse, outboundConfig);
+
+
+ clientWrapper.buildNormalizedReplyMessage(replyMsg, requestMethod, clientResponse, outboundConfig);
inOut.setOutMessage(replyMsg);
@@ -161,20 +176,20 @@ public class MessageProcessor implements Runnable {
}
NormalizedMessage requestMsg = inOnly.getInMessage();
-
+ /*
JerseyClientWrapper clientWrapper = JerseyClientWrapper.getInstance();
+
+ WebTarget target = clientWrapper.buildClientRequest(component, requestMsg, outboundConfig);
- ClientRequest clientRequest = clientWrapper.buildClientRequest(component, requestMsg, outboundConfig);
-
- ClientResponse clientResponse = clientWrapper.makeRequest(clientRequest, requestMsg,
+ Response clientResponse = clientWrapper.makeRequest(target, requestMsg,
outboundConfig);
if (clientResponse.getStatus() >= 400) {
- Exception e = new Exception("client response " + clientResponse.getResponseStatus());
+ Exception e = new Exception("client response " + clientResponse.getStatus());
inOnly.setError(e);
- } else {
+ } else {*/
inOnly.setStatus(ExchangeStatus.DONE);
- }
+ /*}*/
} catch (Exception e) {
String msg = I18n.loc("RESTBC-7075: error when processing MessageExchange: id={0}, {1}", inOnly.getExchangeId(), e);//NOI18N
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/NMProps.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/NMProps.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/NMProps.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/NMProps.java
index 632b18e84..8fc40f7b4
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/NMProps.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/NMProps.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
/**
* NMProps.java
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutboundConfiguration.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutboundConfiguration.java
old mode 100755
new mode 100644
similarity index 89%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutboundConfiguration.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutboundConfiguration.java
index 43cde80dc..5da408e44
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutboundConfiguration.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutboundConfiguration.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.util.ArrayList;
import java.util.Collections;
@@ -10,11 +10,11 @@ import java.util.Properties;
import javax.ws.rs.core.MediaType;
import javax.wsdl.Definition;
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
-import com.sun.jbi.restbc.jbiadapter.util.JsonUtil;
-import com.sun.jbi.restbc.jbiadapter.util.PropertiesUtil;
-import com.sun.jbi.restbc.jbiadapter.wsdl.RestOperation;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
+import net.openesb.jbi.restbc.jbiadapter.util.JsonUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.RestOperation;
/**
* OutboundConfiguration.java
@@ -35,6 +35,7 @@ public class OutboundConfiguration {
private final static String BASICAUTH_USERNAME_PROP = "basic-auth-username";
private final static String BASICAUTH_PASSWORD_PROP = "basic-auth-password";
private final static String MSG_TYPE = "message-type";
+ private final static String STRIP_NAMESPACES = "strip-namespaces";
private String url;
private String method;
@@ -54,6 +55,8 @@ public class OutboundConfiguration {
private RestOperation restOp;
private Definition definition;
private EndpointIdentifier endpointIdentifier;
+ // This property is only used in the case of a JSON output
+ private boolean stripNamespaces = false;
public OutboundConfiguration(Properties p,
ServiceUnit serviceUnit,
@@ -65,6 +68,7 @@ public class OutboundConfiguration {
this.restOp = restOp;
this.definition = definition;
this.endpointIdentifier = endpointIdentifier;
+
String appConfigName = endpointIdentifier.getApplicationConfigurationName();
if (appConfigName != null && appConfigName.length() > 0) {
@@ -95,6 +99,8 @@ public class OutboundConfiguration {
basicAuthPassword = PropertiesUtil.applyApplicationVariables(basicAuthPassword, runtimeConfig.retrieveApplicationVariablesMap());
msgType = PropertiesUtil.safeGetProperty(p, MSG_TYPE);
+ stripNamespaces = Boolean.parseBoolean(PropertiesUtil.safeGetProperty(p, STRIP_NAMESPACES, "false"));
+
}
/**
@@ -208,5 +214,11 @@ public class OutboundConfiguration {
public EndpointIdentifier getEndpointIdentifier() {
return endpointIdentifier;
}
+ /**
+ * @return the stripNamespaces
+ */
+ public boolean isStripNamespaces() {
+ return stripNamespaces;
+ }
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java
old mode 100755
new mode 100644
similarity index 80%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java
index af0f45144..2214432d4
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/OutstandingMsgExchangeContext.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
/**
* OutstandingMsgExchangeContext.java
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java
index 6ea343707..b23ad570d
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/PropertyServiceUnitConfig.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.io.File;
import java.io.FileInputStream;
@@ -13,9 +13,9 @@ import javax.jbi.component.ComponentContext;
import javax.jbi.servicedesc.ServiceEndpoint;
import javax.xml.namespace.QName;
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
-import com.sun.jbi.restbc.jbiadapter.util.PropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
/**
* PropertyServiceUnitConfig.java
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/Receiver.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/Receiver.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/Receiver.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/Receiver.java
index 559e774ca..fe8571711
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/Receiver.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/Receiver.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -7,15 +7,14 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.jbi.component.ComponentContext;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.MessagingException;
-import com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
/**
* Receiver.java
@@ -89,6 +88,7 @@ public class Receiver implements Runnable /*, NotificationListener */ {
thisThread.interrupt();
+ //TODO shudown listeners
/*
try {
runtimeConfig.removeNotificationListener(this);
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestBootstrap.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestBootstrap.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestBootstrap.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestBootstrap.java
index 67cf1dd26..696e5abf2
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestBootstrap.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestBootstrap.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -10,10 +10,11 @@ import javax.jbi.management.DeploymentException;
import javax.jbi.management.MBeanNames;
import javax.management.ObjectName;
+import net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
+
import com.sun.jbi.common.qos.config.ComponentConfig;
import com.sun.jbi.common.qos.config.ConfigPersistence;
import com.sun.jbi.common.util.MBeanHelper;
-import com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
/**
* RestBootstrap.java
@@ -87,3 +88,4 @@ public class RestBootstrap implements Bootstrap {
}
}
}
+
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestComponent.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestComponent.java
old mode 100755
new mode 100644
similarity index 55%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestComponent.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestComponent.java
index 0be001146..f219a82b4
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestComponent.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestComponent.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.io.File;
import java.util.HashMap;
@@ -20,22 +20,21 @@ import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
+import net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator;
+import net.openesb.jbi.restbc.jbiadapter.inbound.InboundHttpListener;
+import net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
+import net.openesb.jbi.restbc.jbiadapter.security.X509KeyManagerImpl;
+import net.openesb.jbi.restbc.jbiadapter.security.X509TrustManagerImpl;
+
+import org.glassfish.jersey.servlet.ServletContainer;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
-import com.sun.grizzly.SSLConfig;
-import com.sun.grizzly.http.servlet.ServletAdapter;
import com.sun.jbi.common.qos.config.ComponentConfig;
import com.sun.jbi.common.qos.config.ConfigPersistence;
import com.sun.jbi.configuration.RuntimeConfigurationHelper;
-import com.sun.jbi.restbc.jbiadapter.inbound.CharsetResponseFilter;
-import com.sun.jbi.restbc.jbiadapter.inbound.ContentLengthResponseFilter;
-import com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator;
-import com.sun.jbi.restbc.jbiadapter.inbound.InboundHttpListener;
-import com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig;
-import com.sun.jbi.restbc.jbiadapter.security.X509KeyManagerImpl;
-import com.sun.jbi.restbc.jbiadapter.security.X509TrustManagerImpl;
-import com.sun.jersey.spi.container.servlet.ServletContainer;
+import org.glassfish.grizzly.ssl.SSLContextConfigurator;
+import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
/**
* RestComponent.java
@@ -47,92 +46,113 @@ public class RestComponent implements Component, ComponentLifeCycle {
/*
* 1-20
*/
- private static final Logger logger = Logger.getLogger(RestComponent.class.getName());
-
-
+ private static final Logger logger = Logger.getLogger(RestComponent.class
+ .getName());
+
// SSL system properties
private static final String KEYSTORE_PROP = "javax.net.ssl.keyStore"; // NOI18N
private static final String KEYSTORE_PASS_PROP = "javax.net.ssl.keyStorePassword"; // NOI18N
private static final String TRUSTSTORE_PROP = "javax.net.ssl.trustStore"; // NOI18N
private static final String TRUSTSTORE_PASS_PROP = "javax.net.ssl.trustStorePassword"; // NOI18N
-
- private static final String KEYSTORE_PATH = "keystore.jks"; // NOI18N
+
+ private static final String KEYSTORE_PATH = "keystore.jks"; // NOI18N
private static final String TRUSTSTORE_PATH = "truststore.jks"; // NOI18N
-
- private Map listeners = new HashMap ();
-
+
+ private Map listeners = new HashMap();
+
private ComponentContext context;
private RestSUManager suManager;
private RuntimeConfig runtimeConfig;
private Receiver receiver;
private ComponentConfig compCfg;
- //private MBeanHelper mbeanHelper;
+ // private MBeanHelper mbeanHelper;
private RuntimeConfigurationHelper mRuntimeConfigHelper;
-
+
private InboundDelegator inboundDelegator;
-
+
// security
private SSLContext sslContext = null;
-
- ////////
- //
- // Component Interface Methods
- //
- ////////
- /* (non-Javadoc)
+ // //////
+ //
+ // Component Interface Methods
+ //
+ // //////
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.Component#getLifeCycle()
*/
public ComponentLifeCycle getLifeCycle() {
return this;
}
- /* (non-Javadoc)
- * @see javax.jbi.component.Component#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.jbi.component.Component#getServiceDescription(javax.jbi.servicedesc
+ * .ServiceEndpoint)
*/
public Document getServiceDescription(ServiceEndpoint se) {
// TODO Auto-generated method stub
return null;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.Component#getServiceUnitManager()
*/
public ServiceUnitManager getServiceUnitManager() {
return suManager;
}
- /* (non-Javadoc)
- * @see javax.jbi.component.Component#isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.jbi.component.Component#isExchangeWithConsumerOkay(javax.jbi.
+ * servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
*/
- public boolean isExchangeWithConsumerOkay(ServiceEndpoint se, MessageExchange me) {
+ public boolean isExchangeWithConsumerOkay(ServiceEndpoint se,
+ MessageExchange me) {
// TODO Auto-generated method stub
return false;
}
- /* (non-Javadoc)
- * @see javax.jbi.component.Component#isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.jbi.component.Component#isExchangeWithProviderOkay(javax.jbi.
+ * servicedesc.ServiceEndpoint, javax.jbi.messaging.MessageExchange)
*/
- public boolean isExchangeWithProviderOkay(ServiceEndpoint se, MessageExchange me) {
+ public boolean isExchangeWithProviderOkay(ServiceEndpoint se,
+ MessageExchange me) {
// TODO Auto-generated method stub
return false;
}
- /* (non-Javadoc)
- * @see javax.jbi.component.Component#resolveEndpointReference(org.w3c.dom.DocumentFragment)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.jbi.component.Component#resolveEndpointReference(org.w3c.dom.
+ * DocumentFragment)
*/
public ServiceEndpoint resolveEndpointReference(DocumentFragment df) {
// TODO Auto-generated method stub
return null;
}
- ////////
+ // //////
//
- // ComponentLifeCycle Interface Methods
+ // ComponentLifeCycle Interface Methods
//
- ////////
-
- /* (non-Javadoc)
+ // //////
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.ComponentLifeCycle#getExtensionMBeanName()
*/
public ObjectName getExtensionMBeanName() {
@@ -140,62 +160,72 @@ public class RestComponent implements Component, ComponentLifeCycle {
return null;
}
- /* (non-Javadoc)
- * @see javax.jbi.component.ComponentLifeCycle#init(javax.jbi.component.ComponentContext)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.jbi.component.ComponentLifeCycle#init(javax.jbi.component.
+ * ComponentContext)
*/
public void init(ComponentContext context) throws JBIException {
if (logger.isLoggable(Level.FINEST)) {
- String msg = I18n.lf("RESTBC-1001: ComponentLifeCycle.init() called.");//NOI18N
+ String msg = I18n
+ .lf("RESTBC-1001: ComponentLifeCycle.init() called.");// NOI18N
logger.finest(msg);
}
-
+
this.context = context;
this.suManager = new RestSUManager(this, context);
this.inboundDelegator = InboundDelegator.getInstance(this);
-
+
compCfg = ComponentConfig.parse(context.getInstallRoot());
ConfigPersistence.loadConfig(compCfg, context.getWorkspaceRoot());
runtimeConfig = new RuntimeConfig(context, compCfg);
-
- //mbeanHelper = new MBeanHelper(context);
- //mbeanHelper.registerMBean(RuntimeConfigurationMBean.CONFIGURATION_EXTENSION, runtimeConfig);
-
+
+ // mbeanHelper = new MBeanHelper(context);
+ // mbeanHelper.registerMBean(RuntimeConfigurationMBean.CONFIGURATION_EXTENSION,
+ // runtimeConfig);
try {
MBeanNames mbeanNames = context.getMBeanNames();
- ObjectName runtimeConfigMBeanObjName = mbeanNames.createCustomComponentMBeanName("Configuration");
- mRuntimeConfigHelper = new RuntimeConfigurationHelper(runtimeConfigMBeanObjName, context.getMBeanServer());
+ ObjectName runtimeConfigMBeanObjName = mbeanNames
+ .createCustomComponentMBeanName("Configuration");
+ mRuntimeConfigHelper = new RuntimeConfigurationHelper(
+ runtimeConfigMBeanObjName, context.getMBeanServer());
mRuntimeConfigHelper.registerMBean(runtimeConfig);
} catch (Exception e) {
throw new JBIException(e);
}
- initSSLContext();
-
+ //initSSLContext();
+
// start receiving from NMR
receiver = new Receiver(this, context, suManager, runtimeConfig);
receiver.startReceiving();
-
+
// send alert
- String[] info = I18n.locStr("RESTBC-5001: Initialized {0} successfully",
+ String[] info = I18n.locStr(
+ "RESTBC-5001: Initialized {0} successfully",
context.getComponentName());
logger.info(info[2]);
I18n.alertInfo(info);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.ComponentLifeCycle#shutDown()
*/
public void shutDown() throws JBIException {
if (logger.isLoggable(Level.FINEST)) {
- String msg = I18n.lf("RESTBC-1002: ComponentLifeCycle.shutdown() called.");//NOI18N
+ String msg = I18n
+ .lf("RESTBC-1002: ComponentLifeCycle.shutdown() called.");// NOI18N
logger.finest(msg);
}
-
+
if (context != null) {
context.getDeliveryChannel().close();
}
-
+
shutdownMBeans();
-
+
// send alert
String[] info = I18n.locStr("RESTBC-5002: Shut down {0} successfully",
context.getComponentName());
@@ -203,26 +233,29 @@ public class RestComponent implements Component, ComponentLifeCycle {
I18n.alertInfo(info);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.ComponentLifeCycle#start()
*/
public void start() throws JBIException {
if (logger.isLoggable(Level.FINEST)) {
- String msg = I18n.lf("RESTBC-1003: ComponentLifeCycle.start() called.");//NOI18N
+ String msg = I18n
+ .lf("RESTBC-1003: ComponentLifeCycle.start() called.");// NOI18N
logger.finest(msg);
}
-
+
try {
startHttpListener();
startHttpsListener();
-
+
} catch (Throwable t) {
String msg = I18n.loc("RESTBC-7003: {0} failed to start {1}",
context.getComponentName(), t.getMessage());
logger.log(Level.SEVERE, msg, t);
throw new JBIException(msg, t);
}
-
+
// send alert
String[] info = I18n.locStr("RESTBC-5003: Start {0} successfully",
context.getComponentName());
@@ -230,52 +263,53 @@ public class RestComponent implements Component, ComponentLifeCycle {
I18n.alertInfo(info);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.jbi.component.ComponentLifeCycle#stop()
*/
public void stop() throws JBIException {
if (logger.isLoggable(Level.FINEST)) {
- String msg = I18n.lf("RESTBC-1004: ComponentLifeCycle.stop() called.");//NOI18N
+ String msg = I18n
+ .lf("RESTBC-1004: ComponentLifeCycle.stop() called.");// NOI18N
logger.finest(msg);
}
try {
if (receiver != null) {
receiver.stopReceiving();
}
-
+
stopListeners();
-
+
} catch (Throwable t) {
String msg = I18n.loc("RESTBC-7004: {0} failed to stop {1}",
context.getComponentName(), t.getMessage());
logger.log(Level.SEVERE, msg, t);
throw new JBIException(msg, t);
}
-
+
// send alert
String[] info = I18n.locStr("RESTBC-5004: Stop {0} successfully",
context.getComponentName());
logger.info(info[2]);
I18n.alertInfo(info);
}
-
- ////////
- //
- // other methods
- //
- ////////
-
+
+ /**
+ * Initialise SSL configuration
+ */
private void initSSLContext() {
try {
String installRoot = context.getInstallRoot();
File installRootFile = new File(installRoot);
if (!installRootFile.isDirectory()) {
- String msg = I18n.loc("RESTBC-6001: Unable to initialize SSLContext, install root is not a directory {0}",
- installRootFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6001: Unable to initialize SSLContext, install root is not a directory {0}",
+ installRootFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// keystore file
File keystoreFile = null;
String keystoreSysProp = System.getProperty(KEYSTORE_PROP);
@@ -285,12 +319,13 @@ public class RestComponent implements Component, ComponentLifeCycle {
keystoreFile = new File(keystoreSysProp);
}
if (!keystoreFile.isFile()) {
- String msg = I18n.loc("RESTBC-6002: Unable to initialize SSLContext, keystore file is not a file {0}",
- keystoreFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6002: Unable to initialize SSLContext, keystore file is not a file {0}",
+ keystoreFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// truststore file
File truststoreFile = null;
String truststoreSysProp = System.getProperty(TRUSTSTORE_PROP);
@@ -300,95 +335,114 @@ public class RestComponent implements Component, ComponentLifeCycle {
truststoreFile = new File(truststoreSysProp);
}
if (!truststoreFile.isFile()) {
- String msg = I18n.loc("RESTBC-6003: Unable to initialize SSLContext, truststore file is not a file {0}",
- truststoreFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6003: Unable to initialize SSLContext, truststore file is not a file {0}",
+ truststoreFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// keystore password
char[] keystorePassword = null;
- String keystorePasswordSysProp = System.getProperty(KEYSTORE_PASS_PROP);
- if (keystorePasswordSysProp == null || keystorePasswordSysProp.length() == 0) {
- keystorePassword = runtimeConfig.getKeystorePassword().toCharArray();
+ String keystorePasswordSysProp = System
+ .getProperty(KEYSTORE_PASS_PROP);
+ if (keystorePasswordSysProp == null
+ || keystorePasswordSysProp.length() == 0) {
+ keystorePassword = runtimeConfig.getKeystorePassword()
+ .toCharArray();
} else {
keystorePassword = keystorePasswordSysProp.toCharArray();
}
-
+
// truststore password
char[] truststorePassword = null;
- String truststorePasswordSysProp = System.getProperty(TRUSTSTORE_PASS_PROP);
- if (truststorePasswordSysProp == null || truststorePasswordSysProp.length() == 0) {
- truststorePassword = runtimeConfig.getTruststorePassword().toCharArray();
+ String truststorePasswordSysProp = System
+ .getProperty(TRUSTSTORE_PASS_PROP);
+ if (truststorePasswordSysProp == null
+ || truststorePasswordSysProp.length() == 0) {
+ truststorePassword = runtimeConfig.getTruststorePassword()
+ .toCharArray();
} else {
truststorePassword = truststorePasswordSysProp.toCharArray();
}
-
- String msg = I18n.loc("RESTBC-4001: Initializing Keystore at location {0}", keystoreFile.toString());
+
+ String msg = I18n.loc(
+ "RESTBC-4001: Initializing Keystore at location {0}",
+ keystoreFile.toString());
logger.info(msg);
- KeyManager[] keyManager = new KeyManager[] {
- new X509KeyManagerImpl(keystoreFile, keystorePassword)
- };
-
- String msg2 = I18n.loc("RESTBC-4002: Initializing Truststore at location {0}", truststoreFile.toString());
+ KeyManager[] keyManager = new KeyManager[]{new X509KeyManagerImpl(
+ keystoreFile, keystorePassword)};
+
+ String msg2 = I18n.loc(
+ "RESTBC-4002: Initializing Truststore at location {0}",
+ truststoreFile.toString());
logger.info(msg2);
- TrustManager[] trustManager = new TrustManager[] {
- new X509TrustManagerImpl(truststoreFile, truststorePassword)
- };
-
- sslContext = SSLContext.getInstance("SSL"); // NOI18N
+ TrustManager[] trustManager = new TrustManager[]{new X509TrustManagerImpl(
+ truststoreFile, truststorePassword)};
+
+ sslContext = SSLContext.getInstance("SSL"); // NOI18N
sslContext.init(keyManager, trustManager, null);
-
+
} catch (Exception e) {
- String msg = I18n.loc("RESTBC-6004: Unable to initialize SSLContext {0}",
+ String msg = I18n.loc(
+ "RESTBC-6004: Unable to initialize SSLContext {0}",
e.getMessage());
logger.log(Level.WARNING, msg, e);
return;
}
}
-
+
private void shutdownMBeans() throws JBIException {
- //mbeanHelper.unregisterMBean(RuntimeConfigurationMBean.CONFIGURATION_EXTENSION);
+ // mbeanHelper.unregisterMBean(RuntimeConfigurationMBean.CONFIGURATION_EXTENSION);
try {
mRuntimeConfigHelper.unregisterMBean();
} catch (Exception e) {
throw new JBIException(e);
}
}
-
+
/*
* start HTTP listener
*/
private void startHttpListener() throws Exception {
- InboundHttpListener defaultHttpListener = new InboundHttpListener(InboundHttpListener.DEFAULT_LISTENER,
- runtimeConfig.getDefaultHttpListenerPort(), runtimeConfig.getDefaultHttpListenerThreads(), null);
-
- // install root JAXRS-POJO
- ServletAdapter adapter = new ServletAdapter();
- final Map initParams = new HashMap();
- initParams.put("com.sun.jersey.config.property.resourceConfigClass", "com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResourceApplication");
- initParams.put("com.sun.jersey.spi.container.ContainerResponseFilters",
- CharsetResponseFilter.class.getName() + ';' +
- ContentLengthResponseFilter.class.getName());
-
- for (Map.Entry e : initParams.entrySet()) {
- adapter.addInitParameter(e.getKey(), e.getValue());
- }
-
- adapter.setServletInstance(ServletContainer.class.newInstance());
-
- adapter.setContextPath("/");
-
- defaultHttpListener.registerContext("/", adapter);
-
+ // HttpServer httpServer = new HttpServer();
+ // NetworkListener networkListener = new
+ // NetworkListener("jaxws-listener", "0.0.0.0", PORT);
+ InboundHttpListener defaultHttpListener = new InboundHttpListener(
+ InboundHttpListener.DEFAULT_LISTENER,
+ runtimeConfig.getDefaultHttpListenerPort(),
+ runtimeConfig.getDefaultHttpListenerThreads(), null);
+
+ // install root JAXRS-POJO
+// ServletAdapter adapter = new ServletAdapter();
+// final Map initParams = new HashMap();
+//
+// initParams
+// .put("com.sun.jersey.config.property.resourceConfigClass",
+// "com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResourceApplication");
+// initParams.put("com.sun.jersey.spi.container.ContainerResponseFilters",
+// "com.sun.jbi.restbc.jbiadapter.inbound.CharsetResponseFilter");
+//
+// for (Map.Entry e : initParams.entrySet()) {
+// adapter.addInitParameter(e.getKey(), e.getValue());
+// }
+//
+// adapter.setServletInstance(ServletContainer.class.newInstance());
+//
+// adapter.setContextPath("/");
+//
+// defaultHttpListener.registerContext("/", adapter);
defaultHttpListener.start();
- listeners.put(defaultHttpListener.getListenerName(), defaultHttpListener);
-
- String msg = I18n.loc("RESTBC-4003: Started listener {0} at port {1}", defaultHttpListener.getListenerName(), defaultHttpListener.getPort());
+ listeners.put(defaultHttpListener.getListenerName(),
+ defaultHttpListener);
+
+ String msg = I18n.loc("RESTBC-4003: Started listener {0} at port {1}",
+ defaultHttpListener.getListenerName(),
+ defaultHttpListener.getPort());
logger.info(msg);
}
-
+
/*
* start HTTPS listener
*/
@@ -396,12 +450,13 @@ public class RestComponent implements Component, ComponentLifeCycle {
String installRoot = context.getInstallRoot();
File installRootFile = new File(installRoot);
if (!installRootFile.isDirectory()) {
- String msg = I18n.loc("RESTBC-6005: Unable to initialize SSLConfig, install root is not a directory {0}",
- installRootFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6005: Unable to initialize SSLConfig, install root is not a directory {0}",
+ installRootFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// keystore file
File keystoreFile = null;
String keystoreSysProp = System.getProperty(KEYSTORE_PROP);
@@ -411,12 +466,13 @@ public class RestComponent implements Component, ComponentLifeCycle {
keystoreFile = new File(keystoreSysProp);
}
if (!keystoreFile.isFile()) {
- String msg = I18n.loc("RESTBC-6006: Unable to initialize SSLConfig, keystore file is not a file {0}",
- keystoreFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6006: Unable to initialize SSLConfig, keystore file is not a file {0}",
+ keystoreFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// truststore file
File truststoreFile = null;
String truststoreSysProp = System.getProperty(TRUSTSTORE_PROP);
@@ -426,65 +482,107 @@ public class RestComponent implements Component, ComponentLifeCycle {
truststoreFile = new File(truststoreSysProp);
}
if (!truststoreFile.isFile()) {
- String msg = I18n.loc("RESTBC-6007: Unable to initialize SSLConfig, truststore file is not a file {0}",
- truststoreFile.toString());
+ String msg = I18n
+ .loc("RESTBC-6007: Unable to initialize SSLConfig, truststore file is not a file {0}",
+ truststoreFile.toString());
logger.log(Level.WARNING, msg);
return;
}
-
+
// keystore password
String keystorePassword = null;
String keystorePasswordSysProp = System.getProperty(KEYSTORE_PASS_PROP);
- if (keystorePasswordSysProp == null || keystorePasswordSysProp.length() == 0) {
+ if (keystorePasswordSysProp == null
+ || keystorePasswordSysProp.length() == 0) {
keystorePassword = runtimeConfig.getKeystorePassword();
} else {
keystorePassword = keystorePasswordSysProp;
}
-
+
// truststore password
String truststorePassword = null;
- String truststorePasswordSysProp = System.getProperty(TRUSTSTORE_PASS_PROP);
- if (truststorePasswordSysProp == null || truststorePasswordSysProp.length() == 0) {
+ String truststorePasswordSysProp = System
+ .getProperty(TRUSTSTORE_PASS_PROP);
+ if (truststorePasswordSysProp == null
+ || truststorePasswordSysProp.length() == 0) {
truststorePassword = runtimeConfig.getTruststorePassword();
} else {
truststorePassword = truststorePasswordSysProp;
}
-
- SSLConfig sslConfig = new SSLConfig();
- sslConfig.setKeyStoreFile(keystoreFile.getAbsolutePath());
- sslConfig.setKeyStorePass(keystorePassword);
- sslConfig.setTrustStoreFile(truststoreFile.getAbsolutePath());
- sslConfig.setTrustStorePass(truststorePassword);
-
- InboundHttpListener defaultHttpsListener = new InboundHttpListener(InboundHttpListener.DEFAULT_LISTENER_SSL,
- runtimeConfig.getDefaultHttpsListenerPort(), runtimeConfig.getDefaultHttpsListenerThreads(), sslConfig);
-
- // install root JAXRS-POJO
- ServletAdapter adapter = new ServletAdapter();
- final Map initParams = new HashMap();
- initParams.put("com.sun.jersey.config.property.resourceConfigClass", "com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResourceApplication");
- initParams.put("com.sun.jersey.spi.container.ContainerResponseFilters", "com.sun.jbi.restbc.jbiadapter.inbound.CharsetResponseFilter");
+ SSLContextConfigurator sslContextConfigurator = new SSLContextConfigurator();
+ sslContextConfigurator.setKeyStoreFile(keystoreFile.getAbsolutePath());
+ sslContextConfigurator.setKeyStorePass(keystorePassword);
+ sslContextConfigurator.setTrustStoreFile(truststoreFile.getAbsolutePath());
+ sslContextConfigurator.setTrustStorePass(truststorePassword);
+ sslContextConfigurator.setSecurityProtocol("TLSv1.2");
+
+ SSLEngineConfigurator sslEngineConfigurator =
+ new SSLEngineConfigurator(sslContextConfigurator);
- for (Map.Entry e : initParams.entrySet()) {
- adapter.addInitParameter(e.getKey(), e.getValue());
- }
-
- adapter.setServletInstance(ServletContainer.class.newInstance());
-
- adapter.setContextPath("/");
-
- defaultHttpsListener.registerContext("/", adapter);
+ sslEngineConfigurator
+ .setClientMode(false)
+ .setNeedClientAuth(runtimeConfig.isEnableClientAuth())
+ .setWantClientAuth(runtimeConfig.isEnableClientAuth());
+
+ InboundHttpListener defaultHttpsListener = new InboundHttpListener(
+ InboundHttpListener.DEFAULT_LISTENER_SSL,
+ runtimeConfig.getDefaultHttpsListenerPort(),
+ runtimeConfig.getDefaultHttpsListenerThreads(), sslEngineConfigurator);
defaultHttpsListener.start();
listeners.put(defaultHttpsListener.getListenerName(), defaultHttpsListener);
-
- String msg = I18n.loc("RESTBC-4003: Started listener {0} at port {1}", defaultHttpsListener.getListenerName(), defaultHttpsListener.getPort());
- logger.info(msg);
+
+ String msg =
+ I18n.loc("RESTBC-4003: Started listener {0} at port {1}",
+ defaultHttpsListener.getListenerName(),
+ defaultHttpsListener.getPort()); logger.info(msg);
+
+ /*
+ * SSLConfig sslConfig = new SSLConfig();
+ * sslConfig.setKeyStoreFile(keystoreFile.getAbsolutePath());
+ * sslConfig.setKeyStorePass(keystorePassword);
+ * sslConfig.setTrustStoreFile(truststoreFile.getAbsolutePath());
+ * sslConfig.setTrustStorePass(truststorePassword);
+ *
+ * InboundHttpListener defaultHttpsListener = new
+ * InboundHttpListener(InboundHttpListener.DEFAULT_LISTENER_SSL,
+ * runtimeConfig.getDefaultHttpsListenerPort(),
+ * runtimeConfig.getDefaultHttpsListenerThreads(), sslConfig);
+ *
+ * // install root JAXRS-POJO ServletAdapter adapter = new
+ * ServletAdapter(); final Map initParams = new
+ * HashMap();
+ *
+ * initParams.put("com.sun.jersey.config.property.resourceConfigClass",
+ * "com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResourceApplication"
+ * );
+ * initParams.put("com.sun.jersey.spi.container.ContainerResponseFilters"
+ * , "com.sun.jbi.restbc.jbiadapter.inbound.CharsetResponseFilter");
+ *
+ * for (Map.Entry e : initParams.entrySet()) {
+ * adapter.addInitParameter(e.getKey(), e.getValue()); }
+ *
+ * adapter.setServletInstance(ServletContainer.class.newInstance());
+ *
+ * adapter.setContextPath("/");
+ *
+ * defaultHttpsListener.registerContext("/", adapter);
+ *
+ * defaultHttpsListener.start();
+ * listeners.put(defaultHttpsListener.getListenerName(),
+ * defaultHttpsListener);
+ *
+ * String msg =
+ * I18n.loc("RESTBC-4003: Started listener {0} at port {1}",
+ * defaultHttpsListener.getListenerName(),
+ * defaultHttpsListener.getPort()); logger.info(msg);
+ */
}
-
+
private void stopListeners() {
- Iterator> iter = listeners.entrySet().iterator();
+ Iterator> iter = listeners
+ .entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = iter.next();
InboundHttpListener listener = entry.getValue();
@@ -492,28 +590,30 @@ public class RestComponent implements Component, ComponentLifeCycle {
try {
listener.stop();
} catch (Exception e) {
- String msg = I18n.loc("RESTBC-7005: {0} failed to stop HTTP listener {1}, {2}",
- context.getComponentName(), listener.getListenerName(), e.getMessage());
+ String msg = I18n
+ .loc("RESTBC-7005: {0} failed to stop HTTP listener {1}, {2}",
+ context.getComponentName(),
+ listener.getListenerName(), e.getMessage());
logger.log(Level.SEVERE, msg, e);
continue;
}
}
}
-
+
public InboundHttpListener getInboundHttpListener(String listenerName) {
return listeners.get(listenerName);
}
-
+
public String getInboundHttpListenerNameByPort(int port) {
for (InboundHttpListener listener : listeners.values()) {
if (listener.getPort() == port) {
return listener.getListenerName();
}
}
-
+
return null;
}
-
+
public SSLContext getSslContext() {
return sslContext;
}
@@ -521,13 +621,13 @@ public class RestComponent implements Component, ComponentLifeCycle {
public RuntimeConfig getRuntimeConfig() {
return runtimeConfig;
}
-
+
public RestSUManager getRestServiceUnitManager() {
return suManager;
}
-
+
public ComponentContext getComponentContext() {
return context;
}
-
+
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestSUManager.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestSUManager.java
old mode 100755
new mode 100644
similarity index 86%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestSUManager.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestSUManager.java
index cc504695b..abf08809f
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/RestSUManager.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/RestSUManager.java
@@ -1,5 +1,6 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
+import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
@@ -8,11 +9,15 @@ import java.util.logging.Logger;
import javax.jbi.component.ComponentContext;
import javax.jbi.component.ServiceUnitManager;
import javax.jbi.management.DeploymentException;
-import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
import javax.xml.namespace.QName;
+import net.openesb.jbi.restbc.jbiadapter.inbound.InboundHttpListener;
+import net.openesb.jbi.restbc.jbiadapter.inbound.ServiceUnitResourceConfig;
+
import com.sun.jbi.management.message.DefaultJBITaskMessageBuilder;
import com.sun.jbi.management.message.JBITaskMessageBuilder;
+import java.util.Iterator;
/**
* RestSUManager.java
@@ -25,6 +30,7 @@ public class RestSUManager implements ServiceUnitManager {
* 31-50
*/
private static final Logger logger = Logger.getLogger(RestSUManager.class.getName());
+ private static final String COMP_SUFFIX_NAME = "sun-rest-binding"; //NOI18N
private RestComponent component;
private ComponentContext context;
@@ -158,7 +164,14 @@ public class RestSUManager implements ServiceUnitManager {
ServiceUnit su = serviceUnits.get(serviceUnitName);
if (su != null) {
try {
- su.start();
+ Iterator ite = su.getInboundsConfigurations().iterator();
+ if (ite.hasNext()) {
+ String listenerName = ite.next().getHttpListenerName();
+ InboundHttpListener inboundHttpListener = component.getInboundHttpListener(listenerName);
+ inboundHttpListener.registerContext(getSUContextPath(su), new ServiceUnitResourceConfig(su));
+
+ su.start();
+ }
} catch (Exception ex) {
String msg = I18n.loc("RESTBC-7034: Error starting Service Unit {0} {1}", serviceUnitName, ex);//NOI18N
logger.severe(msg);
@@ -186,6 +199,15 @@ public class RestSUManager implements ServiceUnitManager {
}
}
+ /**
+ * Give the Service Unit context path.
+ *
+ * @param su Service Unit
+ * @return Service unit context path
+ */
+ protected String getSUContextPath(ServiceUnit su){
+ return "/"+su.getServiceUnitName().substring(0, su.getServiceUnitName().length()-(COMP_SUFFIX_NAME.length()+1));
+ }
/* (non-Javadoc)
* @see javax.jbi.component.ServiceUnitManager#stop(java.lang.String)
@@ -201,7 +223,14 @@ public class RestSUManager implements ServiceUnitManager {
ServiceUnit su = serviceUnits.get(serviceUnitName);
if (su != null) {
try {
- su.stop();
+ Iterator ite = su.getInboundsConfigurations().iterator();
+ if (ite.hasNext()) {
+ String listenerName = ite.next().getHttpListenerName();
+ InboundHttpListener inboundHttpListener = component.getInboundHttpListener(listenerName);
+ inboundHttpListener.unregisterContext(getSUContextPath(su));
+
+ su.stop();
+ }
} catch (Exception ex) {
String msg = I18n.loc("RESTBC-7036: Error stopping Service Unit {0} {1}", serviceUnitName, ex);//NOI18N
logger.severe(msg);
@@ -255,9 +284,11 @@ public class RestSUManager implements ServiceUnitManager {
return null;
}
- public InboundConfiguration findInboundConfiguration(String listenerName, HttpHeaders headers, String method, String path) {
+
+
+ public InboundConfiguration findInboundConfiguration(String listenerName, MediaType contentType, List acceptMediaTypes, String method, String path) {
for (ServiceUnit su : serviceUnits.values()) {
- InboundConfiguration inboundConfig = su.findInboundConfiguration(listenerName, headers, method, path);
+ InboundConfiguration inboundConfig = su.findInboundConfiguration(listenerName, contentType, acceptMediaTypes, method, path);
if (inboundConfig != null) {
return inboundConfig;
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnit.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnit.java
old mode 100755
new mode 100644
similarity index 83%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnit.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnit.java
index c6a9d5deb..37b4fee89
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnit.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnit.java
@@ -1,9 +1,10 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -12,20 +13,22 @@ import java.util.logging.Logger;
import javax.jbi.JBIException;
import javax.jbi.component.ComponentContext;
-import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
import javax.xml.namespace.QName;
-import org.xml.sax.EntityResolver;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.Provides;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
+import net.openesb.jbi.restbc.jbiadapter.inbound.JaxrsPojoServiceUnit;
+import net.openesb.jbi.restbc.jbiadapter.util.PathUtil;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLServiceUnitConfig;
+
import org.apache.xml.resolver.CatalogManager;
import org.apache.xml.resolver.tools.CatalogResolver;
+import org.xml.sax.EntityResolver;
+
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.descriptor.Provides;
-import com.sun.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
-import com.sun.jbi.restbc.jbiadapter.inbound.JaxrsPojoServiceUnit;
-import com.sun.jbi.restbc.jbiadapter.util.PathUtil;
-import com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint;
-import com.sun.jbi.restbc.jbiadapter.wsdl.WSDLServiceUnitConfig;
/**
* ServiceUnit.java
@@ -211,6 +214,9 @@ public class ServiceUnit {
public String getServiceUnitName() {
return serviceUnitName;
}
+ public String getServiceUnitRootPath() {
+ return serviceUnitRootPath;
+ }
public synchronized OutboundConfiguration findActivatedEndpointOutbound(QName serviceName, String endpointName, QName operationName) {
for (ServiceUnitConfig suConfig : suConfigs) {
@@ -235,14 +241,42 @@ public class ServiceUnit {
return null;
}
- public synchronized InboundConfiguration findInboundConfiguration(String listenerName, HttpHeaders headers, String method, String path) {
+ /**
+ * Give all the inbounds configurations for the serviceUnit
+ *
+ * @return serviceUnit inbounds configurations.
+ */
+ public synchronized Collection getInboundsConfigurations(){
+ List inboundsConfigs = new ArrayList();
+
+ for (ServiceUnitConfig suConfig : suConfigs) {
+ if (suConfig instanceof PropertyServiceUnitConfig) {
+ PropertyServiceUnitConfig propertySUConfig = (PropertyServiceUnitConfig) suConfig;
+ if (!propertySUConfig.isOutbound() && propertySUConfig.getInboundConfiguration() != null) {
+ inboundsConfigs.add(propertySUConfig.getInboundConfiguration());
+ }
+
+ } else if (suConfig instanceof WSDLEndpoint) {
+ WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) suConfig;
+ if (!wsdlEndpoint.isOutbound() && wsdlEndpoint.getInboundsConfigs() != null) {
+ inboundsConfigs.addAll( wsdlEndpoint.getInboundsConfigs());
+ }
+
+ }
+ }
+
+ return inboundsConfigs;
+ }
+
+
+ public synchronized InboundConfiguration findInboundConfiguration(String listenerName, MediaType contentType, List acceptMediaTypes, String method, String path) {
for (ServiceUnitConfig suConfig : suConfigs) {
if (suConfig instanceof PropertyServiceUnitConfig) {
PropertyServiceUnitConfig propertySUConfig = (PropertyServiceUnitConfig) suConfig;
if (!propertySUConfig.isOutbound()) {
InboundConfiguration inboundConfig = propertySUConfig.getInboundConfiguration();
if (inboundConfig.getHttpListenerName().equals(listenerName)) {
- if (PathUtil.matchInboundConfiguration(inboundConfig, headers, method, path)) {
+ if (PathUtil.matchInboundConfiguration(inboundConfig, contentType, acceptMediaTypes, method, path)) {
return inboundConfig;
}
}
@@ -251,7 +285,7 @@ public class ServiceUnit {
} else if (suConfig instanceof WSDLEndpoint) {
WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) suConfig;
if (!wsdlEndpoint.isOutbound()) {
- InboundConfiguration inboundConfig = wsdlEndpoint.findInboundConfig(listenerName, headers, method, path);
+ InboundConfiguration inboundConfig = wsdlEndpoint.findInboundConfig(listenerName, contentType, acceptMediaTypes, method, path);
if (inboundConfig != null) {
return inboundConfig;
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnitConfig.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnitConfig.java
old mode 100755
new mode 100644
similarity index 88%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnitConfig.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnitConfig.java
index e34c7a3d4..a64de21ee
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/ServiceUnitConfig.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/ServiceUnitConfig.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter;
+package net.openesb.jbi.restbc.jbiadapter;
import javax.xml.namespace.QName;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java
index 3b2e56af1..4f20a8b48
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/ConfigurationException.java
@@ -28,7 +28,7 @@
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
/**
* An exception occurred in handling the SU JBI descriptor
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Consumes.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Consumes.java
old mode 100755
new mode 100644
similarity index 89%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Consumes.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Consumes.java
index 1468b6876..63b847aa7
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Consumes.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Consumes.java
@@ -28,7 +28,7 @@
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
import java.util.ArrayList;
import java.util.Collections;
@@ -39,11 +39,11 @@ import javax.xml.namespace.QName;
/**
* Represents a service unit descriptor entry for , for example for
*
- *
*
*/
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java
index f1caeac1a..1ad7aafd0
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/EndpointIdentifier.java
@@ -28,7 +28,7 @@
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
import java.util.List;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Filter.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Filter.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Filter.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Filter.java
index de4bbbe06..f798c72c9
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Filter.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Filter.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
import java.util.Collections;
import java.util.HashMap;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Provides.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Provides.java
old mode 100755
new mode 100644
similarity index 91%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Provides.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Provides.java
index d12e2808b..d9ff44644
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/Provides.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/Provides.java
@@ -28,7 +28,7 @@
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
import java.util.ArrayList;
import java.util.Collections;
@@ -39,11 +39,11 @@ import javax.xml.namespace.QName;
/**
* Represents a service unit descriptor entry for , for example for
*
- *
+ * interface-name=â€ifns:Test2PortTypeâ€
+ * service-name=â€servicens:PartnerLinkâ€
+ * endpoint-name=â€Test2ServerRoleâ€/>
*
*/
public class Provides implements EndpointIdentifier {
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java
index b8d09f281..cb0295ac4
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/descriptor/RestSUDescriptor.java
@@ -28,7 +28,7 @@
* END_HEADER - DO NOT EDIT
*/
-package com.sun.jbi.restbc.jbiadapter.descriptor;
+package net.openesb.jbi.restbc.jbiadapter.descriptor;
import java.io.File;
import java.io.IOException;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/InboundDelegator.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundDelegator.java
old mode 100755
new mode 100644
similarity index 82%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/InboundDelegator.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundDelegator.java
index 08398a578..4e6f46db5
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/InboundDelegator.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundDelegator.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
+package net.openesb.jbi.restbc.jbiadapter.inbound;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -24,33 +24,37 @@ import javax.jbi.messaging.MessageExchangeFactory;
import javax.jbi.messaging.NormalizedMessage;
import javax.jbi.servicedesc.ServiceEndpoint;
import javax.mail.util.ByteArrayDataSource;
-import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.ResponseBuilder;
import javax.wsdl.Definition;
import javax.wsdl.OperationType;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
+import net.openesb.jbi.restbc.jbiadapter.I18n;
+import net.openesb.jbi.restbc.jbiadapter.InboundConfiguration;
+import net.openesb.jbi.restbc.jbiadapter.NMProps;
+import net.openesb.jbi.restbc.jbiadapter.RestComponent;
+import net.openesb.jbi.restbc.jbiadapter.org.json.JSONObject;
+import net.openesb.jbi.restbc.jbiadapter.org.json.XML;
+import net.openesb.jbi.restbc.jbiadapter.util.JbiMessageUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.JsonUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.MediaTypeUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.NMPropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PathUtil;
+import net.openesb.jbi.restbc.jbiadapter.util.PropertiesUtil;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.RestOperation;
+
+import org.glassfish.jersey.uri.UriTemplate;
+
import com.sun.jbi.common.qos.ServiceQuality;
import com.sun.jbi.common.qos.messaging.BaseMessagingChannel;
import com.sun.jbi.common.qos.messaging.MessagingChannel;
-import com.sun.jbi.restbc.jbiadapter.I18n;
-import com.sun.jbi.restbc.jbiadapter.InboundConfiguration;
-import com.sun.jbi.restbc.jbiadapter.NMProps;
-import com.sun.jbi.restbc.jbiadapter.RestComponent;
-import com.sun.jbi.restbc.jbiadapter.util.JbiMessageUtil;
-import com.sun.jbi.restbc.jbiadapter.util.JsonUtil;
-import com.sun.jbi.restbc.jbiadapter.util.MediaTypeUtil;
-import com.sun.jbi.restbc.jbiadapter.util.NMPropertiesUtil;
-import com.sun.jbi.restbc.jbiadapter.util.PathUtil;
-import com.sun.jbi.restbc.jbiadapter.util.PropertiesUtil;
-import com.sun.jbi.restbc.jbiadapter.wsdl.RestOperation;
-import com.sun.jersey.api.uri.UriTemplate;
-import javax.jbi.messaging.Fault;
/**
* InboundDelegator.java
@@ -83,21 +87,41 @@ public class InboundDelegator {
return instance;
}
+ public ResponseBuilder delegateRequest(ContainerRequestContext requestContext) throws Exception {
+
+ return delegateRequest(
+ requestContext.getMethod(),
+ requestContext.getUriInfo(),
+ requestContext.getHeaders(),
+ requestContext.getMediaType(),
+ requestContext.getAcceptableMediaTypes(),
+ requestContext.getAcceptableLanguages(),
+ requestContext.getSecurityContext(),
+ requestContext.getEntityStream()
+ );
+ }
public ResponseBuilder delegateRequest(
String method,
UriInfo uriInfo,
- HttpHeaders headers,
+ MultivaluedMap headers,
+ MediaType mediaType,
+ List acceptableMediaTypes,
+ List acceptableLanguages,
SecurityContext security,
InputStream payload) throws Exception {
- URI requestURI = uriInfo.getRequestUri();
+ URI requestURI = uriInfo.getRequestUri();
int port = requestURI.getPort();
String listenerName = component.getInboundHttpListenerNameByPort(port);
String path = requestURI.getPath();
+ //test
+ path = path.substring(1);
+ path = path.substring(path.indexOf("/"));
+
InboundConfiguration inboundConfig =
- component.getRestServiceUnitManager().findInboundConfiguration(listenerName, headers, method, path);
+ component.getRestServiceUnitManager().findInboundConfiguration(listenerName, mediaType, acceptableMediaTypes, method, path);
if (inboundConfig == null) {
String msg = I18n.loc("RESTBC-7111: Request URL {0} does not match any ServiceUnit with listenerName={1}", requestURI.toString(), listenerName);//NOI18N
logger.severe(msg);
@@ -130,8 +154,7 @@ public class InboundDelegator {
// has WSDL configuration
Source requestContent = null;
- if (payload != null && headers.getMediaType() != null) {
- MediaType mediaType = headers.getMediaType();
+ if (payload != null && mediaType != null) {
if (PathUtil.isXMLMediaType(mediaType) && !inboundConfig.isForwardAsAttachment()) {
// this is XML content and don't forward as attachment
requestContent = JbiMessageUtil.createJbiWrappedMsg(payload, restOp, definition, false);
@@ -144,8 +167,12 @@ public class InboundDelegator {
sb.append(currentString);
currentString = reader.readLine();
}
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new com.sun.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
- String xmlString = com.sun.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
+ String xmlString = "";
+ //If not a GET method
+ if(!sb.toString().isEmpty()){
+ JSONObject jsonObject = new JSONObject(sb.toString());
+ xmlString = XML.toString(jsonObject);
+ }
requestContent = JbiMessageUtil.createJbiWrappedMsg(xmlString, restOp, definition, false);
} else {
// treat as attachment
@@ -170,8 +197,7 @@ public class InboundDelegator {
} catch (IllegalArgumentException iae) {
// ignore
}
- if (payload != null && headers.getMediaType() != null) {
- MediaType mediaType = headers.getMediaType();
+ if (payload != null && mediaType != null) {
if (PathUtil.isXMLMediaType(mediaType) && !inboundConfig.isForwardAsAttachment()) {
// this is XML content and don't forward as attachment
requestContent = JbiMessageUtil.createJbiWrappedMsg(msgType, payload);
@@ -184,8 +210,8 @@ public class InboundDelegator {
sb.append(currentString);
currentString = reader.readLine();
}
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject = new com.sun.jbi.restbc.jbiadapter.org.json.JSONObject(sb.toString());
- String xmlString = com.sun.jbi.restbc.jbiadapter.org.json.XML.toString(jsonObject);
+ JSONObject jsonObject = new JSONObject(sb.toString());
+ String xmlString = XML.toString(jsonObject);
requestContent = JbiMessageUtil.createJbiWrappedMsg(msgType, new ByteArrayInputStream(xmlString.getBytes()));
} else {
// treat as attachment
@@ -207,8 +233,8 @@ public class InboundDelegator {
// populate NM properties
requestMsg.setProperty(NMProps.NM_URL_PROP, requestURI.toString());
requestMsg.setProperty(NMProps.NM_METHOD_PROP, method);
- if (payload != null && headers.getMediaType() != null) {
- requestMsg.setProperty(NMProps.NM_CONTENT_TYPE_PROP, MediaTypeUtil.mediaTypeToString(headers.getMediaType()));
+ if (payload != null && mediaType != null) {
+ requestMsg.setProperty(NMProps.NM_CONTENT_TYPE_PROP, MediaTypeUtil.mediaTypeToString(mediaType));
}
// querys
@@ -231,20 +257,20 @@ public class InboundDelegator {
NMPropertiesUtil.setDynamicNMProperties(requestMsg, NMProps.NM_PATH_PARAMS_PROP, pathParamMap);
// headers
- Map headerMap = NMPropertiesUtil.multivaluedMapToMap(headers.getRequestHeaders());
+ Map headerMap = NMPropertiesUtil.multivaluedMapToMap(headers);
requestMsg.setProperty(NMProps.NM_HEADERS_PROP, JsonUtil.buildJson(headerMap));
NMPropertiesUtil.setDynamicNMProperties(requestMsg, NMProps.NM_HEADERS_PROP, headerMap);
// accept-types
List acceptTypeList = new ArrayList ();
- for (MediaType entry : headers.getAcceptableMediaTypes()) {
+ for (MediaType entry : acceptableMediaTypes) {
acceptTypeList.add(MediaTypeUtil.mediaTypeToString(entry));
}
requestMsg.setProperty(NMProps.NM_ACCEPT_TYPES_PROP, JsonUtil.buildJson(acceptTypeList));
// accept-languages
List acceptLanguageList = new ArrayList ();
- for (Locale entry : headers.getAcceptableLanguages()) {
+ for (Locale entry : acceptableLanguages) {
acceptLanguageList.add(entry.toString());
}
requestMsg.setProperty(NMProps.NM_ACCEPT_LANGUAGES_PROP, JsonUtil.buildJson(acceptLanguageList));
@@ -308,17 +334,15 @@ public class InboundDelegator {
boolean isContentTypeSet = false;
if (responsePayload != null) { // NOI18N
- String content = "";
- boolean isDataHandler = false;
-
if (responsePayload instanceof Source) {
Source xmlPayload = (Source) responsePayload;
-
- List acceptableMediaTypes = headers.getAcceptableMediaTypes();
- if (acceptableMediaTypes.isEmpty()) {
+
+ if (acceptableMediaTypes.size() == 0) {
// if accept header not present, return entity as XML
if (!method.equalsIgnoreCase("head")) {
- content = JbiMessageUtil.convertXmlToString(xmlPayload);
+ responseBuilder.entity(JbiMessageUtil.convertXmlToString(xmlPayload));
+ } else {
+ responseBuilder.entity("");
}
responseBuilder.type(MediaType.APPLICATION_XML_TYPE);
isContentTypeSet = true;
@@ -326,7 +350,9 @@ public class InboundDelegator {
for (MediaType acceptableMediaType : acceptableMediaTypes) {
if (PathUtil.isXMLMediaType(acceptableMediaType)) {
if (!method.equalsIgnoreCase("head")) {
- content = JbiMessageUtil.convertXmlToString(xmlPayload);
+ responseBuilder.entity(JbiMessageUtil.convertXmlToString(xmlPayload));
+ } else {
+ responseBuilder.entity("");
}
String retMediaType = acceptableMediaType.isWildcardType() ? "application" : acceptableMediaType.getType();
String retMediaSubType = acceptableMediaType.isWildcardSubtype() ? "xml" : acceptableMediaType.getSubtype();
@@ -338,13 +364,16 @@ public class InboundDelegator {
String xmlPayloadAsString = JbiMessageUtil.convertXmlToString(xmlPayload,
inboundConfig.isStripNamespaces());
- com.sun.jbi.restbc.jbiadapter.org.json.JSONObject jsonObject =
- com.sun.jbi.restbc.jbiadapter.org.json.XML.toJSONObject(xmlPayloadAsString);
+ JSONObject jsonObject = XML.toJSONObject(xmlPayloadAsString);
if (jsonObject != null) {
- content = jsonObject.toString();
+ jsonObject = jsonObject.getJSONObject(JSONObject.getNames(jsonObject)[0]); //Primer objet not require
+ responseBuilder.entity(jsonObject.toString());
} else {
- content = xmlPayloadAsString;
+ //TODO
+ responseBuilder.entity(xmlPayloadAsString);
}
+ } else {
+ responseBuilder.entity("");
}
String retMediaType = acceptableMediaType.isWildcardType() ? "application" : acceptableMediaType.getType();
String retMediaSubType = acceptableMediaType.isWildcardSubtype() ? "json" : acceptableMediaType.getSubtype();
@@ -353,7 +382,9 @@ public class InboundDelegator {
break;
} else {
if (!method.equalsIgnoreCase("head")) {
- content = JbiMessageUtil.convertXmlToString(xmlPayload);
+ responseBuilder.entity(JbiMessageUtil.convertXmlToString(xmlPayload));
+ } else {
+ responseBuilder.entity("");
}
break;
}
@@ -363,7 +394,8 @@ public class InboundDelegator {
if (!method.equalsIgnoreCase("head")) {
DataHandler streamPayload = (DataHandler) responsePayload;
responseBuilder.entity(streamPayload.getInputStream());
- isDataHandler = true;
+ } else {
+ responseBuilder.entity("");
}
}
@@ -380,11 +412,6 @@ public class InboundDelegator {
}
}
}
-
- if (! isDataHandler) {
- responseBuilder.entity(content);
- responseBuilder.header("X-Content-Length", Integer.toString(content.length()));
- }
}
Map responseHeaderMap = NMPropertiesUtil.getDynamicNMProperties(replyMsg, NMProps.NM_RESPONSE_HEADERS_PROP);
diff --git a/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundHttpListener.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundHttpListener.java
new file mode 100644
index 000000000..590ce9470
--- /dev/null
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/InboundHttpListener.java
@@ -0,0 +1,105 @@
+package net.openesb.jbi.restbc.jbiadapter.inbound;
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.core.Application;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.glassfish.grizzly.http.server.HttpHandler;
+import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.grizzly.http.server.NetworkListener;
+import org.glassfish.grizzly.http.server.ServerConfiguration;
+import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
+import org.glassfish.grizzly.threadpool.ThreadPoolConfig;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
+import org.glassfish.jersey.server.ContainerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+
+/**
+ * InboundHttpListener.java
+ *
+ * @author Edward Chou
+ */
+public class InboundHttpListener {
+
+ public static final String DEFAULT_LISTENER = "default-listener"; // NOI18N
+ public static final String DEFAULT_LISTENER_SSL = "default-listener-ssl"; // NOI18N
+
+ private final String listenerName;
+ private final int port;
+ private final HttpServer webServer;
+
+ private Map contextMap = new HashMap();
+
+ private static URI getBaseURI(int port) {
+ return UriBuilder.fromUri("http://localhost/")
+ .host(NetworkListener.DEFAULT_NETWORK_HOST)
+ .port(port)
+ .build();
+ }
+
+ public InboundHttpListener(String listenerName, int port, int numThreads, SSLEngineConfigurator sslEngineConfigurator) {
+ this.listenerName = listenerName;
+ this.port = port;
+
+ ThreadPoolConfig config = ThreadPoolConfig.defaultConfig().
+ setCorePoolSize(numThreads).
+ setMaxPoolSize(numThreads);
+ webServer = GrizzlyHttpServerFactory.createHttpServer(getBaseURI(port), false);
+
+ // assign the thread pool
+ NetworkListener listener = webServer.getListeners().iterator().next();
+ listener.getTransport().setWorkerThreadPoolConfig(config);
+
+ // Assign security if needed
+ if (sslEngineConfigurator != null) {
+ listener.setSecure(true);
+ listener.setSSLEngineConfig(sslEngineConfigurator);
+ }
+ }
+
+ public void start() throws Exception {
+ webServer.start();
+ }
+
+ public void stop() throws Exception {
+ webServer.shutdownNow();
+ }
+
+ public synchronized void registerContext(String context, Application application) throws Exception {
+ if (contextMap.containsKey(context)) {
+ throw new Exception("context already exists: " + context);
+ }
+ final ServerConfiguration config = webServer.getServerConfiguration();
+ HttpHandler handler = ContainerFactory.createContainer(HttpHandler.class, application);
+ config.addHttpHandler(handler, context);
+
+ contextMap.put(context, handler);
+ }
+
+ public synchronized void unregisterContext(String context) throws Exception {
+ HttpHandler removedValue = contextMap.remove(context);
+ if (removedValue == null) {
+ throw new Exception("context did not exist: " + context);
+ }
+
+ webServer.getServerConfiguration().removeHttpHandler(removedValue);
+ }
+
+ /**
+ * @return the listenerName
+ */
+ public String getListenerName() {
+ return listenerName;
+ }
+
+ /**
+ * @return the port
+ */
+ public int getPort() {
+ return port;
+ }
+
+}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java
old mode 100755
new mode 100644
similarity index 89%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java
index 21b86613b..29d07ea24
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/JaxrsPojoServiceUnit.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.inbound;
+package net.openesb.jbi.restbc.jbiadapter.inbound;
import java.io.File;
import java.io.FileInputStream;
@@ -13,10 +13,10 @@ import java.util.logging.Logger;
import javax.jbi.component.ComponentContext;
import javax.xml.namespace.QName;
-import com.sun.grizzly.http.servlet.ServletAdapter;
-import com.sun.jbi.restbc.jbiadapter.RestComponent;
-import com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig;
-import com.sun.jersey.spi.container.servlet.ServletContainer;
+import net.openesb.jbi.restbc.jbiadapter.RestComponent;
+import net.openesb.jbi.restbc.jbiadapter.ServiceUnitConfig;
+
+import org.glassfish.jersey.servlet.ServletContainer;
/**
* JaxrsPojoServiceUnit.java
@@ -78,9 +78,10 @@ public class JaxrsPojoServiceUnit implements ServiceUnitConfig {
throw new Exception("cannot find listener with name: " + listenerName);
}
+ //TODO
// register contextRoot
- ServletAdapter servletAdapter = createServletAdapter();
- listener.registerContext(contextRoot, servletAdapter);
+ // ServletAdapter servletAdapter = createServletAdapter();
+ // listener.registerContext(contextRoot, servletAdapter);
}
public void stop() throws Exception {
@@ -99,7 +100,7 @@ public class JaxrsPojoServiceUnit implements ServiceUnitConfig {
}
- private ServletAdapter createServletAdapter() throws Exception {
+ /* private ServletAdapter createServletAdapter() throws Exception {
ServletAdapter adapter = new ServletAdapter();
final Map initParams = new HashMap();
@@ -115,7 +116,7 @@ public class JaxrsPojoServiceUnit implements ServiceUnitConfig {
adapter.setContextPath(contextRoot);
return adapter;
- }
+ }*/
/* (non-Javadoc)
* @see com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig#getEndpointName()
diff --git a/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java
new file mode 100644
index 000000000..c0378890f
--- /dev/null
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/inbound/ServiceUnitResourceConfig.java
@@ -0,0 +1,100 @@
+package net.openesb.jbi.restbc.jbiadapter.inbound;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Collection;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+
+import net.openesb.jbi.restbc.jbiadapter.I18n;
+import net.openesb.jbi.restbc.jbiadapter.InboundConfiguration;
+import net.openesb.jbi.restbc.jbiadapter.ServiceUnit;
+
+import org.glassfish.jersey.process.Inflector;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.model.Resource;
+import org.glassfish.jersey.server.model.ResourceMethod;
+
+/**
+ * Service resource for service units.
+ *
+ * @author Loic DASSONVILLE (ldassonville at gmail.com)
+ * @author David BRASSELY (brasseld at gmail.com)
+ * @author OpenESB Community
+ *
+ */
+public class ServiceUnitResourceConfig extends ResourceConfig {
+
+ /*
+ * 101-110
+ */
+ private final static Logger logger = Logger.getLogger(ServiceUnitResourceConfig.class.getName());
+
+ /**
+ * Generate a JBI REST resource configuration for the given Service Unit.
+ *
+ * @param serviceUnit ServiceUnit to generate resource configuration.
+ *
+ */
+ public ServiceUnitResourceConfig(ServiceUnit serviceUnit) {
+ Collection configurations = serviceUnit.getInboundsConfigurations();
+
+ for (InboundConfiguration inboundConfiguration : configurations) {
+ final Resource resource = build(inboundConfiguration);
+ registerResources(resource);
+ }
+ }
+
+ private Resource build(InboundConfiguration inboundConfiguration) {
+ final Resource.Builder resourceBuilder = Resource.builder();
+ resourceBuilder.path(inboundConfiguration.getPathTemplate().getTemplate());
+
+ final ResourceMethod.Builder methodBuilder = resourceBuilder.addMethod(inboundConfiguration.getMethod());
+ methodBuilder.produces(inboundConfiguration.getProduceMediaTypes())
+ .handledBy(new Inflector() {
+
+ @Override
+ public Response apply(ContainerRequestContext containerRequestContext) {
+
+ if (logger.isLoggable(Level.FINEST)) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("\n");
+ sb.append(" URI: ").append(containerRequestContext.getUriInfo().getRequestUri().toString()).append("\n");
+ sb.append(" Method: ").append(containerRequestContext.getMethod()).append("\n");
+ sb.append(" Headers: ").append(containerRequestContext.getHeaders()).append("\n");
+
+ String msg = I18n.lf("RESTBC-1101: Inbound Request: {0}", sb.toString());//NOI18N
+ logger.finest(msg);
+ }
+
+ InboundDelegator inboundDelegator = InboundDelegator.getInstance();
+ if (inboundDelegator == null) {
+ String msg = I18n.loc("RESTBC-7101: Inbound delegator not initialized yet");
+ logger.severe(msg);
+ ResponseBuilder responseBuilder = Response.serverError();
+ responseBuilder.entity(msg);
+ return responseBuilder.build();
+ }
+
+ try {
+ ResponseBuilder responseBuilder = inboundDelegator.delegateRequest(containerRequestContext);
+ return responseBuilder.build();
+ } catch (Exception e) {
+
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ //TODO
+ String msg = I18n.lf("RESTBC-???: Inbound Request error: {0}", sw.toString());//NOI18N
+ logger.severe(msg);
+ return Response.serverError().entity(msg).build();
+ }
+ }
+ });
+
+ return resourceBuilder.build();
+ }
+}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java
index 9a1df770b..b0220c9bf
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfig.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.mbeans;
+package net.openesb.jbi.restbc.jbiadapter.mbeans;
import java.io.File;
import java.io.FileInputStream;
@@ -34,10 +34,11 @@ import javax.management.openmbean.TabularData;
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
+import net.openesb.jbi.restbc.jbiadapter.I18n;
+
import com.sun.jbi.common.qos.config.AbstractConfigMBean;
import com.sun.jbi.common.qos.config.ComponentConfig;
import com.sun.jbi.component.jbiext.KeyStoreUtilClient;
-import com.sun.jbi.restbc.jbiadapter.I18n;
/**
* RuntimeConfigImpl.java
@@ -60,7 +61,7 @@ public class RuntimeConfig extends AbstractConfigMBean implements RuntimeConfigM
private String truststorePassword = "changeit";
private String keystorePassword = "changeit";
private boolean enableHostnameVerifier = false;
-
+ private boolean enableClientAuth = false;
private ComponentContext ctx;
@@ -281,6 +282,24 @@ public class RuntimeConfig extends AbstractConfigMBean implements RuntimeConfigM
persistCfg();
this.enableHostnameVerifier = enableHostnameVerifier;
}
+
+ @Override
+ public Boolean isEnableClientAuth() {
+ String strVal = getConfig().getProperty(ENABLE_CLIENT_AUTH).getValue();
+ try {
+ enableClientAuth = Boolean.valueOf(strVal);
+ } catch (Exception e){
+ // ignore
+ }
+ return enableClientAuth;
+ }
+
+ @Override
+ public void setEnableClientAuth(Boolean enableClientAuth) {
+ getConfig().getProperty(ENABLE_CLIENT_AUTH).setValue(String.valueOf(enableClientAuth));
+ persistCfg();
+ this.enableClientAuth = enableClientAuth;
+ }
/**
* @return the keystorePassword
@@ -834,5 +853,5 @@ public class RuntimeConfig extends AbstractConfigMBean implements RuntimeConfigM
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException{
broadcasterSupport.removeNotificationListener(listener, filter, handback);
}
-
+
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java
index cb1eac56b..c00fcc99d
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/mbeans/RuntimeConfigMBean.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.mbeans;
+package net.openesb.jbi.restbc.jbiadapter.mbeans;
import java.util.Map;
@@ -24,6 +24,7 @@ public interface RuntimeConfigMBean {
public static final String TRUSTSTORE_PASSWORD = "TruststorePassword";
public static final String KEYSTORE_PASSWORD = "KeystorePassword";
public static final String ENABLE_HOSTNAME_VERIFIER = "EnableHostnameVerifier";
+ public static final String ENABLE_CLIENT_AUTH = "EnableClientAuth";
// Appliation configurations and application variables
public static final String CONFIG_APPLICATON_VARIABLES = "ApplicationVariables";
@@ -57,7 +58,8 @@ public interface RuntimeConfigMBean {
public String getKeystorePassword();
public void setKeystorePassword(String keystorePassword);
-
+ public Boolean isEnableClientAuth();
+ public void setEnableClientAuth(Boolean enableClientAuth);
/**
* This operation adds a new application variable. If a variable with the same name
diff --git a/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/msgs.properties b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/msgs.properties
new file mode 100644
index 000000000..93b4f4c11
--- /dev/null
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/msgs.properties
@@ -0,0 +1,336 @@
+# DO NOT EDIT
+# THIS FILE IS GENERATED AUTOMATICALLY FROM JAVA SOURCES/CLASSES
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1001 = ComponentLifeCycle.init() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1002 = ComponentLifeCycle.shutdown() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1003 = ComponentLifeCycle.start() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-1004 = ComponentLifeCycle.stop() called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-1021 = Bootstrap init called.
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1031 = ServiceUnitManager.deploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1032 = ServiceUnitManager.init() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1033 = ServiceUnitManager.init() successful serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1034 = ServiceUnitManager.shutdown() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1035 = ServiceUnitManager.start() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1036 = ServiceUnitManager.stop() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-1037 = ServiceUnitManager.undeploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1051 = ServiceUnit.start() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1052 = ServiceUnit.stop() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-1053 = ServiceUnit.shutdown() called serviceUnitName\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1061 = creating NMR Receiver\: threadPoolSize\={0}, maxTheadPoolSize\={1}, maxWaitMillis\={2},
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1062 = starting NMR Receiver
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1063 = stopping NMR Receiver
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-1064 = received a MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.ServiceUnitResourceConfig.1
+RESTBC-1101 = Inbound Request\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1121 = WSDLEndpoint.start()
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1122 = WSDLEndpoint.stop()
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-1123 = WSDLEndpoint.shutdown()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1131 = PropertyServiceUnitConfig.start()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1132 = PropertyServiceUnitConfig.stop()
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-1133 = PropertyServiceUnitConfig.shutdown()
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1202 = Application Configuration deleted {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1204 = New application variable added {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-1205 = Application variable deleted {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4001 = Initializing Keystore at location {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4002 = Initializing Truststore at location {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-4003 = Started listener {0} at port {1}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-4121 = activating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-4122 = deactivating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-4131 = activating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-4132 = deactivating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5001 = Initialized {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5002 = Shut down {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5003 = Start {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-5004 = Stop {0} successfully
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-5031 = Deployed ServiceUnit {0}.
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6001 = Unable to initialize SSLContext, install root is not a directory {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6002 = Unable to initialize SSLContext, keystore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6003 = Unable to initialize SSLContext, truststore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6004 = Unable to initialize SSLContext {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6005 = Unable to initialize SSLConfig, install root is not a directory {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6006 = Unable to initialize SSLConfig, keystore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-6007 = Unable to initialize SSLConfig, truststore file is not a file {0}
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6051 = unable to instantiate PropertyServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6052 = unable to instantiate JaxrsPojoServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
+RESTBC-6053 = unable to instantiate WSDLServiceUnitConfig ServiceUnit
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7003 = {0} failed to start {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7004 = {0} failed to stop {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
+RESTBC-7005 = {0} failed to stop HTTP listener {1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7021 = Failed to parse component descriptor\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7022 = Failed to initialize component bootstrap\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+RESTBC-7023 = Failed to register component bootstrap\: {0}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7031 = Duplicate ServiceUnit {0}, cannot proceed with deployment.
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7032 = Error shutting down Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7033 = Cannot find Service Unit {0} to shutdown
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7034 = Error starting Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7035 = Cannot find Service Unit {0} to start
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7036 = Error stopping Service Unit {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
+RESTBC-7037 = Cannot find Service Unit {0} to stop
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-7061 = Error during DeliveryChannel.accept() {0}
+
+# net.openesb.jbi.restbc.jbiadapter.Receiver
+RESTBC-7062 = Error during Receiver.run() {0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7071 = error processing MessageExchange\: id\={0}, {1}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7072 = unsupported MEP\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7073 = Inbound MEP should not get here\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7074 = cannot find corresponding endpoint for this MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7075 = error when processing MessageExchange\: id\={0}, {1}
+
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
+RESTBC-7076 = got ERROR status for MessageExchange\: id\={0}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.ServiceUnitResourceConfig.1
+RESTBC-7101 = Inbound delegator not initialized yet
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7111 = Request URL {0} does not match any ServiceUnit with listenerName\={1}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7112 = Unexcepted error\: unable to match request path with a inbound configuration
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7113 = Inbound request timed-out after {0} ms
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7114 = Error during inbound request {0}
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7115 = Incorrect return status for inbound request
+
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
+RESTBC-7116 = Unsupported MEP type {0}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7121 = http-listener-name\={0} specified in the inbound configuration for WSDL operation {1} does not match an existing HTTP Listener.
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7122 = unable to activate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+RESTBC-7123 = unable to deactivate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7131 = http-listener-name\={0} specified in the inbound configuration for PropertyConfiguration does not match an existing HTTP Listener.
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7132 = unable to activate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7133 = unable to deactivate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
+
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+RESTBC-7134 = {0} property cannot be empty.
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7201 = Application Config already exists {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7202 = Invalid item size for Application Config {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7203 = Invalid key for composite data for Application Config {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7204 = Application Configuration does not exist for delete {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7205 = Application Configuration does not exist for set {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7206 = Invalid item size for app config {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7207 = Invalid key for composite data for app config
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7208 = Unable to construct composite data for app config {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7209 = Application variable name already exists {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7210 = Invalid item size for app variable {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7211 = Invalid key for composite data for app variable {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7212 = Invalid app variable composite data no value field {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7213 = Invalid app variable composite data no type field
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7214 = Application variable does not exist for delete {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7215 = Application variable does not exist for set {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7216 = Invalid item size for app variable
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7219 = Invalid app variable composite data no type field {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7220 = Unable to construct composite data for app variable
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7221 = Invalid app config composite data null url
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7224 = Failed to persist application variables {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7225 = Failed to load application variables {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7226 = Failed to persist application configurations {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7227 = Failed to load application configurations {0} {1}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7228 = Failed during mbean initialization {0}
+
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+RESTBC-7521 = Exception while persisting configuration changes.
+
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CDL.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CDL.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CDL.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CDL.java
index 12e387c17..960acb2fd
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CDL.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CDL.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Cookie.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Cookie.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Cookie.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Cookie.java
index 9e1c39c89..177fd0231
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Cookie.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Cookie.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CookieList.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CookieList.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CookieList.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CookieList.java
index 62c756753..716028d43
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/CookieList.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/CookieList.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTP.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTP.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTP.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTP.java
index af36b3c8d..fddbe3389
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTP.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTP.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTPTokener.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTPTokener.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTPTokener.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTPTokener.java
index ccbc2c90d..3fb8b7a8d
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/HTTPTokener.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/HTTPTokener.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONArray.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONArray.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONArray.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONArray.java
index c0d510c85..0489634c9
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONArray.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONArray.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONException.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONException.java
old mode 100755
new mode 100644
similarity index 94%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONException.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONException.java
index 02e3c5fc7..2cca30d16
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONException.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONException.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/**
* The JSONException is thrown by the JSON.org classes when things are amiss.
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONML.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONML.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONML.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONML.java
index 0d6c7c526..41fbda0e8
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONML.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONML.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2008 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONObject.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONObject.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONObject.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONObject.java
index 55d3d486a..bef9de7cb
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONObject.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONObject.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONString.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONString.java
old mode 100755
new mode 100644
similarity index 92%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONString.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONString.java
index c9c13fc18..b77e953fd
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONString.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONString.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/**
* The JSONString
interface allows a toJSONString()
* method so that a class can change the behavior of
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONStringer.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONStringer.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONStringer.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONStringer.java
index 1803796e7..aac6c53b2
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONStringer.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONStringer.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2006 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONTokener.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONTokener.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONTokener.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONTokener.java
index 18b7e7e49..a91e304ea
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONTokener.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONTokener.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONWriter.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONWriter.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONWriter.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONWriter.java
index a843592a9..81f9c7403
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/JSONWriter.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/JSONWriter.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
import java.io.IOException;
import java.io.Writer;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Test.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Test.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Test.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Test.java
index 1385ceb26..4366e4559
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/Test.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/Test.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
import java.util.Collection;
import java.util.Iterator;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XML.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XML.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XML.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XML.java
index 131675d2a..654a8dd52
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XML.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XML.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XMLTokener.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XMLTokener.java
old mode 100755
new mode 100644
similarity index 99%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XMLTokener.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XMLTokener.java
index 8c1482efd..c274973df
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/org/json/XMLTokener.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/org/json/XMLTokener.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.org.json;
+package net.openesb.jbi.restbc.jbiadapter.org.json;
/*
Copyright (c) 2002 JSON.org
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/ProxySettings.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/ProxySettings.java
old mode 100755
new mode 100644
similarity index 95%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/ProxySettings.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/ProxySettings.java
index 07be6f8b6..f2c709598
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/ProxySettings.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/ProxySettings.java
@@ -1,5 +1,5 @@
-package com.sun.jbi.restbc.jbiadapter.security;
+package net.openesb.jbi.restbc.jbiadapter.security;
/**
*
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java
index 10e68c001..007e521e5
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509KeyManagerImpl.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.security;
+package net.openesb.jbi.restbc.jbiadapter.security;
import java.io.File;
import java.io.FileInputStream;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java
index a10023812..3f0401c24
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/security/X509TrustManagerImpl.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.security;
+package net.openesb.jbi.restbc.jbiadapter.security;
import java.io.File;
import java.io.FileInputStream;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/BeanUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/BeanUtil.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/BeanUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/BeanUtil.java
index c2d580284..8e9864dc1
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/BeanUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/BeanUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.lang.reflect.Method;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JbiMessageUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JbiMessageUtil.java
old mode 100755
new mode 100644
similarity index 91%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JbiMessageUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JbiMessageUtil.java
index 2c46d8f83..869ebf3f2
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JbiMessageUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JbiMessageUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
@@ -26,19 +26,22 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
+import net.openesb.jbi.restbc.jbiadapter.wsdl.RestOperation;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import com.sun.jbi.common.xml.XmlUtil;
import com.sun.jbi.nms.wsdl11wrapper.HelperFactory;
import com.sun.jbi.nms.wsdl11wrapper.WrapperBuilder;
import com.sun.jbi.nms.wsdl11wrapper.impl.NodeListImpl;
import com.sun.jbi.nms.wsdl11wrapper.util.WrapperUtil;
-import com.sun.jbi.restbc.jbiadapter.wsdl.RestOperation;
/**
* JbiMessageUtil.java
@@ -108,13 +111,15 @@ public class JbiMessageUtil {
try {
Document doc = getDocument(msg.getContent());
+ payloadSource = new DOMSource(test(doc));
+ /*
Node payload;
-
+
// Check to see if this message is wrapped
NodeList parts = doc.getDocumentElement().getElementsByTagNameNS(WSDL_WRAPPER_URI, "part");
if (parts.getLength() > 0) {
- payload = parts.item(0).getFirstChild();
+ payload = parts.item(0);
if (WrapperUtil.isNodeXopInclude(payload)) {
String attachmentId = WrapperUtil.getXopContentId(payload);
DataHandler dataHandler = msg.getAttachment(attachmentId);
@@ -123,11 +128,9 @@ public class JbiMessageUtil {
} else {
// no wrapper, just return the document
- payload = doc;
+ payload = doc.getFirstChild();
}
-
- payloadSource = new DOMSource(payload);
-
+ */
} catch (Exception e) {
logger.log(Level.WARNING, "unable to unwrap JBI wrapped message", e);
}
@@ -135,6 +138,38 @@ public class JbiMessageUtil {
return payloadSource;
}
+
+ private static Node test(Document doc) throws Exception{
+
+ NodeList parts = doc.getDocumentElement().getElementsByTagNameNS(WSDL_WRAPPER_URI, "part");
+ Node part = parts.item(0);
+ NodeList partsChild = part.getChildNodes();
+
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+
+ String type =doc.getDocumentElement().getAttribute("type");
+ type = type.contains(":") ? type.substring(type.indexOf(":")+1) : type;
+
+ // root elements
+ Document res = docBuilder.newDocument();
+ //Element rootElement = res.getDocumentElement(); //createElement(type);
+ //res.appendChild(rootElement);
+ for(int partIdx=0 ; partIdx 0){
+ XmlUtil.print(new DOMSource( res.getChildNodes().item(0)));
+ return res.getChildNodes().item(0);
+ }
+
+ //doc.appendChild(rootElement);
+ //XmlUtil.print(new DOMSource(res));
+ return res;
+ }
+
public static Source createJbiWrappedMsg(QName msgType, InputStream payload) {
Source content = null;
@@ -408,7 +443,7 @@ public class JbiMessageUtil {
public static String convertXmlToString(Source source, boolean stripNamespaces) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
-// transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.transform(source, new StreamResult(baos));
String xmlPayload = baos.toString();
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JsonUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JsonUtil.java
old mode 100755
new mode 100644
similarity index 93%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JsonUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JsonUtil.java
index 48e23a4eb..93844b7a6
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/JsonUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/JsonUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.io.StringWriter;
import java.util.ArrayList;
@@ -8,11 +8,11 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.type.CollectionType;
-import org.codehaus.jackson.map.type.MapType;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.codehaus.jackson.type.JavaType;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.CollectionType;
+import com.fasterxml.jackson.databind.type.MapType;
+import com.fasterxml.jackson.databind.type.TypeFactory;
/**
* JsonUtil.java
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/MediaTypeUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/MediaTypeUtil.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/MediaTypeUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/MediaTypeUtil.java
index 85e3bbf05..0270efa7d
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/MediaTypeUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/MediaTypeUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.util.Map;
import java.util.regex.Matcher;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java
index 6625c2d27..6a601e12c
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/NMPropertiesUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.util.HashMap;
import java.util.List;
@@ -14,7 +14,8 @@ import javax.ws.rs.core.MultivaluedMap;
* @author Edward Chou
*/
public class NMPropertiesUtil {
-
+
+
/*
* convert javax.ws.rs.core.MultivaluedMap to java.util.Map
*/
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PathUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PathUtil.java
old mode 100755
new mode 100644
similarity index 90%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PathUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PathUtil.java
index 6e9b27926..75729e043
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PathUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PathUtil.java
@@ -1,13 +1,14 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.util.HashMap;
import java.util.List;
-import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
-import com.sun.jbi.restbc.jbiadapter.InboundConfiguration;
-import com.sun.jersey.api.uri.UriTemplate;
+import net.openesb.jbi.restbc.jbiadapter.InboundConfiguration;
+
+import org.glassfish.jersey.uri.UriTemplate;
+
/**
* PathUtil.java
@@ -27,7 +28,8 @@ public class PathUtil {
*/
public static boolean matchInboundConfiguration(
InboundConfiguration inboundConfig,
- HttpHeaders headers,
+ MediaType contentType,
+ List acceptMediaTypes,
String method,
String path) {
@@ -43,7 +45,6 @@ public class PathUtil {
}
// match consume types
- MediaType contentType = headers.getMediaType();
if (contentType != null) {
boolean matchConsumeType = false;
for (MediaType consumeType : inboundConfig.getConsumeMediaTypes()) {
@@ -59,7 +60,6 @@ public class PathUtil {
// match produce types
boolean matchProduceType = false;
- List acceptMediaTypes = headers.getAcceptableMediaTypes();
if (acceptMediaTypes.size() == 0) {
matchProduceType = true;
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PropertiesUtil.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PropertiesUtil.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PropertiesUtil.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PropertiesUtil.java
index da504d1c3..ed683ffe7
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/util/PropertiesUtil.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/util/PropertiesUtil.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.util;
+package net.openesb.jbi.restbc.jbiadapter.util;
import java.util.Map;
import java.util.Properties;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestAddress.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestAddress.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestAddress.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestAddress.java
index 903921587..d6d9631cd
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestAddress.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestAddress.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.Serializable;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestBinding.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestBinding.java
old mode 100755
new mode 100644
similarity index 97%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestBinding.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestBinding.java
index 6b289828f..b1fe43b1e
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestBinding.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestBinding.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.Serializable;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestConstants.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestConstants.java
old mode 100755
new mode 100644
similarity index 93%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestConstants.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestConstants.java
index 3400233c1..626b2441d
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestConstants.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestConstants.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import javax.xml.namespace.QName;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java
index 8628e2077..fcd5227e2
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtSerializer.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.PrintWriter;
import java.io.Serializable;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java
old mode 100755
new mode 100644
similarity index 89%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java
index a51e6cd89..ffe02e086
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestExtensionRegistry.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import javax.wsdl.extensions.ExtensionRegistry;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestOperation.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestOperation.java
old mode 100755
new mode 100644
similarity index 98%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestOperation.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestOperation.java
index 867a86c27..35a2f3400
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/RestOperation.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/RestOperation.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.Serializable;
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java
old mode 100755
new mode 100644
similarity index 88%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java
index 918d86951..4780d0fce
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLEndpoint.java
@@ -1,7 +1,9 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.ByteArrayInputStream;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
@@ -10,22 +12,22 @@ import java.util.logging.Logger;
import javax.jbi.JBIException;
import javax.jbi.component.ComponentContext;
import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
+import net.openesb.jbi.restbc.jbiadapter.I18n;
+import net.openesb.jbi.restbc.jbiadapter.InboundConfiguration;
+import net.openesb.jbi.restbc.jbiadapter.OutboundConfiguration;
+import net.openesb.jbi.restbc.jbiadapter.RestComponent;
+import net.openesb.jbi.restbc.jbiadapter.ServiceUnit;
+import net.openesb.jbi.restbc.jbiadapter.ServiceUnitConfig;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.util.PathUtil;
+
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import com.sun.jbi.restbc.jbiadapter.I18n;
-import com.sun.jbi.restbc.jbiadapter.InboundConfiguration;
-import com.sun.jbi.restbc.jbiadapter.OutboundConfiguration;
-import com.sun.jbi.restbc.jbiadapter.RestComponent;
-import com.sun.jbi.restbc.jbiadapter.ServiceUnit;
-import com.sun.jbi.restbc.jbiadapter.ServiceUnitConfig;
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.util.PathUtil;
-
/**
* WSDLEndpoint.java
*
@@ -130,10 +132,19 @@ public class WSDLEndpoint implements ServiceUnitConfig {
return null;
}
- public InboundConfiguration findInboundConfig(String listenerName, HttpHeaders headers, String method, String path) {
+ /**
+ * Return WSDL inbounds configurations.
+ *
+ * @return inbounds configuration.
+ */
+ public Collection getInboundsConfigs(){
+ return inboundConfigs.values();
+ }
+
+ public InboundConfiguration findInboundConfig(String listenerName, MediaType contentType, List acceptMediaTypes, String method, String path) {
for (InboundConfiguration inboundConfig : inboundConfigs.values()) {
if (inboundConfig.getHttpListenerName().equals(listenerName)) {
- if (PathUtil.matchInboundConfiguration(inboundConfig, headers, method, path)) {
+ if (PathUtil.matchInboundConfiguration(inboundConfig, contentType, acceptMediaTypes, method, path)) {
return inboundConfig;
}
}
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java
old mode 100755
new mode 100644
similarity index 96%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java
rename to ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java
index 9dac5288c..188172fed
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java
+++ b/ojc-core/restbc/jbiadapter/src/main/java/net/openesb/jbi/restbc/jbiadapter/wsdl/WSDLServiceUnitConfig.java
@@ -1,4 +1,4 @@
-package com.sun.jbi.restbc.jbiadapter.wsdl;
+package net.openesb.jbi.restbc.jbiadapter.wsdl;
import java.io.File;
import java.util.ArrayList;
@@ -24,13 +24,14 @@ import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import net.openesb.jbi.restbc.jbiadapter.RestComponent;
+import net.openesb.jbi.restbc.jbiadapter.ServiceUnit;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
+import net.openesb.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
+
import org.w3c.dom.Document;
import org.xml.sax.EntityResolver;
-import com.sun.jbi.restbc.jbiadapter.RestComponent;
-import com.sun.jbi.restbc.jbiadapter.ServiceUnit;
-import com.sun.jbi.restbc.jbiadapter.descriptor.EndpointIdentifier;
-import com.sun.jbi.restbc.jbiadapter.descriptor.RestSUDescriptor;
import com.sun.wsdl4j.ext.WSDL4JExt;
/**
diff --git a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/msgs.properties b/ojc-core/restbc/jbiadapter/src/main/resources/net/openesb/jbi/restbc/jbiadapter/msgs.properties
old mode 100755
new mode 100644
similarity index 55%
rename from ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/msgs.properties
rename to ojc-core/restbc/jbiadapter/src/main/resources/net/openesb/jbi/restbc/jbiadapter/msgs.properties
index 6161d45fc..c2347d33c
--- a/ojc-core/restbc/jbiadapter/src/com/sun/jbi/restbc/jbiadapter/msgs.properties
+++ b/ojc-core/restbc/jbiadapter/src/main/resources/net/openesb/jbi/restbc/jbiadapter/msgs.properties
@@ -1,375 +1,369 @@
# DO NOT EDIT
# THIS FILE IS GENERATED AUTOMATICALLY FROM JAVA SOURCES/CLASSES
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-1001 = ComponentLifeCycle.init() called.
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-1002 = ComponentLifeCycle.shutdown() called.
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-1003 = ComponentLifeCycle.start() called.
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-1004 = ComponentLifeCycle.stop() called.
-# com.sun.jbi.restbc.jbiadapter.RestBootstrap
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
RESTBC-1021 = Bootstrap init called.
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1031 = ServiceUnitManager.deploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1032 = ServiceUnitManager.init() called serviceUnitName\={0}, serviceUnitRootPath\={1}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1033 = ServiceUnitManager.init() successful serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1034 = ServiceUnitManager.shutdown() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1035 = ServiceUnitManager.start() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1036 = ServiceUnitManager.stop() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-1037 = ServiceUnitManager.undeploy() called serviceUnitName\={0}, serviceUnitRootPath\={1}
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-1051 = ServiceUnit.start() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-1052 = ServiceUnit.stop() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-1053 = ServiceUnit.shutdown() called serviceUnitName\={0}
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-1061 = creating NMR Receiver\: threadPoolSize\={0}, maxTheadPoolSize\={1}, maxWaitMillis\={2},
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-1062 = starting NMR Receiver
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-1063 = stopping NMR Receiver
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-1064 = received a MessageExchange\: id\={0}
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-1081 = ignored reading payload for {0} method
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-1082 = sending entity located in NM property for the request as a String object
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-1083 = sending entity located in NM property for the request as a DOMSource object
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-1084 = sending entity located in NM property for the request as a Source object
-# com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
+# net.openesb.jbi.restbc.jbiadapter.inbound.ServiceUnitResourceConfig.1
RESTBC-1101 = Inbound Request\: {0}
-# com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
-RESTBC-1102 = Inbound Response\: {0}
-
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-1121 = WSDLEndpoint.start()
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-1122 = WSDLEndpoint.stop()
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-1123 = WSDLEndpoint.shutdown()
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-1131 = PropertyServiceUnitConfig.start()
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-1132 = PropertyServiceUnitConfig.stop()
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-1133 = PropertyServiceUnitConfig.shutdown()
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-1202 = Application Configuration deleted {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-1204 = New application variable added {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-1205 = Application variable deleted {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-4001 = Initializing Keystore at location {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-4002 = Initializing Truststore at location {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-4003 = Started listener {0} at port {1}
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-4121 = activating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-4122 = deactivating endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-4131 = activating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-4132 = deactivating endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-5001 = Initialized {0} successfully
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-5002 = Shut down {0} successfully
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-5003 = Start {0} successfully
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-5004 = Stop {0} successfully
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-5031 = Deployed ServiceUnit {0}.
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6001 = Unable to initialize SSLContext, install root is not a directory {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6002 = Unable to initialize SSLContext, keystore file is not a file {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6003 = Unable to initialize SSLContext, truststore file is not a file {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6004 = Unable to initialize SSLContext {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6005 = Unable to initialize SSLConfig, install root is not a directory {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6006 = Unable to initialize SSLConfig, keystore file is not a file {0}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-6007 = Unable to initialize SSLConfig, truststore file is not a file {0}
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-6051 = unable to instantiate PropertyServiceUnitConfig ServiceUnit
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-6052 = unable to instantiate JaxrsPojoServiceUnitConfig ServiceUnit
-# com.sun.jbi.restbc.jbiadapter.ServiceUnit
+# net.openesb.jbi.restbc.jbiadapter.ServiceUnit
RESTBC-6053 = unable to instantiate WSDLServiceUnitConfig ServiceUnit
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6081 = Skipping Content-Type specified in Headers NM property, since Content-Type is already specified.
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6082 = Skipping Accept specified in Headers NM property, since Accept is already specified.
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6083 = Skipping Accept-Language specified in Headers NM property, since Accept-Language is already specified.
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6084 = Skipping Date specified in Headers NM property, since Date is already specified.
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6085 = filter class {0} is not a subclass of com.sun.jersey.api.client.filter.ClientFilter, skipping ...
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-6086 = unable to instantiate filter class {0} skipping ..., {1}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-7003 = {0} failed to start {1}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-7004 = {0} failed to stop {1}
-# com.sun.jbi.restbc.jbiadapter.RestComponent
+# net.openesb.jbi.restbc.jbiadapter.RestComponent
RESTBC-7005 = {0} failed to stop HTTP listener {1}, {2}
-# com.sun.jbi.restbc.jbiadapter.RestBootstrap
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
RESTBC-7021 = Failed to parse component descriptor\: {0}
-# com.sun.jbi.restbc.jbiadapter.RestBootstrap
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
RESTBC-7022 = Failed to initialize component bootstrap\: {0}
-# com.sun.jbi.restbc.jbiadapter.RestBootstrap
+# net.openesb.jbi.restbc.jbiadapter.RestBootstrap
RESTBC-7023 = Failed to register component bootstrap\: {0}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7031 = Duplicate ServiceUnit {0}, cannot proceed with deployment.
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7032 = Error shutting down Service Unit {0} {1}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7033 = Cannot find Service Unit {0} to shutdown
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7034 = Error starting Service Unit {0} {1}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7035 = Cannot find Service Unit {0} to start
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7036 = Error stopping Service Unit {0} {1}
-# com.sun.jbi.restbc.jbiadapter.RestSUManager
+# net.openesb.jbi.restbc.jbiadapter.RestSUManager
RESTBC-7037 = Cannot find Service Unit {0} to stop
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-7061 = Error during DeliveryChannel.accept() {0}
-# com.sun.jbi.restbc.jbiadapter.Receiver
+# net.openesb.jbi.restbc.jbiadapter.Receiver
RESTBC-7062 = Error during Receiver.run() {0}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7071 = error processing MessageExchange\: id\={0}, {1}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7072 = unsupported MEP\: id\={0}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7073 = Inbound MEP should not get here\: id\={0}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7074 = cannot find corresponding endpoint for this MessageExchange\: id\={0}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7075 = error when processing MessageExchange\: id\={0}, {1}
-# com.sun.jbi.restbc.jbiadapter.MessageProcessor
+# net.openesb.jbi.restbc.jbiadapter.MessageProcessor
RESTBC-7076 = got ERROR status for MessageExchange\: id\={0}
-# com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+# net.openesb.jbi.restbc.jbiadapter.JerseyClientWrapper
RESTBC-7081 = SSLContext is unavailable to make HTTPS Request
-# com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
+# net.openesb.jbi.restbc.jbiadapter.inbound.ServiceUnitResourceConfig.1
RESTBC-7101 = Inbound delegator not initialized yet
-# com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
-RESTBC-7102 = Error while serving inbound request {0}
-
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7111 = Request URL {0} does not match any ServiceUnit with listenerName\={1}
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7112 = Unexcepted error\: unable to match request path with a inbound configuration
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7113 = Inbound request timed-out after {0} ms
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7114 = Error during inbound request {0}
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7115 = Incorrect return status for inbound request
-# com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+# net.openesb.jbi.restbc.jbiadapter.inbound.InboundDelegator
RESTBC-7116 = Unsupported MEP type {0}
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-7121 = http-listener-name\={0} specified in the inbound configuration for WSDL operation {1} does not match an existing HTTP Listener.
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-7122 = unable to activate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
-# com.sun.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
+# net.openesb.jbi.restbc.jbiadapter.wsdl.WSDLEndpoint
RESTBC-7123 = unable to deactivate endpoint for WSDLEndpoint\: serviceName\={0}, endpointName\={1}, {2}
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-7131 = http-listener-name\={0} specified in the inbound configuration for PropertyConfiguration does not match an existing HTTP Listener.
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-7132 = unable to activate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-7133 = unable to deactivate endpoint for PropertyServiceUnitConfig\: serviceName\={0}, endpointName\={1}, {2}
-# com.sun.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
+# net.openesb.jbi.restbc.jbiadapter.PropertyServiceUnitConfig
RESTBC-7134 = {0} property cannot be empty.
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7201 = Application Config already exists {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7202 = Invalid item size for Application Config {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7203 = Invalid key for composite data for Application Config {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7204 = Application Configuration does not exist for delete {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7205 = Application Configuration does not exist for set {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7206 = Invalid item size for app config {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7207 = Invalid key for composite data for app config
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7208 = Unable to construct composite data for app config {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7209 = Application variable name already exists {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7210 = Invalid item size for app variable {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7211 = Invalid key for composite data for app variable {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7212 = Invalid app variable composite data no value field {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7213 = Invalid app variable composite data no type field
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7214 = Application variable does not exist for delete {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7215 = Application variable does not exist for set {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7216 = Invalid item size for app variable
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7219 = Invalid app variable composite data no type field {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7220 = Unable to construct composite data for app variable
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7221 = Invalid app config composite data null url
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7224 = Failed to persist application variables {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7225 = Failed to load application variables {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7226 = Failed to persist application configurations {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7227 = Failed to load application configurations {0} {1}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7228 = Failed during mbean initialization {0}
-# com.sun.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
+# net.openesb.jbi.restbc.jbiadapter.mbeans.RuntimeConfig
RESTBC-7521 = Exception while persisting configuration changes.
diff --git a/ojc-core/restbc/jbiadapter/test/com/sun/jbi/restbc/jbiadapter/util/JsonUtilTest.java b/ojc-core/restbc/jbiadapter/test/com/sun/jbi/restbc/jbiadapter/util/JsonUtilTest.java
deleted file mode 100755
index 7a03d4ffe..000000000
--- a/ojc-core/restbc/jbiadapter/test/com/sun/jbi/restbc/jbiadapter/util/JsonUtilTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.sun.jbi.restbc.jbiadapter.util;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-
-public class JsonUtilTest extends TestCase {
-
-
- public JsonUtilTest(String testName) {
- super(testName);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testParseJsonPairs() throws Exception {
-
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(JsonUtilTest.class);
-
- return suite;
- }
-
-}
\ No newline at end of file
diff --git a/ojc-core/restbc/nbactions.xml b/ojc-core/restbc/nbactions.xml
old mode 100755
new mode 100644
diff --git a/ojc-core/restbc/packaging-full/pom.xml b/ojc-core/restbc/packaging-full/pom.xml
new file mode 100644
index 000000000..c08b714fc
--- /dev/null
+++ b/ojc-core/restbc/packaging-full/pom.xml
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+ package-common
+ open-jbi-components
+ 1.1
+ ../../build-common/package-common
+
+ 4.0.0
+ restbc-full-installer
+ OpenESB - Components - RESTBC - Packaging Full
+ Creates an installable jar for the Rest Binding Component
+ ${restbc.artifact.version}
+
+
+
+ META-INF
+ src/main/resources
+ true
+
+ *.xml
+
+
+
+ ./
+ src/main/resources
+ false
+
+ config.properties
+ *.jks
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 2.10
+
+
+ ${project.artifactId}-fetch-deps
+ generate-sources
+
+ copy-dependencies
+
+
+ ${project.build.outputDirectory}/lib
+ true
+
+ net.open-esb.components,
+ net.open-esb.components.restbc,
+ net.open-esb.external.hulp,
+ org.glassfish.grizzly,
+ org.glassfish.jersey.core,
+ org.glassfish.jersey.containers,
+ org.glassfish.jersey.bundles.repackaged,
+ org.glassfish.hk2,
+ com.fasterxml.jackson.core,
+ com.fasterxml.jackson.dataformat,
+ javax.ws.rs
+
+
+
+
+
+
+
+ maven-surefire-plugin
+
+ true
+
+
+
+ maven-jar-plugin
+
+
+ ${project.build.outputDirectory}/META-INF/MANIFEST.MF
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+
+
+ bundle-manifest
+ process-classes
+
+ manifest
+
+
+
+
+
+ sun-rest-binding
+ REST Binding Component
+ Implementation of Rest Binding Component
+ ${OSGI_VERSION}
+ <_removeheaders>${OSGI_MANIFEST_REMOVE_HEADERS}, Export-Package
+
+ *;-noimport:=true
+
+
+ lib/restbc-jbiadapter.jar,
+ lib/componentsl.jar,
+ lib/common-util.jar,
+ lib/wsdl4j.jar,
+ lib/wsdl4jext.jar,
+ lib/customized-xmlbeans.jar,
+ lib/resolver.jar,
+ lib/qos.jar,
+ lib/jersey-bundle.jar,
+ lib/grizzly-servlet-webserver.jar,
+ lib/asm.jar,
+ lib/jackson-core.jar,
+ lib/jackson-dataformat-xml.jar,
+ lib/jackson-annotations.jar,
+ lib/jackson-databind.jar,
+ lib/jackson-module-jaxb-annotations.jar,
+ lib/jsr311-api.jar,
+ lib/net.sf.hulp.meas.itf.jar,
+ lib/net.sf.hulp.meas.impl.jar
+
+
+ javax.activation.*,
+ javax.jbi.*,
+ javax.mail.*,
+ javax.management.*,
+ javax.naming.*,
+ javax.net.ssl.*,
+ javax.servlet;version="2.5",
+ javax.servlet.http;version="2.5",
+ javax.servlet.jsp;resolution:=optional,
+ javax.servlet.resources;resolution:=optional;version="2.5",
+ javax.xml.namespace,
+ javax.xml.parsers.*,
+ javax.xml.transform.*,
+ javax.xml.xpath.*,
+ org.osgi.framework.*,
+ org.w3c.dom.*,
+ org.xml.sax.*,
+ org.glassfish.openesb.api.message,
+ org.glassfish.openesb.api.service
+
+ com.sun.jbi.restbc.jbiadapter.inbound.ComponentBundleActivator
+
+
+
+
+
+
+
+
+
+ net.open-esb.components.restbc
+ restbc-jbiadapter
+ ${project.version}
+
+
+ open-jbi-components
+ wsdl4j
+
+
+ open-jbi-components
+ wsdl4jext
+
+
+ open-jbi-components
+ customized-xmlbeans
+
+
+ open-jbi-components
+ resolver
+
+
+ open-jbi-components
+ componentsl
+
+
+ open-jbi-components
+ qos
+
+
+ open-jbi-components
+ common-util
+
+
+ org.glassfish.jersey.containers
+ jersey-container-grizzly2-http
+ ${jersey.version}
+
+
+ org.glassfish.jersey.containers
+ jersey-container-grizzly2-servlet
+ ${jersey.version}
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-xml
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
+
+
+ net.sf.hulp.meas
+ net.sf.hulp.meas.itf
+
+
+
+ sun-rest-binding
+ 2.14
+ 2.4.2
+
+
diff --git a/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xml.old b/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xml.old
new file mode 100644
index 000000000..664302631
--- /dev/null
+++ b/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xml.old
@@ -0,0 +1,14 @@
+
+
+
+ 10
+ 5
+
+
\ No newline at end of file
diff --git a/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xsd.old b/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xsd.old
new file mode 100644
index 000000000..88976e319
--- /dev/null
+++ b/ojc-core/restbc/packaging-full/src/main/resources/componentConfiguration.xsd.old
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ojc-core/restbc/packaging/src/config.properties b/ojc-core/restbc/packaging-full/src/main/resources/config.properties
old mode 100755
new mode 100644
similarity index 100%
rename from ojc-core/restbc/packaging/src/config.properties
rename to ojc-core/restbc/packaging-full/src/main/resources/config.properties
diff --git a/ojc-core/restbc/packaging-full/src/main/resources/jbi.xml b/ojc-core/restbc/packaging-full/src/main/resources/jbi.xml
new file mode 100644
index 000000000..85e8101b5
--- /dev/null
+++ b/ojc-core/restbc/packaging-full/src/main/resources/jbi.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+ ${component.name}
+ REST Binding Component
+
+
+ net.openesb.jbi.restbc.jbiadapter.RestComponent
+
+
+ lib/restbc-jbiadapter.jar
+ lib/componentsl.jar
+ lib/common-util.jar
+ lib/wsdl4j.jar
+ lib/wsdl4jext.jar
+ lib/customized-xmlbeans.jar
+ lib/resolver.jar
+ lib/qos.jar
+ lib/itf.jar
+
+
+ lib/jersey-client.jar
+ lib/jersey-container-grizzly2-http.jar
+ lib/jersey-container-grizzly2-servlet.jar
+ lib/jersey-common.jar
+ lib/jersey-container-servlet-core.jar
+ lib/jersey-container-servlet.jar
+ lib/jersey-server.jar
+ lib/jersey-guava.jar
+
+
+ lib/grizzly-framework.jar
+ lib/grizzly-http-server.jar
+ lib/grizzly-http-servlet.jar
+ lib/grizzly-http.jar
+
+
+ lib/jackson-core.jar
+ lib/jackson-annotations.jar
+ lib/jackson-dataformat-xml.jar
+ lib/jackson-databind.jar
+
+
+ lib/hk2-api.jar
+ lib/hk2-locator.jar
+ lib/hk2-utils.jar
+
+
+ lib/javax.ws.rs-api.jar
+
+ net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+
+ lib/restbc-jbiadapter.jar
+ lib/common-util.jar
+ lib/componentsl.jar
+ lib/qos.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.sun.jbi.restbc.jbiadapter.RestBootstrap
+ com.sun.jbi.restbc.jbiadapter.RestComponent
+ com.sun.jbi.restbc.jbiadapter.RestSUManager
+ com.sun.jbi.restbc.jbiadapter.ServiceUnit
+ com.sun.jbi.restbc.jbiadapter.Receiver
+ com.sun.jbi.restbc.jbiadapter.MessageProcessor
+ com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+ com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
+ com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+
+
+
+
+
diff --git a/ojc-core/restbc/packaging/src/keystore.jks b/ojc-core/restbc/packaging-full/src/main/resources/keystore.jks
old mode 100755
new mode 100644
similarity index 100%
rename from ojc-core/restbc/packaging/src/keystore.jks
rename to ojc-core/restbc/packaging-full/src/main/resources/keystore.jks
diff --git a/ojc-core/restbc/packaging/src/restbc-config.properties b/ojc-core/restbc/packaging-full/src/main/resources/restbc-config.properties
old mode 100755
new mode 100644
similarity index 92%
rename from ojc-core/restbc/packaging/src/restbc-config.properties
rename to ojc-core/restbc/packaging-full/src/main/resources/restbc-config.properties
index d5b8e39fc..a2dcb0254
--- a/ojc-core/restbc/packaging/src/restbc-config.properties
+++ b/ojc-core/restbc/packaging-full/src/main/resources/restbc-config.properties
@@ -9,6 +9,7 @@
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='NmrMaxThreadPoolSize']/@displayDescription=Maximum number of threads in ThreadPoolExecutor for processing NMR messages.
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='TruststorePassword']/@displayDescription=Truststore Password
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableHostnameVerifier']/@displayName=enable/disable javax.net.ssl.HostnameVerifier
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableClientAuth']/@displayName=enable/disable SSL Client Auth
/jbi\:jbi/jbi\:component/jbi\:identification/jbi\:description=REST Binding Component
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpListenerThreads']/@displayName=Default HTTP Listener Threads
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='configurationName']/@displayDescription=Name of the Application Configuration object
@@ -23,3 +24,4 @@
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='url']/@displayName=URL
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpsListenerThreads']/@displayDescription=Default HTTPS Listener Threads
/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableHostnameVerifier']/@displayDescription=enable/disable javax.net.ssl.HostnameVerifier, if set to false, verify() method always return true
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableClientAuth']/@displayDescription=enable/disable SSL Client Auth
diff --git a/ojc-core/restbc/packaging/src/truststore.jks b/ojc-core/restbc/packaging-full/src/main/resources/truststore.jks
old mode 100755
new mode 100644
similarity index 100%
rename from ojc-core/restbc/packaging/src/truststore.jks
rename to ojc-core/restbc/packaging-full/src/main/resources/truststore.jks
diff --git a/ojc-core/restbc/packaging/.classpath b/ojc-core/restbc/packaging/.classpath
new file mode 100644
index 000000000..6e8059399
--- /dev/null
+++ b/ojc-core/restbc/packaging/.classpath
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ojc-core/restbc/packaging/.gitignore b/ojc-core/restbc/packaging/.gitignore
new file mode 100644
index 000000000..c645e86bc
--- /dev/null
+++ b/ojc-core/restbc/packaging/.gitignore
@@ -0,0 +1,2 @@
+target/
+/target
diff --git a/ojc-core/restbc/packaging/nbactions.xml b/ojc-core/restbc/packaging/nbactions.xml
old mode 100755
new mode 100644
diff --git a/ojc-core/restbc/packaging/pom.xml b/ojc-core/restbc/packaging/pom.xml
old mode 100755
new mode 100644
index d0597ba52..9730343e2
--- a/ojc-core/restbc/packaging/pom.xml
+++ b/ojc-core/restbc/packaging/pom.xml
@@ -8,13 +8,13 @@
# in compliance with the License.
#
# You can obtain a copy of the license at
- # https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
+ # https://net.open-esb.components.dev.java.net/public/CDDLv1.0.html.
# See the License for the specific language governing
# permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# HEADER in each file and include the License file at
- # https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
+ # https://net.open-esb.components.dev.java.net/public/CDDLv1.0.html.
# If applicable add the following below this CDDL HEADER,
# with the fields enclosed by brackets "[]" replaced with
# your own identifying information: Portions Copyright
@@ -35,16 +35,15 @@
../../build-common/package-common
4.0.0
- open-jbi-components
restbc-installer
- sun-rest-binding
${restbc.artifact.version}
+ OpenESB - Components - RESTBC - Packaging
Creates an installable jar for the Rest Binding Component
META-INF
- src
+ src/main/resources
true
*.xml
@@ -52,7 +51,7 @@
./
- src
+ src/main/resources
false
config.properties
@@ -60,54 +59,9 @@
+
-
- maven-antrun-plugin
-
-
- ${project.artifactId}-generate-i18n-descriptors
- process-resources
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${project.artifactId}-rename-jars
- process-classes
-
- run
-
-
-
-
-
-
-
-
-
-
+
maven-dependency-plugin
@@ -172,14 +126,17 @@
lib/customized-xmlbeans.jar,
lib/resolver.jar,
lib/qos.jar,
- lib/jersey-bundle.jar,
- lib/grizzly-servlet-webserver.jar,
- lib/asm.jar,
- lib/jackson-core-asl.jar,
- lib/jackson-mapper-asl.jar,
- lib/jsr311-api.jar,
+ lib/jersey-bundle.jar,
+ lib/grizzly-servlet-webserver.jar,
+ lib/asm.jar,
+ lib/jackson-core.jar,
+ lib/jackson-dataformat-xml.jar,
+ lib/jackson-annotations.jar,
+ lib/jackson-databind.jar,
+ lib/jackson-module-jaxb-annotations.jar,
+ lib/jsr311-api.jar,
lib/net.sf.hulp.meas.itf.jar,
- lib/net.sf.hulp.meas.impl.jar
+ lib/net.sf.hulp.meas.impl.jar
javax.activation.*,
@@ -203,8 +160,8 @@
org.glassfish.openesb.api.service
com.sun.jbi.restbc.jbiadapter.inbound.ComponentBundleActivator
-
@@ -214,70 +171,57 @@
- open-jbi-components
- restjbiadapter
- true
+ net.open-esb.components.restbc
+ restbc-jbiadapter
+ ${project.version}
open-jbi-components
wsdl4j
- true
open-jbi-components
wsdl4jext
- true
open-jbi-components
customized-xmlbeans
- true
open-jbi-components
resolver
- true
open-jbi-components
componentsl
- true
open-jbi-components
qos
- true
open-jbi-components
common-util
+
+
+ org.glassfish.jersey.containers
+ jersey-container-grizzly2-http
+ ${jersey.version}
+
+
+ org.glassfish.jersey.containers
+ jersey-container-grizzly2-servlet
+ ${jersey.version}
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-xml
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
net.sf.hulp.meas
net.sf.hulp.meas.itf
- true
- 2.1-SNAPSHOT
-
-
- net.sf.hulp.meas
- net.sf.hulp.meas.impl
- true
- 2.1-SNAPSHOT
+
+ sun-rest-binding
+ 2.14
+ 2.4.2
+
diff --git a/ojc-core/restbc/packaging/src/jbi.xml b/ojc-core/restbc/packaging/src/jbi.xml
deleted file mode 100755
index 1e6cc3826..000000000
--- a/ojc-core/restbc/packaging/src/jbi.xml
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
- sun-rest-binding
- REST Binding Component
-
-
- com.sun.jbi.restbc.jbiadapter.RestComponent
-
- lib/restbc-jbiadapter.jar
- lib/componentsl.jar
- lib/common-util.jar
- lib/wsdl4j.jar
- lib/wsdl4jext.jar
- lib/customized-xmlbeans.jar
- lib/resolver.jar
- lib/qos.jar
- lib/jersey-bundle.jar
- lib/jsr311-api.jar
- lib/asm.jar
- lib/grizzly-servlet-webserver.jar
- lib/jackson-core-asl.jar
- lib/jackson-mapper-asl.jar
-
- com.sun.jbi.restbc.jbiadapter.RestBootstrap
-
- lib/restbc-jbiadapter.jar
- lib/common-util.jar
- lib/componentsl.jar
- lib/qos.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- com.sun.jbi.restbc.jbiadapter.RestBootstrap
- com.sun.jbi.restbc.jbiadapter.RestComponent
- com.sun.jbi.restbc.jbiadapter.RestSUManager
- com.sun.jbi.restbc.jbiadapter.ServiceUnit
- com.sun.jbi.restbc.jbiadapter.Receiver
- com.sun.jbi.restbc.jbiadapter.MessageProcessor
- com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
- com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
- com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
-
-
-
-
-
diff --git a/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xml.old b/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xml.old
new file mode 100644
index 000000000..664302631
--- /dev/null
+++ b/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xml.old
@@ -0,0 +1,14 @@
+
+
+
+ 10
+ 5
+
+
\ No newline at end of file
diff --git a/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xsd.old b/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xsd.old
new file mode 100644
index 000000000..88976e319
--- /dev/null
+++ b/ojc-core/restbc/packaging/src/main/resources/componentConfiguration.xsd.old
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ojc-core/restbc/packaging/src/main/resources/config.properties b/ojc-core/restbc/packaging/src/main/resources/config.properties
new file mode 100644
index 000000000..72defb96b
--- /dev/null
+++ b/ojc-core/restbc/packaging/src/main/resources/config.properties
@@ -0,0 +1,18 @@
+
+# path to keystore location, relative to component install root
+keystore=keystore.jks
+
+# password to access the keystore
+keystore-password=changeit
+
+# path to truststore location, relative to component install root
+truststore=truststore.jks
+
+# password to access the keystore
+truststore-password=changeit
+
+# enable/disable javax.net.ssl.HostnameVerifier, if set to false, verify() method always return true
+hostname-verifier=false
+
+# default listener port, defaults to 9696
+default-listener-port=9696
diff --git a/ojc-core/restbc/packaging/src/main/resources/jbi.xml b/ojc-core/restbc/packaging/src/main/resources/jbi.xml
new file mode 100644
index 000000000..051dd6870
--- /dev/null
+++ b/ojc-core/restbc/packaging/src/main/resources/jbi.xml
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+ ${component.name}
+ REST Binding Component
+
+
+ net.openesb.jbi.restbc.jbiadapter.RestComponent
+
+ lib/restbc-jbiadapter.jar
+ lib/componentsl.jar
+ lib/common-util.jar
+ lib/wsdl4j.jar
+ lib/wsdl4jext.jar
+ lib/customized-xmlbeans.jar
+ lib/resolver.jar
+ lib/qos.jar
+ lib/jersey-container-grizzly2-http.jar
+ lib/jersey-container-grizzly2-servlet.jar
+ lib/grizzly-servlet-webserver.jar
+ lib/itf.jar
+
+ lib/jackson-core.jar
+ lib/jackson-annotations.jar
+ lib/jackson-dataformat-xml.jar
+ lib/jackson-databind.jar
+ lib/jackson-module-jaxb-annotations.jar
+
+ net.openesb.jbi.restbc.jbiadapter.RestBootstrap
+
+ lib/restbc-jbiadapter.jar
+ lib/common-util.jar
+ lib/componentsl.jar
+ lib/qos.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.sun.jbi.restbc.jbiadapter.RestBootstrap
+ com.sun.jbi.restbc.jbiadapter.RestComponent
+ com.sun.jbi.restbc.jbiadapter.RestSUManager
+ com.sun.jbi.restbc.jbiadapter.ServiceUnit
+ com.sun.jbi.restbc.jbiadapter.Receiver
+ com.sun.jbi.restbc.jbiadapter.MessageProcessor
+ com.sun.jbi.restbc.jbiadapter.JerseyClientWrapper
+ com.sun.jbi.restbc.jbiadapter.inbound.JerseyRootResource
+ com.sun.jbi.restbc.jbiadapter.inbound.InboundDelegator
+
+
+
+
+
diff --git a/ojc-core/restbc/packaging/src/main/resources/keystore.jks b/ojc-core/restbc/packaging/src/main/resources/keystore.jks
new file mode 100644
index 000000000..c40846550
Binary files /dev/null and b/ojc-core/restbc/packaging/src/main/resources/keystore.jks differ
diff --git a/ojc-core/restbc/packaging/src/main/resources/restbc-config.properties b/ojc-core/restbc/packaging/src/main/resources/restbc-config.properties
new file mode 100644
index 000000000..a2dcb0254
--- /dev/null
+++ b/ojc-core/restbc/packaging/src/main/resources/restbc-config.properties
@@ -0,0 +1,27 @@
+#Default I18n properties bundle
+#Tue Oct 27 16:59:04 PDT 2009
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='KeystorePassword']/@displayDescription=Keystore Password
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpsListenerPort']/@displayDescription=Default HTTPS Listener Port
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='TruststorePassword']/@displayName=Truststore Password
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpListenerPort']/@displayDescription=Default HTTP Listener Port
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='NmrThreadPoolSize']/@displayDescription=Number of core threads in ThreadPoolExecutor for processing NMR messages.
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='NmrMaxThreadPoolSize']/@displayName=NMR Max Thread Pool Size
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='NmrMaxThreadPoolSize']/@displayDescription=Maximum number of threads in ThreadPoolExecutor for processing NMR messages.
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='TruststorePassword']/@displayDescription=Truststore Password
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableHostnameVerifier']/@displayName=enable/disable javax.net.ssl.HostnameVerifier
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableClientAuth']/@displayName=enable/disable SSL Client Auth
+/jbi\:jbi/jbi\:component/jbi\:identification/jbi\:description=REST Binding Component
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpListenerThreads']/@displayName=Default HTTP Listener Threads
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='configurationName']/@displayDescription=Name of the Application Configuration object
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='KeystorePassword']/@displayName=Keystore Password
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='url']/@displayDescription=HTTP URL
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpsListenerPort']/@displayName=Default HTTPS Listener Port
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpListenerThreads']/@displayDescription=Default HTTP Listener Threads
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='configurationName']/@displayName=Name
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpListenerPort']/@displayName=Default HTTP Listener Port
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpsListenerThreads']/@displayName=Default HTTPS Listener Threads
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='NmrThreadPoolSize']/@displayName=NMR Core Thread Pool Size
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:ApplicationConfiguration/cfg\:Property[@name\='url']/@displayName=URL
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='DefaultHttpsListenerThreads']/@displayDescription=Default HTTPS Listener Threads
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableHostnameVerifier']/@displayDescription=enable/disable javax.net.ssl.HostnameVerifier, if set to false, verify() method always return true
+/jbi\:jbi/jbi\:component/cfg\:Configuration/cfg\:PropertyGroup/cfg\:Property[@name\='EnableClientAuth']/@displayDescription=enable/disable SSL Client Auth
diff --git a/ojc-core/restbc/packaging/src/main/resources/truststore.jks b/ojc-core/restbc/packaging/src/main/resources/truststore.jks
new file mode 100644
index 000000000..c40846550
Binary files /dev/null and b/ojc-core/restbc/packaging/src/main/resources/truststore.jks differ
diff --git a/ojc-core/restbc/pom.xml b/ojc-core/restbc/pom.xml
old mode 100755
new mode 100644
index 00cf3a235..92fa775c9
--- a/ojc-core/restbc/pom.xml
+++ b/ojc-core/restbc/pom.xml
@@ -8,13 +8,13 @@
# in compliance with the License.
#
# You can obtain a copy of the license at
- # https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
+ # https://net.open-esb.components.dev.java.net/public/CDDLv1.0.html.
# See the License for the specific language governing
# permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# HEADER in each file and include the License file at
- # https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
+ # https://net.open-esb.components.dev.java.net/public/CDDLv1.0.html.
# If applicable add the following below this CDDL HEADER,
# with the fields enclosed by brackets "[]" replaced with
# your own identifying information: Portions Copyright
@@ -27,26 +27,34 @@
#
# END_HEADER - DO NOT EDIT
-->
-
+
+ 4.0.0
+
ojc-common
open-jbi-components
1.1
../build-common/ojc-common
- 4.0.0
- open-jbi-components
- restbc-top
+
+ net.open-esb.components.restbc
+ parent
pom
- restbc-top
+
+ OpenESB - Components - RESTBC
${restbc.artifact.version}
- Top-level Build for restbc-top
-
- install
-
+ Rest Binding Component
+
-
jbiadapter
packaging
+ packaging-full
+
+
+ sun-rest-binding
+ 2.14
+ 2.4.2
+
diff --git a/ojc-core/sapbc/sapbcimpl/pom.xml b/ojc-core/sapbc/sapbcimpl/pom.xml
index a4f02d555..9d86134a0 100755
--- a/ojc-core/sapbc/sapbcimpl/pom.xml
+++ b/ojc-core/sapbc/sapbcimpl/pom.xml
@@ -112,11 +112,6 @@
sapjco