Author: objectiser
Date: 2010-08-18 10:15:46 -0400 (Wed, 18 Aug 2010)
New Revision: 911
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
Log:
RIFTSAW-271 - fix issue where security artifacts are not deployed with jaxws web service
when wsdl is placed in a sub-folder.
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java 2010-08-10
16:01:49 UTC (rev 910)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java 2010-08-18
14:15:46 UTC (rev 911)
@@ -60,13 +60,13 @@
return this;
}
- public DeploymentBuilder setWSDL(File wsdl)
+ public DeploymentBuilder setWSDL(File wsdl, File root)
{
copy(wsdl, new File(this.wsdlDir, wsdl.getName()));
// any related artifact as well (brute force, I know)
- File parent = wsdl.getParentFile();
- assert parent.isDirectory();
+ //File parent = wsdl.getParentFile();
+ //assert parent.isDirectory();
FileFilter filter = new FileFilter()
{
@@ -88,7 +88,7 @@
}
};
- for(File f : parent.listFiles(filter))
+ for(File f : root.listFiles(filter))
{
if(f.equals(wsdl)) continue;
copy(f, new File(this.wsdlDir, f.getName()));
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-08-10
16:01:49 UTC (rev 910)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-08-18
14:15:46 UTC (rev 911)
@@ -35,6 +35,7 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.Kernel;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.soa.bpel.deployer.BPELDeploymentUnit;
import org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl;
import org.jboss.soa.bpel.runtime.engine.ode.ExecutionEnvironment;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIClientFactory;
@@ -105,12 +106,23 @@
{
try
{
+ File wsdlFile=new File(wsdlRef.getWsdlURL().toURI());
+ // Find deployment root folder
+ File root=wsdlFile.getParentFile();
+
+ while (root != null && !(new File(root,
+ BPELDeploymentUnit.BPEL_DEPLOY_XML).exists())) {
+ root = root.getParentFile();
+ }
+
+ if (root == null) {
+ throw new EndpointManagementException("Failed to locate root folder of BPEL
deployment unit");
+ }
+
// Check if a handler file has been specified
- File wsdlFile=new File(wsdlRef.getWsdlURL().toURI());
+ File handlerFile=new File(root, "jws_handlers.xml");
- File handlerFile=new File(wsdlFile.getParentFile(), "jws_handlers.xml");
-
if (handlerFile.exists() == false) {
handlerFile = null;
}
@@ -133,7 +145,7 @@
// create deployment structure (maybe replaced by shrinkwrap)
File warArchive = new DeploymentBuilder(serverConfig)
.setEndpoint(metaData.getEndpointId())
- .setWSDL(wsdlFile)
+ .setWSDL(wsdlFile, root)
.setProvider(providerImpl)
.build();
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java 2010-08-10
16:01:49 UTC (rev 910)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/DeploymentBuilder.java 2010-08-18
14:15:46 UTC (rev 911)
@@ -60,13 +60,13 @@
return this;
}
- public DeploymentBuilder setWSDL(File wsdl)
+ public DeploymentBuilder setWSDL(File wsdl, File root)
{
copy(wsdl, new File(this.wsdlDir, wsdl.getName()));
// any related artifact as well (brute force, I know)
- File parent = wsdl.getParentFile();
- assert parent.isDirectory();
+ //File parent = wsdl.getParentFile();
+ //assert parent.isDirectory();
FileFilter filter = new FileFilter()
{
@@ -88,7 +88,7 @@
}
};
- for(File f : parent.listFiles(filter))
+ for(File f : root.listFiles(filter))
{
if(f.equals(wsdl)) continue;
copy(f, new File(this.wsdlDir, f.getName()));
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-08-10
16:01:49 UTC (rev 910)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-08-18
14:15:46 UTC (rev 911)
@@ -35,6 +35,7 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.Kernel;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.soa.bpel.deployer.BPELDeploymentUnit;
import org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl;
import org.jboss.soa.bpel.runtime.engine.ode.ExecutionEnvironment;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIClientFactory;
@@ -105,12 +106,23 @@
{
try
{
+ File wsdlFile=new File(wsdlRef.getWsdlURL().toURI());
+ // Find deployment root folder
+ File root=wsdlFile.getParentFile();
+
+ while (root != null && !(new File(root,
+ BPELDeploymentUnit.BPEL_DEPLOY_XML).exists())) {
+ root = root.getParentFile();
+ }
+
+ if (root == null) {
+ throw new EndpointManagementException("Failed to locate root folder of BPEL
deployment unit");
+ }
+
// Check if a handler file has been specified
- File wsdlFile=new File(wsdlRef.getWsdlURL().toURI());
+ File handlerFile=new File(root, "jws_handlers.xml");
- File handlerFile=new File(wsdlFile.getParentFile(), "jws_handlers.xml");
-
if (handlerFile.exists() == false) {
handlerFile = null;
}
@@ -133,7 +145,7 @@
// create deployment structure (maybe replaced by shrinkwrap)
File warArchive = new DeploymentBuilder(serverConfig)
.setEndpoint(metaData.getEndpointId())
- .setWSDL(wsdlFile)
+ .setWSDL(wsdlFile, root)
.setProvider(providerImpl)
.build();
@@ -249,7 +261,7 @@
// unregister
endpointMapping.remove(key);
-
+
if (log.isDebugEnabled()) {
log.debug("Undeployed web service with deploymentId="+deploymentId);
}
Show replies by date