Index: modules/client/pom.xml
===================================================================
--- modules/client/pom.xml	(revision 16959)
+++ modules/client/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
Index: modules/core/pom.xml
===================================================================
--- modules/core/pom.xml	(revision 16959)
+++ modules/core/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
Index: modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java	(revision 16959)
+++ modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java	(working copy)
@@ -513,7 +513,7 @@
 
    /** Get the temp file for a given namespace
     */
-   public static File getSchemaTempFile(String targetNS, String fileName) throws IOException
+   public static File getSchemaTempFile(String targetNS,  byte[] fileContent) throws IOException
    {
       if (targetNS.length() == 0)
          throw new IllegalArgumentException("Invalid null target namespace");
@@ -544,11 +544,11 @@
       fname = fname.replace('#', '_');
 
       File file = null;
-      if (fileName != null)
+      if (fileContent != null)
       {
          try
          {
-            String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
+            String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileContent));
             if(tmpdir == null)
             {
                tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
Index: modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java	(revision 16959)
+++ modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java	(working copy)
@@ -21,10 +21,14 @@
  */
 package org.jboss.ws.tools.wsdl;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -109,6 +113,7 @@
 import org.jboss.ws.tools.JavaToXSD;
 import org.jboss.wsf.common.DOMUtils;
 import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.IOUtils;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -267,7 +272,8 @@
    {
       for (File current : tempFiles)
       {
-         current.deleteOnExit();
+    	 //TODO: look at how to remove tmp file correctly
+         //current.delete();
       }
    }
 
@@ -530,6 +536,17 @@
       importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
       schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
 
+      byte[] wsdlContent = null;
+
+      InputStream inputStream = wsdlLoc.openStream();
+     
+      ByteArrayOutputStream bout = new ByteArrayOutputStream();
+      IOUtils.copyStream(bout, inputStream);
+      wsdlContent = bout.toByteArray();
+      inputStream.close();
+      bout.close();
+
+
       String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
       File tmpFile = null;
 
@@ -544,14 +561,14 @@
       {
          log.trace("processSchemaInclude: [targetNS=" + targetNS + ",parentURL=" + wsdlLoc + "]");
 
-         tmpFile = SchemaUtils.getSchemaTempFile(targetNS, getFileName(wsdlLoc));
+         tmpFile = SchemaUtils.getSchemaTempFile(targetNS, wsdlContent);
          tempFiles.add(tmpFile);
 
          publishedLocations.put(wsdlLoc, tmpFile.toURL());
       }
       else
       {
-         tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", getFileName(wsdlLoc));
+         tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", wsdlContent);
          tempFiles.add(tmpFile);
 
          publishedLocations.put(wsdlLoc, tmpFile.toURL());
Index: modules/endorsed/pom.xml
===================================================================
--- modules/endorsed/pom.xml	(revision 16959)
+++ modules/endorsed/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
Index: modules/management/pom.xml
===================================================================
--- modules/management/pom.xml	(revision 16959)
+++ modules/management/pom.xml	(working copy)
@@ -8,7 +8,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
Index: modules/resources/pom.xml
===================================================================
--- modules/resources/pom.xml	(revision 16959)
+++ modules/resources/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
   
Index: modules/testsuite/framework-tests/pom.xml
===================================================================
--- modules/testsuite/framework-tests/pom.xml	(revision 16959)
+++ modules/testsuite/framework-tests/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native-testsuite</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
   
Index: modules/testsuite/native-tests/pom.xml
===================================================================
--- modules/testsuite/native-tests/pom.xml	(revision 16959)
+++ modules/testsuite/native-tests/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native-testsuite</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
Index: modules/testsuite/pom.xml
===================================================================
--- modules/testsuite/pom.xml	(revision 16959)
+++ modules/testsuite/pom.xml	(working copy)
@@ -9,7 +9,7 @@
   <parent>
     <groupId>org.jboss.ws.native</groupId>
     <artifactId>jbossws-native</artifactId>
-    <version>3.1.2.SP14</version>
+    <version>3.1.2.SP14-rsvoboda-2</version>
     <relativePath>../../pom.xml</relativePath>
   </parent>
 
@@ -41,6 +41,10 @@
       <artifactId>jbossws-framework</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-common</artifactId>
+    </dependency>
+    <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
     </dependency>
@@ -235,6 +239,10 @@
               <name>use.hornetq</name>
               <value>${use.hornetq}</value>
             </property>
+            <property>
+              <name>org.jboss.ws.client.remoting.disconnect.after.use</name>
+              <value>false</value>
+            </property>
           </systemProperties>
         </configuration>
       </plugin>
@@ -329,6 +337,30 @@
           <groupId>org.jboss.jbossas</groupId>
           <artifactId>jboss-as-ejb3</artifactId>
           <version>${jboss.version}</version>
+
+ <exclusions>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-aspects</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-jmx</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-mc</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop</artifactId>
+        </exclusion>
+      </exclusions>
+
         </dependency>
         <dependency>
           <groupId>org.jboss.jbossas</groupId>
@@ -340,6 +372,33 @@
           <artifactId>hornetq-jms-client</artifactId>
           <version>${hornetq.version}</version>
         </dependency>
+
+<dependency>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-aspects</artifactId>
+          <version>2.1.6.GA-rsvoboda</version>
+        </dependency>
+        <dependency>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-core</artifactId>
+          <version>2.1.6.GA-rsvoboda</version>
+        </dependency>
+        <dependency>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-jmx</artifactId>
+          <version>2.1.6.GA-rsvoboda</version>
+        </dependency>
+        <dependency>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop-asintegration-mc</artifactId>
+          <version>2.1.6.GA-rsvoboda</version>
+        </dependency>
+        <dependency>
+          <groupId>org.jboss.aop</groupId> 
+          <artifactId>jboss-aop</artifactId>
+          <version>2.1.6.GA-rsvoboda</version>
+        </dependency>
+
       </dependencies>
       <build>
         <plugins>
Index: pom.xml
===================================================================
--- pom.xml	(revision 16959)
+++ pom.xml	(working copy)
@@ -17,7 +17,7 @@
   <artifactId>jbossws-native</artifactId>
   <packaging>pom</packaging>
 
-  <version>3.1.2.SP14</version>
+  <version>3.1.2.SP14-rsvoboda-2</version>
 
   <!-- Parent -->
   <parent>
@@ -44,7 +44,7 @@
 
   <!-- Properties -->
   <properties>
-    <jbossws.common.version>1.1.0.SP9</jbossws.common.version>
+    <jbossws.common.version>1.1.0.SP9-patched</jbossws.common.version>
     <jbossws.framework.version>3.1.2.SP12</jbossws.framework.version>
     <jbossws.spi.version>1.1.2.SP8</jbossws.spi.version>
     <!-- [JBWS-2505] -->
@@ -96,6 +96,12 @@
         <groupId>org.jboss.ws</groupId>
         <artifactId>jbossws-framework</artifactId>
         <version>${jbossws.framework.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.jboss.ws</groupId>
+            <artifactId>jbossws-common</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.jboss.ws</groupId>
