[jboss-svn-commits] JBL Code SVN: r28059 - in labs/jbossesb/trunk/product: services/soap and 5 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jul 15 11:48:31 EDT 2009


Author: kevin.conner at jboss.com
Date: 2009-07-15 11:48:31 -0400 (Wed, 15 Jul 2009)
New Revision: 28059

Added:
   labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientClasspathAspect.java
   labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/
   labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/CompilerAspect.java
Modified:
   labs/jbossesb/trunk/product/install/build.xml
   labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/trunk/product/services/soap/build.xml
   labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml
Log:
Fix wise WSDL compilation under as5: JBESB-2738

Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml	2009-07-15 15:08:54 UTC (rev 28058)
+++ labs/jbossesb/trunk/product/install/build.xml	2009-07-15 15:48:31 UTC (rev 28059)
@@ -150,7 +150,6 @@
 	        <!-- soap.esb -->
 	        <copy todir="${deploy.dir}/soap.esb"> 
 	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}, META-INF/jboss-structure.xml"/>
-	            <fileset dir="${client.dir}" includes="jboss-jaxws.jar jaxb-api.jar jaxb-impl.jar"/>
 	        </copy>
 	            
 	        <!-- slsb.esb -->
@@ -319,7 +318,6 @@
 	        <!-- soap.esb  -->
 	        <copy todir="${deploy.dir}/soap.esb">
 	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}"/>
-	            <fileset dir="${client.dir}" includes="jboss-jaxws.jar jaxb-api.jar jaxb-impl.jar"/>
 	        </copy>
 	                
 	        <!-- slsb.esb  -->

