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

JORAM-29: removed the Joram SOAP.

parent 4f4d8c6d
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
fr.dyade.aaa.common.net, fr.dyade.aaa.common.net,
fr.dyade.aaa.common.osgi, fr.dyade.aaa.common.osgi,
fr.dyade.aaa.common.stream, fr.dyade.aaa.common.stream,
fr.dyade.aaa.common.soap,
fr.dyade.aaa.util.management</Export-Package> fr.dyade.aaa.util.management</Export-Package>
<Import-Package>javax.management;resolution:=optional, <Import-Package>javax.management;resolution:=optional,
org.objectweb.util.monolog, 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 @@ ...@@ -62,7 +62,6 @@
<include>org.ow2.spec.ee:ow2-connector-1.5-spec</include> <include>org.ow2.spec.ee:ow2-connector-1.5-spec</include>
<include>org.ow2.jonas.osgi:monolog</include> <include>org.ow2.jonas.osgi:monolog</include>
<include>javax.mail:mail</include> <include>javax.mail:mail</include>
<include>soap:soap</include>
<include>org.ow2.joram:joram-client-jca</include> <include>org.ow2.joram:joram-client-jca</include>
</includes> </includes>
<useProjectArtifact>false</useProjectArtifact> <useProjectArtifact>false</useProjectArtifact>
......
...@@ -212,10 +212,6 @@ ...@@ -212,10 +212,6 @@
<groupId>javax.mail</groupId> <groupId>javax.mail</groupId>
<artifactId>mail</artifactId> <artifactId>mail</artifactId>
</dependency> </dependency>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.ow2.joram</groupId> <groupId>org.ow2.joram</groupId>
<artifactId>joram-client-jca</artifactId> <artifactId>joram-client-jca</artifactId>
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
fr.dyade.aaa.common, fr.dyade.aaa.common,
fr.dyade.aaa.common.net, fr.dyade.aaa.common.net,
fr.dyade.aaa.common.stream, fr.dyade.aaa.common.stream,
fr.dyade.aaa.common.soap,
fr.dyade.aaa.util.management, fr.dyade.aaa.util.management,
javax.jms, javax.jms,
javax.management;resolution:=optional, javax.management;resolution:=optional,
...@@ -54,12 +53,6 @@ ...@@ -54,12 +53,6 @@
javax.transaction, javax.transaction,
javax.transaction.xa, javax.transaction.xa,
javax.xml.parsers, 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.dest;resolution:=optional,
org.objectweb.joram.mom.notifications;resolution:=optional, org.objectweb.joram.mom.notifications;resolution:=optional,
org.objectweb.joram.mom.proxies;resolution:=optional, org.objectweb.joram.mom.proxies;resolution:=optional,
...@@ -92,7 +85,6 @@ ...@@ -92,7 +85,6 @@
org.objectweb.joram.client.jms.ha.local, org.objectweb.joram.client.jms.ha.local,
org.objectweb.joram.client.jms.ha.tcp, org.objectweb.joram.client.jms.ha.tcp,
org.objectweb.joram.client.jms.local, org.objectweb.joram.client.jms.local,
org.objectweb.joram.client.jms.soap,
org.objectweb.joram.client.jms.tcp, org.objectweb.joram.client.jms.tcp,
org.objectweb.joram.client.osgi</Export-Package> org.objectweb.joram.client.osgi</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package> <DynamicImport-Package>*</DynamicImport-Package>
...@@ -121,10 +113,6 @@ ...@@ -121,10 +113,6 @@
<artifactId>joram-mom-core</artifactId> <artifactId>joram-mom-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>soap</groupId>
<artifactId>soap</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -919,22 +919,6 @@ public abstract class Destination extends AdministeredObject implements javax.jm ...@@ -919,22 +919,6 @@ public abstract class Destination extends AdministeredObject implements javax.jm
adminName = (String) ref.get("dest.adminName").getContent(); 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. * Administration method add interceptors.
* *
......
...@@ -523,37 +523,4 @@ public abstract class AbstractConnectionFactory extends AdministeredObject { ...@@ -523,37 +523,4 @@ public abstract class AbstractConnectionFactory extends AdministeredObject {
setIdentityClassName((String) ref.get(prefix + ".identityClassName").getContent()); setIdentityClassName((String) ref.get(prefix + ".identityClassName").getContent());
params.fromReference(ref, prefix); 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 * 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 * Copyright (C) 2007 France Telecom R&D
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -24,17 +24,16 @@ ...@@ -24,17 +24,16 @@
package org.objectweb.joram.client.jms.admin; package org.objectweb.joram.client.jms.admin;
import java.io.Serializable; import java.io.Serializable;
import javax.naming.NamingException; import javax.naming.NamingException;
import javax.naming.Reference; import javax.naming.Reference;
import fr.dyade.aaa.common.soap.SoapObjectItf;
/** /**
* The <code>AdministeredObject</code> class is the parent class of all * The <code>AdministeredObject</code> class is the parent class of all
* JORAM administered objects. * 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 */ /** define serialVersionUID for interoperability */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -217,78 +217,4 @@ public class ClusterConnectionFactory extends org.objectweb.joram.client.jms.adm ...@@ -217,78 +217,4 @@ public class ClusterConnectionFactory extends org.objectweb.joram.client.jms.adm
i++; 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 * 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) 2004 - 2007 France Telecom R&D
* Copyright (C) 1996 - 2000 Dyade * Copyright (C) 1996 - 2000 Dyade
* *
...@@ -231,56 +231,4 @@ public class ClusterDestination extends Destination { ...@@ -231,56 +231,4 @@ public class ClusterDestination extends Destination {
i++; 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 { ...@@ -105,8 +105,6 @@ public class JoramSaxWrapper extends DefaultHandler {
static final String ELT_HATCP = "hatcp"; static final String ELT_HATCP = "hatcp";
/** Syntaxic name for halocal element */ /** Syntaxic name for halocal element */
static final String ELT_HALOCAL = "halocal"; static final String ELT_HALOCAL = "halocal";
/** Syntaxic name for soap element */
static final String ELT_SOAP = "soap";
/** Syntaxic name for jndi element */ /** Syntaxic name for jndi element */
static final String ELT_JNDI = "jndi"; static final String ELT_JNDI = "jndi";
/** Syntaxic name for Server element */ /** Syntaxic name for Server element */
...@@ -490,30 +488,6 @@ public class JoramSaxWrapper extends DefaultHandler { ...@@ -490,30 +488,6 @@ public class JoramSaxWrapper extends DefaultHandler {
url = atts.getValue(ATT_URL); url = atts.getValue(ATT_URL);
reliableClass = atts.getValue(ATT_RELIABLECLASS); reliableClass = atts.getValue(ATT_RELIABLECLASS);
} else if (rawName.equals(ELT_HALOCAL)) { } 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)) { } else if (rawName.equals(ELT_JNDI)) {
jndiName = atts.getValue(ATT_NAME); jndiName = atts.getValue(ATT_NAME);
} else if (rawName.equals(ELT_SERVER)) { } else if (rawName.equals(ELT_SERVER)) {
...@@ -880,20 +854,6 @@ public class JoramSaxWrapper extends DefaultHandler { ...@@ -880,20 +854,6 @@ public class JoramSaxWrapper extends DefaultHandler {
"JoramSaxWrapper: Cannot instantiate " + className, exc); "JoramSaxWrapper: Cannot instantiate " + className, exc);
throw new SAXException(exc.getMessage()); 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_JNDI)) {
} else if (rawName.equals(ELT_SERVER)) { } else if (rawName.equals(ELT_SERVER)) {
if (logger.isLoggable(BasicLevel.DEBUG)) if (logger.isLoggable(BasicLevel.DEBUG))
......
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * 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 * Copyright (C) 2004 Bull SA
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -822,23 +822,4 @@ public class User extends AdministeredObject implements UserMBean { ...@@ -822,23 +822,4 @@ public class User extends AdministeredObject implements UserMBean {
name = (String) ref.get("user.name").getContent(); name = (String) ref.get("user.name").getContent();
proxyId = (String) ref.get("user.id").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;