[jboss-svn-commits] JBL Code SVN: r12955 - in labs/jbossesb/trunk/product: samples/quickstarts/webservice_bpel/war/resources and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jun 29 13:31:49 EDT 2007


Author: tfennelly
Date: 2007-06-29 13:31:49 -0400 (Fri, 29 Jun 2007)
New Revision: 12955

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-customerOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-shippingRequest.xml
   labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/jaxbintro/
   labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd
   labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/jaxbintro/
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/README.TXT
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/deployment.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/readme.txt
   labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jboss-jaxws.jar
   labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jbossws-core.jar
   labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jbossws-spi.jar
   labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java
Log:
1. Broke out all the JAXB Intro code into a standalone module (extras/jaxbintros), ready to go to the JBossWS project when they're ready to take it.
2. Updated The JBossWSAdapter to no longer worry about JAXB Intros.  This is all now handled by the jaxbintros module which contains a JBossWS endpoint deployer which looks for an jaxb intros config in the endpoint deployment (META-INF/jaxb-intros.xml).

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/README.TXT
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/README.TXT	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/README.TXT	2007-06-29 17:31:49 UTC (rev 12955)
@@ -30,9 +30,24 @@
             d) soapui-client.sar
             e) smooks.esb
     4.  Delete the jbm-queue-service.xml file from jbossesb.esb and smooks.esb.
-    5.  Checkout everything from the following Subversion address and run the
-        Ant script contained therein: http://anonsvn.labs.jboss.com/labs/jbossesb/workspace/jbossws2_0_0/
-    6.  Start the JBoss App Server.
+    5.  Checkout, build and deploy JBossWS 2.0.x from http://anonsvn.jboss.org/repos/jbossws/branches/jbossws-2.0
+        To build and deploy JBossWS 2.0.0 follow the instructions on http://www.jboss.org/index.html?module=bb&op=viewtopic&t=109659.
+        NOTES:
+            a) You need to copy build/ant.properties.example to build/ant.properties and
+               modify for your local env.
+            b) You need to target your build for JBoss AS v4.2.0GA, so build and deploy using the
+               "deploy-jboss42" target.
+            c) Once deployed, go to jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml on your
+               App Server and add the following bean configuration:
+                 "<bean name="WSEndpointJAXBIntrosCustomizationsDeployer" 
+                 class="org.jboss.wsf.spi.deployment.JAXBIntrosCustomizationsDeployer" />"
+            d) Again in jboss-beans.xml, add a reference to the above bean config in the 
+               deployer list configured on the "WSMainDeployerManager" bean. E.g.:
+                 "<inject bean="WSEndpointJAXBIntrosCustomizationsDeployer"/>"
+    6.  Run the ant script in product/extras/jaxbintros and copy the build output jar
+        (product/extras/jaxbintros/target/jboss-jaxb-intros.jar) to the root of the jbossws.sar
+        service on your AS.
+    7.  Start the JBoss App Server.
 
     Setting up ActiveBPEL:
     1.  Ensure that the value of the 'directory' attribute on the 'notificationChannel' (jboss-esb.xml)

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -32,14 +32,15 @@
         <!-- Overriden from the target of the same name in base-build.xml. -->
         <!-- Called by the "deploy" target.  Don't call directly!! -->
 
-        <property name="web-inf.dir" value="${basedir}/war/resources/WEB-INF"/>
-
         <!-- Build the jsr181 webservice... -->
         <war warfile="build/${ant.project.name}.war"
-             webxml="${web-inf.dir}/web.xml">
-            <fileset dir="${basedir}/war/view">
+             webxml="war/resources/WEB-INF/web.xml">
+            <fileset dir="war/view">
                 <include name="**/*"/>
             </fileset>
+            <fileset dir="war/resources">
+                <include name="META-INF/**/*"/>
+            </fileset>
         </war>
     </target>
 
@@ -73,18 +74,8 @@
     <target name="display-instructions">
         <echo message='${line.separator}******************' />
         <echo>Quickstart deployed to target JBoss ESB/App Server at '${org.jboss.esb.server.deploy.dir}'.</echo>
