You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by to...@apache.org on 2004/11/12 18:26:39 UTC
cvs commit: ws-axis/java/src/org/apache/axis/deployment/wsdd WSDDDeployment.java
tomj 2004/11/12 09:26:39
Modified: java/src/org/apache/axis/deployment/wsdd WSDDDeployment.java
Log:
Fix a problem with WSDD type mappings. If you registered the same QName
in both encoded and literal, encoding styles the last one "wins",
which is bad.
Make the Map in to a List, since we never used the keys in the map for anything.
Add missing JavaDoc comments where there was "XXX".
Revision Changes Path
1.61 +24 -17 ws-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java
Index: WSDDDeployment.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployment.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- WSDDDeployment.java 8 Jun 2004 19:44:56 -0000 1.60
+++ WSDDDeployment.java 12 Nov 2004 17:26:39 -0000 1.61
@@ -60,7 +60,7 @@
private HashMap handlers = new HashMap();
private HashMap services = new HashMap();
private HashMap transports = new HashMap();
- private HashMap typeMappings = new HashMap();
+ private ArrayList typeMappings = new ArrayList();
private WSDDGlobalConfiguration globalConfig = null;
/** Mapping of namespaces -> services */
@@ -154,8 +154,7 @@
public void deployTypeMapping(WSDDTypeMapping typeMapping)
throws WSDDException
{
- QName qname = typeMapping.getQName();
- typeMappings.put(qname, typeMapping);
+ typeMappings.add(typeMapping);
if (tmrDeployed)
deployMapping(typeMapping);
@@ -170,8 +169,8 @@
/**
* Create an element in WSDD that wraps an extant DOM element
- * @param e (Element) XXX
- * @throws WSDDException XXX
+ * @param e the element to create the deployment from
+ * @throws WSDDException when problems occur deploying a service or type mapping.
*/
public WSDDDeployment(Element e)
throws WSDDException
@@ -270,7 +269,7 @@
service.deployToRegistry(target);
}
- i = typeMappings.values().iterator();
+ i = typeMappings.iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping) i.next();
target.deployTypeMapping(mapping);
@@ -355,7 +354,7 @@
transport.writeToContext(context);
}
- i = typeMappings.values().iterator();
+ i = typeMappings.iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping)i.next();
mapping.writeToContext(context);
@@ -366,7 +365,7 @@
/**
* Get our global configuration
*
- * @return XXX
+ * @return a global configuration object
*/
public WSDDGlobalConfiguration getGlobalConfiguration()
{
@@ -379,12 +378,12 @@
/**
*
- * @return XXX
+ * @return an array of type mappings in this deployment
*/
public WSDDTypeMapping[] getTypeMappings()
{
WSDDTypeMapping[] t = new WSDDTypeMapping[typeMappings.size()];
- typeMappings.values().toArray(t);
+ typeMappings.toArray(t);
return t;
}
@@ -407,9 +406,10 @@
}
/**
+ * Return an instance of the named handler.
*
- * @param name XXX
- * @return XXX
+ * @param name the name of the handler to get
+ * @return an Axis handler with the specified QName or null of not found
*/
public Handler getHandler(QName name) throws ConfigurationException
{
@@ -422,9 +422,12 @@
}
/**
+ * Retrieve an instance of the named transport.
*
- * @param name XXX
- * @return XXX
+ * @param name the <code>QName</code> of the transport
+ * @return a <code>Handler</code> implementing the transport
+ * @throws ConfigurationException if there was an error resolving the
+ * transport
*/
public Handler getTransport(QName name) throws ConfigurationException
{
@@ -437,9 +440,13 @@
}
/**
+ * Retrieve an instance of the named service.
*
- * @param name XXX
- * @return XXX
+ * @param name the <code>QName</code> identifying the
+ * <code>Service</code>
+ * @return the <code>Service</code> associated with <code>qname</code>
+ * @throws ConfigurationException if there was an error resolving the
+ * qname
*/
public SOAPService getService(QName name) throws ConfigurationException
{
@@ -478,7 +485,7 @@
private boolean tmrDeployed = false;
public TypeMappingRegistry getTypeMappingRegistry() throws ConfigurationException {
if (false == tmrDeployed) {
- Iterator i = typeMappings.values().iterator();
+ Iterator i = typeMappings.iterator();
while (i.hasNext()) {
WSDDTypeMapping mapping = (WSDDTypeMapping) i.next();
deployMapping(mapping);