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 ke...@apache.org on 2007/04/25 10:52:11 UTC
svn commit: r532266 - in
/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2:
description/WSDL20ToAxisServiceBuilder.java
engine/HTTPLocationBasedDispatcher.java
Author: keithc
Date: Wed Apr 25 01:52:10 2007
New Revision: 532266
URL: http://svn.apache.org/viewvc?view=rev&rev=532266
Log:
Avoiding potential null pointer in HTTPLocationBasedDispatcher
Fixing /WSDL20ToAxisServiceBuilder to populate httplocationTable in descending order. Needed in order to dispatch using httpLocation
Modified:
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=532266&r1=532265&r2=532266
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Wed Apr 25 01:52:10 2007
@@ -69,6 +69,7 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
+import java.util.Comparator;
/*
* Copyright 2004,2005 The Apache Software Foundation.
@@ -420,7 +421,12 @@
// Capture all the binding specific properties
- Map httpLocationTable = new TreeMap();
+ // Set a comparator so tha httpLocations are stored in decending order
+ Map httpLocationTable = new TreeMap(new Comparator(){
+ public int compare(Object o1, Object o2) {
+ return (-1 * ((Comparable)o1).compareTo(o2));
+ }
+ });
SOAPBindingExtensionsImpl soapBindingExtensions = null;
try {
soapBindingExtensions = (SOAPBindingExtensionsImpl) binding
@@ -639,8 +645,12 @@
private void processHTTPBindingExtention(Binding binding, AxisBinding axisBinding)
throws AxisFault {
-
- Map httpLocationTable = new TreeMap();
+ // Set a comparator so tha httpLocations are stored in decending order
+ Map httpLocationTable = new TreeMap(new Comparator(){
+ public int compare(Object o1, Object o2) {
+ return (-1 * ((Comparable)o1).compareTo(o2));
+ }
+ });
// Capture all the binding specific properties
HTTPBindingExtensionsImpl httpBindingExtensions = null;
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java?view=diff&rev=532266&r1=532265&r2=532266
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java Wed Apr 25 01:52:10 2007
@@ -96,13 +96,15 @@
}
}
- index = service.indexOf("/");
- if (-1 != index) {
- service = service.substring(index);
- } else {
- int queryIndex = path.indexOf("?");
- if (queryIndex != -1) {
- service = service.substring(queryIndex);
+ if (service != null) {
+ index = service.indexOf("/");
+ if (-1 != index) {
+ service = service.substring(index);
+ } else {
+ int queryIndex = path.indexOf("?");
+ if (queryIndex != -1) {
+ service = service.substring(queryIndex);
+ }
}
}
return service;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org