[jbossws-commits] JBossWS SVN: r17197 - in stack/cxf/branches/jbossws-cxf-4.0.x: modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Jan 8 07:02:28 EST 2013


Author: alessio.soldano at jboss.com
Date: 2013-01-08 07:02:28 -0500 (Tue, 08 Jan 2013)
New Revision: 17197

Modified:
   stack/cxf/branches/jbossws-cxf-4.0.x/
   stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
   stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java
Log:
[JBPAPP6-1767] EndpointPublisher: xsd imports cause deployment error unless placed in WEB-INF dir

Merged revisions 16646 via svnmerge from 
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk

.......
  r16646 | alessio.soldano at jboss.com | 2012-08-27 18:55:00 +0200 (Mon, 27 Aug 2012) | 2 lines
  
  [JBWS-3540] Derive expected schema location from path in wsdlLocation
.......



Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
   - https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748-15757,15765-15766,15768,15770-15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15883,15885-15896,15900-15920,15936,15965,15967,15973,16067-16075,16077-16083,16085-16087,16091-16093,16095-16096,16098-16100,16103-16107,16111-16121,16124-16126,16128-16157,16159-16160,16162-16163,16165-16183,16204-16225,16227,16230-16234,16241,16243-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16691,16696-16698,16702-16703,16705,16710-16711,16717,16719-16730,16732-16738,16782,16817,16914-16915,16918,16921-16923,16925-16928,16932-16937,16939-16941,16943-16946,16951,16953-16980,16982-17008,17011-17021,17023,17026-17037,17039-17040,17042,17044-17050,17053-17056,17058,17061,17067,17130-17134,17137-17141,17143-17169,17171
   + https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748-15757,15765-15766,15768,15770-15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15883,15885-15896,15900-15920,15936,15965,15967,15973,16067-16075,16077-16083,16085-16087,16091-16093,16095-16096,16098-16100,16103-16107,16111-16121,16124-16126,16128-16157,16159-16160,16162-16163,16165-16183,16204-16225,16227,16230-16234,16241,16243-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16646,16691,16696-16698,16702-16703,16705,16710-16711,16717,16719-16730,16732-16738,16782,16817,16914-16915,16918,16921-16923,16925-16928,16932-16937,16939-16941,16943-16946,16951,16953-16980,16982-17008,17011-17021,17023,17026-17037,17039-17040,17042,17044-17050,17053-17056,17058,17061,17067,17130-17134,17137-17141,17143-17169,17171
Modified: svn:mergeinfo
   - /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16691,16729-16730,16738,16782,16817,16914,16943-16944,16951,16996-16997,17042,17061,17067,17130,17138-17141,17171
   + /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773,15780-15781,15784,15794,15806-15808,15824,15835,15837-15857,15859,15866,15879-15881,15886-15889,15896,15900-15920,15936,15965,15967,15973,16067,16071,16086-16087,16096,16176,16183,16204-16205,16227,16230,16244-16245,16306,16315,16323,16407-16408,16412,16418,16516,16530-16532,16619,16636-16644,16646,16691,16729-16730,16738,16782,16817,16914,16943-16944,16951,16996-16997,17042,17061,17067,17130,17138-17141,17171

Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java	2013-01-08 12:01:16 UTC (rev 17196)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java	2013-01-08 12:02:28 UTC (rev 17197)
@@ -216,8 +216,12 @@
          Service service = endpoint.getService();
          try
          {
-            JaxWsImplementorInfo info = new JaxWsImplementorInfo(getImplementorClass());
-            wsdlPublisher.publishWsdlFiles(service.getName(), info.getWsdlLocation(), BusFactory.getThreadDefaultBus(false), service.getServiceInfos());
+            String wsdlLocation = getWsdlLocation();
+            if (wsdlLocation == null) {
+               JaxWsImplementorInfo info = new JaxWsImplementorInfo(getImplementorClass());
+               wsdlLocation = info.getWsdlLocation();
+            }
+            wsdlPublisher.publishWsdlFiles(service.getName(), wsdlLocation, BusFactory.getThreadDefaultBus(false), service.getServiceInfos());
          }
          catch (IOException ioe)
          {

Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java	2013-01-08 12:01:16 UTC (rev 17196)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java	2013-01-08 12:02:28 UTC (rev 17197)
@@ -89,10 +89,11 @@
          if (def != null)
          {
             List<String> published = new LinkedList<String>();
-            publishWsdlImports(wsdlPublishURL, def, published);
+            String expLocation = getExpLocation(wsdlLocation);
+            publishWsdlImports(wsdlPublishURL, def, published, expLocation);
 
             // Publish XMLSchema imports
-            publishSchemaImports(wsdlPublishURL, doc.getDocumentElement(), published);
+            publishSchemaImports(wsdlPublishURL, doc.getDocumentElement(), published, expLocation);
          }
          else
          {
@@ -181,4 +182,12 @@
 
       return result;
    }
+   
+   private String getExpLocation(String wsdlLocation) {
+      if (wsdlLocation == null || wsdlLocation.indexOf(expLocation) >= 0) {
+         return expLocation;
+      } else { //JBWS-3540
+         return wsdlLocation.contains("/") ? wsdlLocation.substring(0, wsdlLocation.lastIndexOf("/") + 1) : "";
+      }
+   }
 }



More information about the jbossws-commits mailing list