-        <echo>1.   Ensure that the value of the 'directory' attribute on the 'notificationChannel' (jboss-esb.xml) matches the value of the 'order.approval.drop.location' property in 'services/order-manager/order-manager.properties'.</echo>
-        <echo>2.   Make sure your Tomcat deployment at '${env.CATALINA_HOME}' is configured such that it's ports do not clash with those of your running JBoss AS. See '${env.CATALINA_HOME}/conf/server.xml'.</echo>
-        <echo>3.   Make sure your Tomcat deployment at '${env.CATALINA_HOME}' is configured to listen for HTTP traffic on port 18080. See '${env.CATALINA_HOME}/conf/server.xml'.</echo>
-        <echo>4.   Start your Tomcat deployment at '${env.CATALINA_HOME}'.</echo>
-        <echo>5.   Goto 'Deployed Processes' on the BPEL Console (http://localhost:18080/BpelAdmin) and confirm that the 'Customer' and 'OrderProcess' BPEL processes are deployed.</echo>
-        <echo>6.   Start your favorite SOAP client (e.g. SOAPUI) and load the 'RetailerService' WSDL (http://localhost:18080/active-bpel/services/RetailerService?wsdl).</echo>
-        <echo>7.   Load the SOAP client with the sample order in 'bpel/resources/sampleData/submit-order-01.xml'.</echo>
-        <echo>8.   Submit the new order using the SOAP UI client.</echo>
-        <echo>9.   View the state of the new process in 'Active Processes' on the BPEL Console.  Will appear as 'Running'.</echo>
-        <echo>10.  Drill into the 'Running' OrderProcess process (select it).</echo>
-        <echo>11.  Drill down, you will see that the process is waiting on an acknowledgement/notification from the OrderManager service (WaitForNotificationFromOrderManager).</echo>
-        <echo>12.  Goto http://localhost:8080/order-manager/ (note, not port '18080').  From here, you can approve the order.</echo>        
+        <echo>Check Server console.</echo>
+        <echo>check README.txt.</echo>
         <echo message='******************' />
     </target>
 

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/deployment.xml	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/deployment.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -1,8 +1,4 @@
 <jbossesb-deployment>
-    <!-- This "depends" should only be enabled if using the ESB Transformation Console.
-         This doesn't work :-( also tried it as a depends on the ESB Deployer :-(
-    -->
-    <!-- depends>jboss:service=invoker,type=http</depends -->
     <!-- SOAPUI required for making SOAP invocations. In a sar so as to scope some of the soapui dependencies
          that clash with some AS dependencies. -->
     <depends>jboss.esb:deployment=soap.esb</depends>

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-customerOrder.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-customerOrder.xml	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-customerOrder.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -1,33 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-
-<jaxb-intros xmlns="http://jbossesb.jboss.com/xsd/jaxb-intros">
-
-    <!--
-    JAXB annotation introductions for CustomerOrder messages.
-    -->
-
-    <!--
-    The type namespaces on the customerOrder are different from the rest of the message...
-    -->
-    <Class name="com.activebpel.ordermanagement.CustomerOrder">
-        <Method name="get.*">
-            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" />
-        </Method>
-    </Class>
-
-    <!--
-    More general namespace config for the rest of the message...
-    -->
-    <Class name="com.activebpel.ordermanagement.*">
-        <Method name="get.*">
-            <XmlElement namespace="http://ordermanagement.activebpel.com/jaws" />
-        </Method>
-    </Class>
-
-    <!--
-    The XSD for the schema can be found at:
-    http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd
-    Register it against the http://jbossesb.jboss.com/xsd/jaxb-intros namespace in your IDE and away you go :-)
-    -->
-
-</jaxb-intros>

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-shippingRequest.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-shippingRequest.xml	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jaxb-intros-shippingRequest.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -1,31 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jaxb-intros xmlns="http://jbossesb.jboss.com/xsd/jaxb-intros">
-
-    <!--
-    JAXB annotation introductions for ShippingRequest messages.
-    -->
-
-    <Class name="com.activebpel.shipping.ShippingRequest">
-        <!-- The order number is in the OrderManager namespace... -->
-        <Method name="getOrderNumber">
-            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" />
-        </Method>
-        <!-- The rest are in the shipping namespace... -->
-        <Method name="get.*">
-            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping" />
-        </Method>
-    </Class>
-
-    <Class name="com.activebpel.shipping.ShippingResponse">
-        <Method name="isOrderShipped">
-            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping" />
-        </Method>
-    </Class>
-
-    <!--
-    The XSD for the schema can be found at:
-    http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd
-    Register it against the http://jbossesb.jboss.com/xsd/jaxb-intros namespace in your IDE and away you go :-)
-    -->
-
-</jaxb-intros>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -73,7 +73,6 @@
                 </action>
                 <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.JBossWSAdapter">
                     <property name="jbossws-endpoint" value="ABI_OrderManager"/>
-                    <property name="jaxb-intros" value="/jaxb-intros-customerOrder.xml" />
                 </action>
                 <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
                     <property name="message"
@@ -96,7 +95,6 @@
                 </action>
                 <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.JBossWSAdapter">
                     <property name="jbossws-endpoint" value="ABI_Shipping"/>
-                    <property name="jaxb-intros" value="/jaxb-intros-shippingRequest.xml" />
                 </action>
                 <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
                     <property name="message"

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml	2007-06-29 17:31:49 UTC (rev 12955)
@@ -0,0 +1,51 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros">
+
+    <!--
+    The XSD for the schema can be found at:
+    http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/extras/jaxbintros/src/main/resources/jaxb-intros.xsd
+    Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
+    -->
+
+    <!--
+    JAXB annotation introductions for CustomerOrder messages.
+    -->
+    <!--
+    The type namespaces on the customerOrder are different from the rest of the message...
+    -->
+    <Class name="com.activebpel.ordermanagement.CustomerOrder">
+        <Method name="get.*">
+            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" />
+        </Method>
+    </Class>
+    <!--
+    More general namespace config for the rest of the message...
+    -->
+    <Class name="com.activebpel.ordermanagement.*">
+        <Method name="get.*">
+            <XmlElement namespace="http://ordermanagement.activebpel.com/jaws" />
+        </Method>
+    </Class>
+
+
+    <!--
+    JAXB annotation introductions for ShippingRequest messages.
+    -->
+    <Class name="com.activebpel.shipping.ShippingRequest">
+        <!-- The order number is in the OrderManager namespace... -->
+        <Method name="getOrderNumber">
+            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_OrderManager" />
+        </Method>
+        <!-- The rest are in the shipping namespace... -->
+        <Method name="get.*">
+            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping" />
+        </Method>
+    </Class>
+    <Class name="com.activebpel.shipping.ShippingResponse">
+        <Method name="isOrderShipped">
+            <XmlElement namespace="http://org.jboss.esb/quickstarts/bpel/ABI_Shipping" />
+        </Method>
+    </Class>
+
+</jaxb-intros>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/readme.txt	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/readme.txt	2007-06-29 17:31:49 UTC (rev 12955)
@@ -16,9 +16,24 @@
         b) jbossesb.sar
         c) soap.esb
 4. Delete the jbm-queue-service.xml file from jbossesb.esb.
