Commit 94dfe614 authored by Nicolas Tachker's avatar Nicolas Tachker

JORAM-29: removed the Joram SOAP.

parent 4f4d8c6d
......@@ -32,7 +32,6 @@
fr.dyade.aaa.common.net,
fr.dyade.aaa.common.osgi,
fr.dyade.aaa.common.stream,
fr.dyade.aaa.common.soap,
fr.dyade.aaa.util.management</Export-Package>
<Import-Package>javax.management;resolution:=optional,
org.objectweb.util.monolog,
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2003 - 2008 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): Nicolas Tachker (ScalAgent DT)
*/
package fr.dyade.aaa.common.soap;
import java.util.Hashtable;
/**
* The <code>SoapObjectItf</code> interface must be implemented by any
* object which may be registered and/or retrieved to/from JNDI through the
* SOAP protocol.
*/
public interface SoapObjectItf {
/**
* Method coding the <code>SoapObjectItf</code> object into a Hashtable
* transportable by the SOAP procotol.
*/
public Hashtable code();
/**
* Initializes a <code>SoapObjectItf</code> object given a coded Hashtable.
*/
public void decode(Hashtable h);
}
......@@ -62,7 +62,6 @@
<include>org.ow2.spec.ee:ow2-connector-1.5-spec</include>
<include>org.ow2.jonas.osgi:monolog</include>
<include>javax.mail:mail</include>
<include>soap:soap</include>
<include>org.ow2.joram:joram-client-jca</include>
</includes>
<useProjectArtifact>false</useProjectArtifact>
......
......@@ -212,10 +212,6 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.joram</groupId>
<artifactId>joram-client-jca</artifactId>
......
......@@ -43,7 +43,6 @@
fr.dyade.aaa.common,
fr.dyade.aaa.common.net,
fr.dyade.aaa.common.stream,
fr.dyade.aaa.common.soap,
fr.dyade.aaa.util.management,
javax.jms,
javax.management;resolution:=optional,
......@@ -54,12 +53,6 @@
javax.transaction,
javax.transaction.xa,
javax.xml.parsers,
org.apache.soap;resolution:=optional,
org.apache.soap.encoding;resolution:=optional,
org.apache.soap.encoding.soapenc;resolution:=optional,
org.apache.soap.rpc;resolution:=optional,
org.apache.soap.server;resolution:=optional,
org.apache.soap.util.xml;resolution:=optional,
org.objectweb.joram.mom.dest;resolution:=optional,
org.objectweb.joram.mom.notifications;resolution:=optional,
org.objectweb.joram.mom.proxies;resolution:=optional,
......@@ -92,7 +85,6 @@
org.objectweb.joram.client.jms.ha.local,
org.objectweb.joram.client.jms.ha.tcp,
org.objectweb.joram.client.jms.local,
org.objectweb.joram.client.jms.soap,
org.objectweb.joram.client.jms.tcp,
org.objectweb.joram.client.osgi</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
......@@ -121,10 +113,6 @@
<artifactId>joram-mom-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -919,22 +919,6 @@ public abstract class Destination extends AdministeredObject implements javax.jm
adminName = (String) ref.get("dest.adminName").getContent();
}
/**
* Codes a <code>Destination</code> as a Hashtable for travelling through the
* SOAP protocol.
*/
public Hashtable code() {
Hashtable h = new Hashtable();
h.put("agentId", getName());
h.put("type", new Byte(type));
return h;
}
public void decode(Hashtable h) {
agentId = (String) h.get("agentId");
type = ((Byte) h.get("type")).byteValue();
}
/**
* Administration method add interceptors.
*
......
......@@ -523,37 +523,4 @@ public abstract class AbstractConnectionFactory extends AdministeredObject {
setIdentityClassName((String) ref.get(prefix + ".identityClassName").getContent());
params.fromReference(ref, prefix);
}
/*
* SoapItf interface implementation.
*/
/**
* Codes a <code>ConnectionFactory</code> as a Hashtable for traveling
* through the SOAP protocol.
*/
public Hashtable code() {
return code(new Hashtable(), "cf");
}
public Hashtable code(Hashtable h, String prefix) {
if (reliableClass != null)
h.put(prefix + ".reliableClass", reliableClass);
h.put(prefix + ".identityClassName", identityClassName);
return params.code(h, prefix);
}
/**
* Implements the <code>decode</code> abstract method defined in the
* <code>fr.dyade.aaa.jndi2.soap.SoapObjectItf</code> interface.
*/
public void decode(Hashtable h) {
decode(h, "cf");
}
public void decode(Hashtable h, String prefix) {
reliableClass = (String) h.get(prefix + ".reliableClass");
identityClassName = (String) h.get(prefix + ".identityClassName");
params.decode(h, prefix);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2007 - 2008 ScalAgent Distributed Technologies
* Copyright (C) 2007 - 2012 ScalAgent Distributed Technologies
* Copyright (C) 2007 France Telecom R&D
*
* This library is free software; you can redistribute it and/or
......@@ -24,17 +24,16 @@
package org.objectweb.joram.client.jms.admin;
import java.io.Serializable;
import javax.naming.NamingException;
import javax.naming.Reference;
import fr.dyade.aaa.common.soap.SoapObjectItf;
/**
* The <code>AdministeredObject</code> class is the parent class of all
* JORAM administered objects.
*/
public abstract class AdministeredObject implements Serializable, javax.naming.Referenceable, SoapObjectItf {
public abstract class AdministeredObject implements Serializable, javax.naming.Referenceable {
/** define serialVersionUID for interoperability */
private static final long serialVersionUID = 1L;
......
......@@ -217,78 +217,4 @@ public class ClusterConnectionFactory extends org.objectweb.joram.client.jms.adm
i++;
}
}
// AF: The JNDI Soap access should translate the Reference object to
// an hashtable.
/**
* Codes a <code>ConnectionFactory</code> as a Hashtable for travelling
* through the SOAP protocol.
*/
public Hashtable code() {
Hashtable h = new Hashtable();
if (cluster == null) return h;
Map.Entry entries[] = new Map.Entry [cluster.size()];
cluster.entrySet().toArray(entries);
StringBuffer strbuf = new StringBuffer(15);
for (int i=0; i<entries.length; i++) {
strbuf.setLength(0);
strbuf.append("CF#").append(i).append(".key");
h.put(strbuf.toString(), entries[i].getKey());
ConnectionFactory cf = (ConnectionFactory) entries[i].getValue();
strbuf.setLength(0);
strbuf.append("CF#").append(i).append(".class");
h.put(strbuf.toString(), cf.getClass().getName());
strbuf.setLength(0);
strbuf.append("CF#").append(i);
cf.code(h, strbuf.toString());
}
return h;
}
/**
* Implements the <code>decode</code> abstract method defined in the
* <code>fr.dyade.aaa.jndi2.soap.SoapObjectItf</code> interface.
* <p>
* Actual implementation of the method is located in the
* tcp and soap sub classes.
*/
public void decode(Hashtable h) {
if (cluster == null) cluster = new Hashtable();
int i = 0;
StringBuffer strbuf = new StringBuffer(15);
while (true) {
strbuf.setLength(0);
strbuf.append("CF#").append(i).append(".key");
String key = (String) h.get(strbuf.toString());
if (key == null) break;
strbuf.setLength(0);
strbuf.append("CF#").append(i).append(".class");
String classname = (String) h.get(strbuf.toString());
try {
Class<?> clazz = Class.forName(classname);
ConnectionFactory cf = (ConnectionFactory) clazz.newInstance();
strbuf.setLength(0);
strbuf.append("CF#").append(i);
cf.decode(h, strbuf.toString());
cluster.put(key, cf);
} catch (Exception exc) {
if (logger.isLoggable(BasicLevel.ERROR))
logger.log(BasicLevel.ERROR, "", exc);
}
i++;
}
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2010 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2012 ScalAgent Distributed Technologies
* Copyright (C) 2004 - 2007 France Telecom R&D
* Copyright (C) 1996 - 2000 Dyade
*
......@@ -231,56 +231,4 @@ public class ClusterDestination extends Destination {
i++;
}
}
/**
* Codes a <code>ClusterDestination</code> as a Hashtable for
* travelling through the SOAP protocol.
*/
public Hashtable code() {
Hashtable h = new Hashtable();
Map.Entry entries[] = new Map.Entry [cluster.size()];
cluster.entrySet().toArray(entries);
StringBuffer strbuf = new StringBuffer(20);
for (int i=0; i<entries.length; i++) {
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".key");
h.put(strbuf.toString(), (String) entries[i].getKey());
Destination dest = (Destination) entries[i].getValue();
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".destName");
h.put(strbuf.toString(), dest.getName());
}
return h;
}
public void decode(Hashtable h) {
cluster = new Hashtable();
int i = 0;
Destination dest = null;
StringBuffer strbuf = new StringBuffer(20);
while (true) {
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".key");
String key = (String) h.get(strbuf.toString());
if (key == null) break;
strbuf.setLength(0);
strbuf.append("cluster#").append(i).append(".destName");
if (isQueue()) {
dest = new Queue((String) h.get(strbuf.toString()));
} else {
dest = new Topic((String) h.get(strbuf.toString()));
}
cluster.put(key, dest);
i++;
}
}
}
......@@ -105,8 +105,6 @@ public class JoramSaxWrapper extends DefaultHandler {
static final String ELT_HATCP = "hatcp";
/** Syntaxic name for halocal element */
static final String ELT_HALOCAL = "halocal";
/** Syntaxic name for soap element */
static final String ELT_SOAP = "soap";
/** Syntaxic name for jndi element */
static final String ELT_JNDI = "jndi";
/** Syntaxic name for Server element */
......@@ -490,30 +488,6 @@ public class JoramSaxWrapper extends DefaultHandler {
url = atts.getValue(ATT_URL);
reliableClass = atts.getValue(ATT_RELIABLECLASS);
} else if (rawName.equals(ELT_HALOCAL)) {
} else if (rawName.equals(ELT_SOAP)) {
host = atts.getValue(ATT_HOST);
if (!isSet(host))
host = "localhost";
try {
// Get the listen port of server for administrator connection.
String value = atts.getValue(ATT_PORT);
if (value == null)
port = DFLT_LISTEN_PORT;
else
port = Integer.parseInt(value);
} catch (NumberFormatException exc) {
throw new SAXException("bad value for port: " + atts.getValue(ATT_PORT));
}
try {
// Get the timeout attribute for this connection factory.
String value = atts.getValue(ATT_TIMEOUT);
if (value == null)
timeout = 60;
else
timeout = Integer.parseInt(value);
} catch (NumberFormatException exc) {
throw new SAXException("bad value for cnxTimer: " + atts.getValue(ATT_CNXTIMER));
}
} else if (rawName.equals(ELT_JNDI)) {
jndiName = atts.getValue(ATT_NAME);
} else if (rawName.equals(ELT_SERVER)) {
......@@ -880,20 +854,6 @@ public class JoramSaxWrapper extends DefaultHandler {
"JoramSaxWrapper: Cannot instantiate " + className, exc);
throw new SAXException(exc.getMessage());
}
} else if (rawName.equals(ELT_SOAP)) {
try {
Class<?> clazz = Class.forName(className);
Class<?>[] classParams = {new String().getClass(),
Integer.TYPE,
Integer.TYPE};
Method methode = clazz.getMethod("create", classParams);
Object[] objParams = {host, new Integer(port), new Integer(timeout)};
obj = methode.invoke(null, objParams);
} catch (Throwable exc) {
logger.log(BasicLevel.ERROR,
"JoramSaxWrapper: Cannot instantiate " + className, exc);
throw new SAXException(exc.getMessage());
}
} else if (rawName.equals(ELT_JNDI)) {
} else if (rawName.equals(ELT_SERVER)) {
if (logger.isLoggable(BasicLevel.DEBUG))
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2004 - 2011 ScalAgent Distributed Technologies
* Copyright (C) 2004 - 2012 ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
*
* This library is free software; you can redistribute it and/or
......@@ -822,23 +822,4 @@ public class User extends AdministeredObject implements UserMBean {
name = (String) ref.get("user.name").getContent();
proxyId = (String) ref.get("user.id").getContent();
}
/**
* Codes an <code>User</code> instance as a Hashtable for traveling
* through the SOAP protocol.
*/
public Hashtable code() {
Hashtable h = new Hashtable();
h.put("name", name);
h.put("proxyId", proxyId);
return h;
}
/**
* Decodes an <code>User</code> which traveled through the SOAP protocol.
*/
public void decode(Hashtable h) {
name = (String) h.get("name");
proxyId = (String) h.get("proxyId");
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.client.jms.soap;
import javax.jms.JMSException;
import org.objectweb.joram.client.jms.ConnectionFactory;
import org.objectweb.joram.client.jms.FactoryParameters;
import org.objectweb.joram.client.jms.QueueConnectionFactory;
import org.objectweb.joram.client.jms.connection.RequestChannel;
import org.objectweb.joram.shared.security.Identity;
/**
* A <code>QueueSoapConnectionFactory</code> instance is a factory of
* SOAP connections for PTP communication.
*
* @deprecated Replaced next to Joram 5.2.1 by {@link SoapConnectionFactory}.
*/
public class QueueSoapConnectionFactory extends QueueConnectionFactory {
/** define serialVersionUID for interoperability */
private static final long serialVersionUID = 1L;
/**
* Constructs an empty <code>QueueSoapConnectionFactory</code> instance.
* Needed by ObjectFactory, should only be used for internal purposes.
*/
public QueueSoapConnectionFactory() {}
/**
* Constructs a <code>QueueSoapConnectionFactory</code> instance.
*
* @param host Name or IP address of the server's host.
* @param port Server's listening port.
* @param timeout Duration in seconds during which a SOAP connection might
* be inactive before being considered as dead (0 for never).
*/
private QueueSoapConnectionFactory(String host, int port, int timeout) {
super(host, port);
params.cnxPendingTimer = timeout * 1000;
}
/**
* Creates the <code>SoapRequestChannel</code> object specific to the protocol used.
*
* @param params Connection configuration parameters.
* @param identity Client's identity.
* @param reliableClass The protocol specific class.
* @return The <code>RequestChannel</code> object specific to the protocol used.
*
* @exception JMSException A problem occurs during the connection.
*
* @see ConnectionFactory#createRequestChannel(FactoryParameters, Identity, String)
*/
protected RequestChannel createRequestChannel(FactoryParameters params,
Identity identity,
String reliableClass) throws JMSException {
return new SoapRequestChannel(params, identity);
}
/**
* Admin method creating a <code>javax.jms.QueueConnectionFactory</code>
* instance for creating SOAP connections with a given server.
*
* @param host Name or IP address of the server's host.
* @param port Server's listening port.
* @param timeout Duration in seconds during which a SOAP connection might
* be inactive before being considered as dead (0 for never).
*/
public static javax.jms.QueueConnectionFactory create(String host, int port, int timeout) {
return new QueueSoapConnectionFactory(host, port, timeout);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.client.jms.soap;
import javax.jms.JMSException;
import org.objectweb.joram.client.jms.ConnectionFactory;
import org.objectweb.joram.client.jms.FactoryParameters;
import org.objectweb.joram.client.jms.connection.RequestChannel;
import org.objectweb.joram.shared.security.Identity;
/**
* A <code>SoapConnectionFactory</code> instance is a factory of SOAP
* connections.
*/
public class SoapConnectionFactory extends ConnectionFactory {
/** define serialVersionUID for interoperability */
private static final long serialVersionUID = 1L;
/**
* Constructs an empty <code>SoapConnectionFactory</code> instance.
* Needed by ObjectFactory, should only be used for internal purposes.
*/
public SoapConnectionFactory() {}
/**
* Constructs a <code>SoapConnectionFactory</code> instance.
*
* @param host Name or IP address of the server's host.
* @param port Server's listening port.
* @param timeout Duration in seconds during which a SOAP connection might
* be inactive before being considered as dead (0 for never).
*/
private SoapConnectionFactory(String host, int port, int timeout) {
super(host, port);
params.cnxPendingTimer = timeout * 1000;
}
/**
* Creates the <code>SoapRequestChannel</code> object specific to the protocol used.
*
* @param params Connection configuration parameters.
* @param identity Client's identity.
* @param reliableClass The protocol specific class.
* @return The <code>RequestChannel</code> object specific to the protocol used.
*
* @exception JMSException A problem occurs during the connection.
*
* @see ConnectionFactory#createRequestChannel(FactoryParameters, Identity, String)
*/
protected RequestChannel createRequestChannel(FactoryParameters params,
Identity identity,
String reliableClass) throws JMSException {
return new SoapRequestChannel(params, identity);
}
/**
* Admin method creating a <code>javax.jms.ConnectionFactory</code>
* instance for creating SOAP connections with a given server.
*
* @param host Name or IP address of the server's host.
* @param port Server's listening port.
* @param timeout Duration in seconds during which a SOAP connection might
* be inactive before being considered as dead (0 for never).
*/
public static ConnectionFactory create(String host, int port, int timeout) {
return new SoapConnectionFactory(host, port, timeout);
}
}
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies
* Copyright (C) 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): Frederic Maistre (INRIA)
* Contributor(s): ScalAgent Distributed Technologies
*/
package org.objectweb.joram.client.jms.soap;
import javax.jms.JMSException;
import org.objectweb.joram.client.jms.ConnectionFactory;
import org.objectweb.joram.client.jms.FactoryParameters;
import org.objectweb.joram.client.jms.TopicConnectionFactory;