cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1544705 - /cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Date Fri, 22 Nov 2013 22:35:45 GMT
Author: sergeyb
Date: Fri Nov 22 22:35:45 2013
New Revision: 1544705

URL: http://svn.apache.org/r1544705
Log:
[CXF-5418] WebClient should have only absolute path exclusing the queries added to its syntesized
QName

Modified:
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=1544705&r1=1544704&r2=1544705&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Fri Nov 22 22:35:45 2013
@@ -200,8 +200,12 @@ public class JAXRSClientFactoryBean exte
      * @return WebClient instance
      */
     public WebClient createWebClient() {
-        
-        Service service = new JAXRSServiceImpl(getAddress(), getServiceName());
+        String serviceAddress = getAddress();
+        int queryIndex = serviceAddress != null ? serviceAddress.lastIndexOf('?') : -1;
+        if (queryIndex != -1) {
+            serviceAddress = serviceAddress.substring(0, queryIndex);
+        }
+        Service service = new JAXRSServiceImpl(serviceAddress, getServiceName());
         getServiceFactory().setService(service);
         
         try {



Mime
View raw message