-5. Checkout everything from the following Subversion address and run the
-   Ant script contained therein: http://anonsvn.labs.jboss.com/labs/jbossesb/workspace/jbossws2_0_0/
-6. Start the JBoss App Server.
+5.  Checkout, build and deploy JBossWS 2.0.x from http://anonsvn.jboss.org/repos/jbossws/branches/jbossws-2.0
+    To build and deploy JBossWS 2.0.0 follow the instructions on http://www.jboss.org/index.html?module=bb&op=viewtopic&t=109659.
+    NOTES:
+        a) You need to copy build/ant.properties.example to build/ant.properties and
+           modify for your local env.
+        b) You need to target your build for JBoss AS v4.2.0GA, so build and deploy using the
+           "deploy-jboss42" target.
+        c) Once deployed, go to jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml on your
+           App Server and add the following bean configuration:
+             "<bean name="WSEndpointJAXBIntrosCustomizationsDeployer" 
+             class="org.jboss.wsf.spi.deployment.JAXBIntrosCustomizationsDeployer" />"
+        d) Again in jboss-beans.xml, add a reference to the above bean config in the 
+           deployer list configured on the "WSMainDeployerManager" bean. E.g.:
+             "<inject bean="WSEndpointJAXBIntrosCustomizationsDeployer"/>"
+6.  Run the ant script in product/extras/jaxbintros and copy the build output jar
+    (product/extras/jaxbintros/target/jboss-jaxb-intros.jar) to the root of the jbossws.sar
+    service on your AS.
+7. Start the JBoss App Server.
 
 
 To Run:

