Author: alessio.soldano(a)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(a)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,1...
+
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
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) : "";
+ }
+ }
}