You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ke...@apache.org on 2007/05/09 07:44:20 UTC
svn commit: r536427 -
/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java
Author: keithc
Date: Tue May 8 22:44:19 2007
New Revision: 536427
URL: http://svn.apache.org/viewvc?view=rev&rev=536427
Log:
Fixing uri templating as it caused resolving problems in certain cases.
Modified:
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java?view=diff&rev=536427&r1=536426&r2=536427
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java Tue May 8 22:44:19 2007
@@ -17,20 +17,18 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.WSDL20DefaultValueHolder;
import org.apache.axis2.description.WSDL2Constants;
-import org.apache.axis2.util.JavaUtils;
import org.apache.woden.wsdl20.extensions.http.HTTPLocation;
import org.apache.woden.wsdl20.extensions.http.HTTPLocationTemplate;
import javax.xml.namespace.QName;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
-import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.util.Iterator;
@@ -223,7 +221,13 @@
if (replacedQuery.charAt(0) == '?') {
appendedURI = new URI(targetURL.toString() + replacedQuery);
} else {
- targetURI = new URI(targetURL.toString() + "/");
+
+ String uriString = targetURL.toString();
+ if (!uriString.endsWith("/")) {
+ targetURI = new URI(uriString + "/");
+ } else {
+ targetURI = new URI(uriString);
+ }
appendedURI = targetURI.resolve(replacedQuery);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org