Modified: labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jboss-jaxws.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jbossws-core.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/services/soap/lib/ext/build-time/jbossws-spi.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java	2007-06-29 17:31:49 UTC (rev 12955)
@@ -22,39 +22,23 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
-import java.io.InputStream;
 import java.util.Set;
-import java.util.Map;
-import java.util.HashMap;
-import java.security.Principal;
 
 import javax.management.ObjectName;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
 
 import org.jboss.internal.soa.esb.publish.Publish;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
 import org.jboss.soa.esb.actions.ActionProcessingException;
 import org.jboss.soa.esb.actions.ActionUtils;
-import org.jboss.soa.esb.actions.ActionLifecycleException;
-import org.jboss.soa.esb.actions.soap.jaxbintro.configmodel.JaxbIntros;
-import org.jboss.soa.esb.actions.soap.jaxbintro.IntroductionsConfigParser;
-import org.jboss.soa.esb.actions.soap.jaxbintro.IntroductionsAnnotationReader;
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.invocation.BasicInvocationContext;
 import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.invocation.AbstractWebServiceContext;
 import org.jboss.wsf.spi.invocation.InvocationContext;
 import org.jboss.wsf.spi.management.EndpointRegistry;
 import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
-import org.apache.log4j.Logger;
-import com.sun.xml.bind.api.JAXBRIContext;
 
 /**
  * JBoss Webservices endpoint adapter.
@@ -91,16 +75,12 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 @Publish(JBossWSAdapterContractPublisher.class)
-public class JBossWSAdapter extends AbstractActionPipelineProcessor implements JAXBHandler {
+public class JBossWSAdapter extends AbstractActionPipelineProcessor {
 
     public static final String JBOSSWS_ENDPOINT = "jbossws-endpoint";
 
-    private static Logger logger = Logger.getLogger(JBossWSAdapter.class);
     private static ThreadLocal<Message> messageTL = new ThreadLocal<Message>();
     private String jbossws_endpoint;
-    private ConfigTree config;
-    private Map<String, Object> jaxbConfig = new HashMap<String, Object>();
-    private JAXBContext jaxbContext;
 
     /**
      * Public constructor.
@@ -109,35 +89,8 @@
      */
     public JBossWSAdapter(ConfigTree config) throws ConfigurationException {
         jbossws_endpoint = config.getRequiredAttribute(JBOSSWS_ENDPOINT);
-        this.config = config;
     }
 
