cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r772658 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf: attachment/AttachmentSerializer.java transport/http/WSDLQueryHandler.java
Date Thu, 07 May 2009 14:28:58 GMT
Author: dkulp
Date: Thu May  7 14:28:58 2009
New Revision: 772658

URL: http://svn.apache.org/viewvc?rev=772658&view=rev
Log:
[CXF-2184, CXF-2203] Fix attachment serializer id formatting
Use given URL for imported schemas in ?wsdl

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java?rev=772658&r1=772657&r2=772658&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java Thu
May  7 14:28:58 2009
@@ -127,7 +127,7 @@
         writer.write("Content-ID: <");
         if (attachmentId.charAt(0) == '<'
             && attachmentId.charAt(attachmentId.length() - 1) == '>') {
-            attachmentId = attachmentId.substring(1, attachmentId.length() - 2);
+            attachmentId = attachmentId.substring(1, attachmentId.length() - 1);
         }
         writer.write(URLDecoder.decode(attachmentId, "UTF-8"));
         writer.write(">\r\n\r\n");

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=772658&r1=772657&r2=772658&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java Thu
May  7 14:28:58 2009
@@ -109,7 +109,15 @@
         try {
             int idx = baseUri.toLowerCase().indexOf("?");
             Map<String, String> params = UrlUtilities.parseQueryString(baseUri.substring(idx
+ 1));
-            String base = baseUri.substring(0, baseUri.toLowerCase().indexOf("?"));
+
+            String base;
+            
+            if (endpointInfo.getProperty("publishedEndpointUrl") != null) {
+                base = String.valueOf(endpointInfo.getProperty("publishedEndpointUrl"));
+            } else {
+                base = baseUri.substring(0, baseUri.toLowerCase().indexOf("?"));
+            }
+
             String wsdl = params.get("wsdl");
             String xsd =  params.get("xsd");
             



Mime
View raw message