Added: labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientClasspathAspect.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientClasspathAspect.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientClasspathAspect.java	2009-07-15 15:48:31 UTC (rev 28059)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.soap.wise;
+
+import java.util.Collections;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * Aspect used to disable the additional classpath definition within WSDynamicClient.
+ * 
+ * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
+ */
+public class WSDynamicClientClasspathAspect
+{
+    public Object defineAdditionalCompilerClassPath(final MethodInvocation invocation)
+        throws Throwable
+    {
+        return Collections.EMPTY_LIST ;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/wise/WSDynamicClientClasspathAspect.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/CompilerAspect.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/CompilerAspect.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/CompilerAspect.java	2009-07-15 15:48:31 UTC (rev 28059)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.soap.ws;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * Aspect used to handle basic class to jar file conversion for vfszip.
+ * 
+ * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
+ */
+public class CompilerAspect
+{
+    public Object getJarFile(final MethodInvocation invocation)
+        throws Throwable
+    {
+        final Object[] args = invocation.getArguments() ;
+        final Class<?> targetClass = (Class<?>)args[0] ;
+        
+        final String resourceName = '/' + targetClass.getName().replace('.', '/') + ".class" ;
+        final URL url = targetClass.getResource(resourceName) ;
+        if (url != null)
+        {
+            if ("vfszip".equals(url.getProtocol()))
+            {
+                final String path = url.getPath() ;
+                if (path.endsWith(resourceName))
+                {
+                    final String realPath = path.substring(0, path.length() - resourceName.length()) ;
+                    return new File(realPath) ;
+                }
+            }
+        }
+        return invocation.invokeNext() ;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/services/soap/aop/java/org/jboss/internal/soa/esb/soap/ws/CompilerAspect.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml	2009-07-15 15:08:54 UTC (rev 28058)
+++ labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml	2009-07-15 15:48:31 UTC (rev 28059)
@@ -1,10 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE aop PUBLIC
-   "-//JBoss//DTD JBOSS AOP 1.0//EN"
-   "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
-
-<aop>
+<aop xmlns="urn:jboss:aop-beans:1.0">
    <aspect class="org.jboss.internal.soa.esb.soap.wise.WSMethodParameterMappingAspect" scope="PER_VM"/>
+   <aspect class="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientClasspathAspect" scope="PER_VM"/>
+   <aspect class="org.jboss.internal.soa.esb.soap.ws.CompilerAspect" scope="PER_VM"/>
    
    <bind pointcut="execution(* it.javalinux.wise.core.client.WSMethod->getParmeterInRightPositionArray(..))">
       <advice name="getParameterInRightPositionArray" aspect="org.jboss.internal.soa.esb.soap.wise.WSMethodParameterMappingAspect"/>
@@ -13,5 +11,13 @@
    <bind pointcut="execution(* it.javalinux.wise.core.client.WSMethod->getHoldersResult(..))">
       <advice name="getHoldersResult" aspect="org.jboss.internal.soa.esb.soap.wise.WSMethodParameterMappingAspect"/>
    </bind>
+   
+   <bind pointcut="execution(* it.javalinux.wise.core.client.WSDynamicClient->defineAdditionalCompilerClassPath(..))">
+      <advice name="defineAdditionalCompilerClassPath" aspect="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientClasspathAspect"/>
+   </bind>
+   
+   <bind pointcut="execution(* com.sun.tools.ws.wscompile.JavaCompilerHelper->getJarFile(..))">
+      <advice name="getJarFile" aspect="org.jboss.internal.soa.esb.soap.ws.CompilerAspect"/>
+   </bind>
+
 </aop>
-

Modified: labs/jbossesb/trunk/product/services/soap/build.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/build.xml	2009-07-15 15:08:54 UTC (rev 28058)
+++ labs/jbossesb/trunk/product/services/soap/build.xml	2009-07-15 15:48:31 UTC (rev 28059)
@@ -8,12 +8,14 @@
 	<property name="aop.resources.dir" location="${aop.dir}/resources"/>
 
         <property name="wise.jar" value="wise-core.jar"/>
+        <property name="jaxws.jar" value="jaxws-tools-2.1.1.jar"/>
 
         <property name="aop.jar.version" value="1.0"/>
         <property name="aop.jar.name" value="jboss-wise-${aop.jar.version}.aop"/>
         <property name="aop.jar" value="${build.dir}/${aop.jar.name}"/>
         <property name="aop.classes.dir" location="${build.dir}/aop-classes"/>
-        <property name="aopc.classes.dir" location="${build.dir}/aopc-classes"/>
+        <property name="aopc.wise.classes.dir" location="${build.dir}/aopc-wise-classes"/>
+        <property name="aopc.jaxws.classes.dir" location="${build.dir}/aopc-jaxws-classes"/>
 
         <property name="lib.excludes" value="${wise.jar}"/>
 	<!-- Import the base Ant build script... -->
@@ -56,27 +58,45 @@
         <taskdef name="aopc" classname="org.jboss.aop.ant.AopC"
             classpathref="classpath"/>
 
-        <delete dir="${aopc.classes.dir}" quiet="true"/>
-        <mkdir dir="${aopc.classes.dir}"/>
+        <delete dir="${aopc.wise.classes.dir}" quiet="true"/>
+        <mkdir dir="${aopc.wise.classes.dir}"/>
 
-        <unzip dest="${aopc.classes.dir}" src="lib/ext/${wise.jar}"/>
+        <unzip dest="${aopc.wise.classes.dir}" src="lib/ext/${wise.jar}"/>
 
         <aopc compilerclasspathref="classpath" verbose="true">
-            <classpath path="${aopc.classes.dir}"/>
-            <src path="${aopc.classes.dir}"/>
+            <classpath path="${aopc.wise.classes.dir}"/>
+            <src path="${aopc.wise.classes.dir}"/>
             <include name="it/javalinux/wise/core/client/WSMethod.class"/>
+            <include name="it/javalinux/wise/core/client/WSDynamicClient.class"/>
 
             <aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
             <aopclasspath path="${aop.classes.dir}"/>
         </aopc>
         <zip destfile="${build.dir}/${wise.jar}"
-            basedir="${aopc.classes.dir}"/>
+            basedir="${aopc.wise.classes.dir}"/>
+
+        <delete dir="${aopc.jaxws.classes.dir}" quiet="true"/>
+        <mkdir dir="${aopc.jaxws.classes.dir}"/>
+
+        <unzip dest="${aopc.jaxws.classes.dir}" src="${esb.main.lib}/${jaxws.jar}"/>
+
+        <aopc compilerclasspathref="classpath" verbose="true">
+            <classpath path="${aopc.jaxws.classes.dir}"/>
+            <src path="${aopc.jaxws.classes.dir}"/>
+            <include name="com/sun/tools/ws/wscompile/JavaCompilerHelper.class"/>
+            <sysproperty key="jboss.aop.include" value="com.sun.tools.ws.wscompile.JavaCompilerHelper"/>
+
+            <aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
+            <aopclasspath path="${aop.classes.dir}"/>
+        </aopc>
+        <zip destfile="${build.dir}/${jaxws.jar}"
+            basedir="${aopc.jaxws.classes.dir}"/>
     </target>
 
     <target name="service-esb" depends="base-esb">
         <copy todir="${build.dir}/${ant.project.name}.esb">
             <fileset dir="${esb.root.dir}/build/lib"
-                includes="jaxws-tools*.jar jaxws-rt*.jar jaxb-xjc*.jar"/>
+                includes="jaxws-rt*.jar jaxb-xjc*.jar"/>
             <fileset file="${aop.jar}"/>
         </copy>
     </target>

Modified: labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml	2009-07-15 15:08:54 UTC (rev 28058)
+++ labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml	2009-07-15 15:48:31 UTC (rev 28059)
@@ -7,6 +7,13 @@
         <classpath>
             <path name=""/>
             <path name=""  suffixes=".jar"/>
+            <path name="jboss-wise-1.0.aop"/>
         </classpath>
     </context>
+    <context>
+        <path name="jboss-wise-1.0.aop"/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+    </context>
 </structure>




More information about the jboss-svn-commits mailing list