-    public void initialise() throws ActionLifecycleException {
-        String jaxbIntrosConfig = config.getAttribute("jaxb-intros");
-        String jaxbDefaultNamespace = config.getAttribute("jaxb-default-namespace");
-
-        if(jaxbIntrosConfig != null) {
-            InputStream configStream = getClass().getResourceAsStream(jaxbIntrosConfig);
-            if(configStream != null) {
-                try {
-                    JaxbIntros config = IntroductionsConfigParser.parseConfig(configStream);
-                    jaxbConfig.put(JAXBRIContext.ANNOTATION_READER, new IntroductionsAnnotationReader(config));
-                    if(jaxbDefaultNamespace == null) {
-                        jaxbDefaultNamespace = config.getDefaultNamespace();
-                    }
-                } catch (ConfigurationException e) {
-                    throw new ActionLifecycleException(e);
-                }
-            }
-        } else {
-            logger.info("No JAXB annotation introductions configuration defined on action config '" + config.getAttribute("action", "$name-not-specified$") + "'.");
-        }
-
-        if(jaxbDefaultNamespace != null) {
-            jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, jaxbDefaultNamespace);
-        }
-    }
-
     /**
      * Process the SOAP message.
      * <p/>
@@ -153,24 +106,13 @@
         if(endpoint == null) {
             throw new ActionProcessingException("Unknown Service Endpoint '" + jbossws_endpoint + "'.");
         }
-        final JAXBHandler installedJaxbHandler = endpoint.getJAXBHandler();
-        JBossESBJBossWSJAXBHandler jaxbHandler;
 
-        // Set up the endpoint JAXBHandler for JBossWS...
-        if(installedJaxbHandler instanceof JBossESBJBossWSJAXBHandler) {
-            jaxbHandler = (JBossESBJBossWSJAXBHandler) installedJaxbHandler;
-        } else {
-            jaxbHandler = new JBossESBJBossWSJAXBHandler(installedJaxbHandler, this);
-            endpoint.setJAXBHandler(jaxbHandler);
-        }
-
         soapMessage = getSOAPMessagePayload(message);
         try {
-            jaxbHandler.useAdapterAsHandler();
             messageTL.set(message);
 
             RequestHandler requestHandler = endpoint.getRequestHandler();
-            InvocationContext invocationContext = new JBossESBJBossWSInvocationContext();
+            InvocationContext invocationContext = new BasicInvocationContext();
             ByteArrayOutputStream os = new ByteArrayOutputStream();
 
             requestHandler.handleRequest(endpoint, new ByteArrayInputStream(soapMessage), os, invocationContext);
@@ -180,7 +122,6 @@
         catch (Exception ex) {
             throw new ActionProcessingException("Cannot process SOAP request", ex);
         } finally {
-            jaxbHandler.useInstalledHandler();
             // Get the message instance set on the Threadlocal before removing it.  The Webservice endpoint
             // may have reset it with a new Message instance.
             message = messageTL.get();
@@ -247,70 +188,4 @@
 
         return null;
     }
-
-    public JAXBContext getJAXBContext(Class[] classes) throws JAXBException {
-        if(jaxbContext == null) {
-            jaxbContext = JAXBContext.newInstance(classes, jaxbConfig);
-        }
-
-        return jaxbContext;
-    }
-
-    private static class JBossESBJBossWSJAXBHandler implements JAXBHandler {
-        private static ThreadLocal<JAXBHandler> handlerTL =
-                new ThreadLocal<JAXBHandler>();
-        private JAXBHandler installedJaxbHandler;
-        private JBossWSAdapter adapter;
-
-        private JBossESBJBossWSJAXBHandler(JAXBHandler installedJaxbHandler, JBossWSAdapter adapter) {
-            this.installedJaxbHandler = installedJaxbHandler;
-            this.adapter = adapter;
-            handlerTL.set(installedJaxbHandler);
-        }
-
-        public JAXBContext getJAXBContext(Class[] classes) throws JAXBException {
-            return handlerTL.get().getJAXBContext(classes);
-        }
-
-        /**
-         * This method helps ensure that only threads executing out of the
-         * JBossWSAdapter are supplied with JAXBContext instances from the
-         * JBossWSAdapter.  We don't like the idea of not using the installed
-         * JAXBHandler for non ESB initiated JBossWS requests after the
-         * JBossWSAdapter has changed the JAXBHandler for the endpoint.
-         */
-        private void useAdapterAsHandler() {
-            handlerTL.set(adapter);
-        }
-        
-        private void useInstalledHandler() {
-            handlerTL.set(installedJaxbHandler);
-        }
-    }
-
-    private class JBossESBJBossWSInvocationContext extends BasicInvocationContext {
-
-        public <T> T addAttachment(Class<T> aClass, Object object) {
-            if(aClass == WebServiceContext.class) {
-                MessageContext messageContext = ((AbstractWebServiceContext)object).getMessageContext();
-                return super.addAttachment(aClass, new JBossESBJBossWSWebServiceContextJSE(messageContext));
-            } else {
-                return super.addAttachment(aClass, object);
-            }
-        }
-
-        public class JBossESBJBossWSWebServiceContextJSE extends AbstractWebServiceContext {
-            public JBossESBJBossWSWebServiceContextJSE(MessageContext messageContext) {
-                super(messageContext);
-            }
-
-            public Principal getUserPrincipal() {
-                throw new IllegalStateException("Unexpected call to 'getUserPrincipal' on " + getClass().getName());
-            }
-
-            public boolean isUserInRole(String targetProfile) {
-                throw new IllegalStateException("Unexpected call to 'isUserInRole' on " + getClass().getName());
-            }
-        }
-    }
 }
\ No newline at end of file

