You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2007/05/20 18:58:50 UTC
svn commit: r539893 -
/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
Author: dwoods
Date: Sun May 20 09:58:49 2007
New Revision: 539893
URL: http://svn.apache.org/viewvc?view=rev&rev=539893
Log:
GERONIMO-3176 ArrayIndexOutOfBound happens for WebServices. Also added a couple debug log calls. Lasantha, thanks for the patch.
Modified:
geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java?view=diff&rev=539893&r1=539892&r2=539893
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java (original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java Sun May 20 09:58:49 2007
@@ -57,6 +57,8 @@
import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
import org.apache.axis2.jaxws.server.JAXWSMessageReceiver;
import org.apache.axis2.wsdl.WSDLUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.geronimo.jaxws.PortInfo;
import org.apache.ws.commons.schema.XmlSchemaComplexType;
import org.apache.ws.commons.schema.XmlSchemaElement;
@@ -70,6 +72,7 @@
* @version $Rev$ $Date$
*/
public class AxisServiceGenerator {
+ private static final Log log = LogFactory.getLog(AxisServiceGenerator.class);
private static String WSDL_ENCODING = "UTF-8";
@@ -134,9 +137,13 @@
}
List<ServiceDescription> serviceDescList = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);
- ServiceDescription sd = serviceDescList.get(0);
- Parameter serviceDescription = new Parameter(EndpointDescription.AXIS_SERVICE_PARAMETER, sd.getEndpointDescriptions()[0]);
- service.addParameter(serviceDescription);
+ if ((serviceDescList != null) && (serviceDescList.size() > 0)) {
+ ServiceDescription sd = serviceDescList.get(0);
+ Parameter serviceDescription = new Parameter(EndpointDescription.AXIS_SERVICE_PARAMETER, sd.getEndpointDescriptions()[0]);
+ service.addParameter(serviceDescription);
+ } else {
+ log.debug("No ServiceDescriptions found.");
+ }
return service;
}
@@ -162,9 +169,10 @@
protected Definition getWSDLDefinition(PortInfo portInfo, URL configurationBaseUrl, ClassLoader classLoader) throws IOException, WSDLException {
String wsdlFile = portInfo.getWsdlFile();
Definition wsdlDefinition = null;
- if(wsdlFile == null || wsdlFile.equals(""))
+ if (wsdlFile == null || wsdlFile.equals("")) {
+ log.debug("A WSDL file was not supplied.");
return null;
- else {
+ } else {
URL wsdlURL = getWsdlURL(wsdlFile, configurationBaseUrl, classLoader);
InputStream wsdlStream;
try {