Deleted: labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd	2007-06-29 17:29:43 UTC (rev 12954)
+++ labs/jbossesb/trunk/product/services/soap/src/main/resources/jaxb-intros.xsd	2007-06-29 17:31:49 UTC (rev 12955)
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema
-        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        xmlns:jaxb-intros="http://jbossesb.jboss.com/xsd/jaxb-intros"
-        targetNamespace="http://jbossesb.jboss.com/xsd/jaxb-intros"
-        elementFormDefault="qualified">
-
-    <xsd:element name="jaxb-intros">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">The jbossesb JAXB Annotation Introductions configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:complexType>
-            <xsd:sequence>
-                <xsd:element ref="jaxb-intros:Class" minOccurs="1" maxOccurs="unbounded"/>
-            </xsd:sequence>
-            <xsd:attribute name="default-namespace" use="optional"/>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:complexType name="Class">
-        <xsd:sequence>
-            <xsd:element ref="jaxb-intros:XmlType" minOccurs="0" maxOccurs="1"/>
-            <xsd:element ref="jaxb-intros:Field" minOccurs="0" maxOccurs="unbounded"/>
-            <xsd:element ref="jaxb-intros:Method" minOccurs="0" maxOccurs="unbounded"/>
-        </xsd:sequence>
-        <xsd:attribute name="name" use="required"/>
-    </xsd:complexType>
-    <xsd:element name="Class" type="jaxb-intros:Class">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">Java Top Level Class JAXB Annotation Introductions configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-    <xsd:complexType name="class-member-intro-config">
-        <xsd:annotation>
-           <xsd:documentation xml:lang="en">Java Class Member (Field, Method Constructor) JAXB Annotation Introductions configuration base type.</xsd:documentation>
-        </xsd:annotation>
-        <xsd:sequence>
-            <xsd:element ref="jaxb-intros:XmlElement" minOccurs="0" maxOccurs="1"/>
-            <xsd:element ref="jaxb-intros:XmlAttribute" minOccurs="0" maxOccurs="1"/>
-        </xsd:sequence>
-        <xsd:attribute name="name" use="required"/>
-    </xsd:complexType>
-    <xsd:element name="class-member-intro-config" abstract="true" />
-
-    <xsd:complexType name="Field">
-        <xsd:complexContent>
-            <xsd:extension base="jaxb-intros:class-member-intro-config" />
-        </xsd:complexContent>
-    </xsd:complexType>
-    <xsd:element name="Field" type="jaxb-intros:Field" substitutionGroup="jaxb-intros:class-member-intro-config">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">Java Class Field JAXB Annotation Introductions configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-    <xsd:complexType name="Method">
-        <xsd:complexContent>
-            <xsd:extension base="jaxb-intros:class-member-intro-config" />
-        </xsd:complexContent>
-    </xsd:complexType>
-    <xsd:element name="Method" type="jaxb-intros:Method" substitutionGroup="jaxb-intros:class-member-intro-config">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">Java Class Method JAXB Annotation Introductions configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-    <xsd:complexType name="XmlType">
-        <xsd:attribute name="name" use="optional" default="##default"/>
-        <xsd:attribute name="propOrder" use="optional" default=""/>
-        <xsd:attribute name="namespace" use="optional" default="##default"/>
-        <xsd:attribute name="factoryClass" use="optional"/>
-        <xsd:attribute name="factoryMethod" use="optional" default=""/>
-    </xsd:complexType>
-    <xsd:element name="XmlType" type="jaxb-intros:XmlType">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">JAXB 'XmlType' Annotation Introduction configuration.</xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-    <xsd:complexType name="XmlElement">
-        <xsd:attribute name="name" use="optional" default="##default"/>
-        <xsd:attribute name="nillable" type="xsd:boolean" use="optional" default="false"/>
-        <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
-        <xsd:attribute name="namespace" use="optional" default="##default"/>
-        <xsd:attribute name="defaultValue" use="optional"/>
-        <xsd:attribute name="type" use="optional"/>
-    </xsd:complexType>
-    <xsd:element name="XmlElement" type="jaxb-intros:XmlElement">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">JAXB 'XmlElement' Annotation Introduction configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-    <xsd:complexType name="XmlAttribute">
-        <xsd:attribute name="name" use="optional" default="##default"/>
-        <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
-        <xsd:attribute name="namespace" use="optional" default="##default"/>
-    </xsd:complexType>
-    <xsd:element name="XmlAttribute" type="jaxb-intros:XmlAttribute">
-        <xsd:annotation>
-            <xsd:documentation xml:lang="en">JAXB 'XmlAttribute' Annotation Introduction configuration.
-            </xsd:documentation>
-        </xsd:annotation>
-    </xsd:element>
-
-</xsd:schema>




More information about the jboss-svn-commits mailing list