[jbossws-commits] JBossWS SVN: r3576 - in trunk: build/ant-import and 45 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Jun 14 05:23:53 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-06-14 05:23:52 -0400 (Thu, 14 Jun 2007)
New Revision: 3576

Added:
   trunk/integration/spi/src/main/etc/wsconsume.bat
   trunk/integration/spi/src/main/etc/wsconsume.sh
   trunk/integration/spi/src/main/etc/wsprovide.bat
   trunk/integration/spi/src/main/etc/wsprovide.sh
   trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java
   trunk/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleContextRootDeployer.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleURLPatternDeployer.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java
   trunk/jbossws-core/src/test/resources/common/jbws1692/
   trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml
   trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml
Removed:
   trunk/integration/spi/etc/
   trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
   trunk/jbossws-core/src/main/etc/wspublish.sh
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java
   trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml
   trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml
Modified:
   trunk/build/ant-import/build-setup.xml
   trunk/build/ant-import/build-testsuite.xml
   trunk/build/ant.properties.example
   trunk/build/dist/ant.properties.example
   trunk/build/eclipse/jbossws.userlibraries
   trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
   trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
   trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
   trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
   trunk/integration/native/ant-import/build-bin-dist.xml
   trunk/integration/native/ant-import/build-deploy.xml
   trunk/integration/native/ant-import/macros-deploy-native.xml
   trunk/integration/native/build.xml
   trunk/integration/native/src/main/etc/bin-dist-build.xml
   trunk/integration/native/src/main/etc/bin-dist-deploy.xml
   trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml
   trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml
   trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
   trunk/integration/spi/ant-import/build-release.xml
   trunk/integration/spi/ant-import/build-thirdparty.xml
   trunk/integration/spi/ant-import/macros-deploy-spi.xml
   trunk/integration/spi/build.xml
   trunk/integration/spi/src/main/etc/component-info.xml
   trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/HandlerCallback.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/test/TestDeployerJBoss.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
   trunk/jbossws-core/.classpath
   trunk/jbossws-core/ant-import-tests/build-testsuite.xml
   trunk/jbossws-core/ant-import/build-thirdparty.xml
   trunk/jbossws-core/build.xml
   trunk/jbossws-core/src/main/etc/component-info.xml
   trunk/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
   trunk/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
   trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
   trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
   trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
   trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
   trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java
   trunk/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
   trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
   trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleEncryptTestCase.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleSignTestCase.java
   trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
   trunk/testsuite/.classpath
   trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
   trunk/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
Log:
svn merge -r3427:3430 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
hudson.smtp.host=localhost
Use hudson.http.port

svn merge -r3504:3505 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
svn merge -r3507:3509 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
[JBWS-1706] SOAPConnection.get fails with ProtocolException
SOAPElement.addTextNode does not add comment nodes
Remove dependency of saaj,jaxrpc,jaxws on SPI and jboss logging for usage with jdk1.6

svn merge -r3511:3528 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Install backward compatible context-root,url-pattern deployers by default
Include jaxrpc,saaj in jboss42 sar
Fix EJB21 endpoint handler callback
Add deployment to lib/endorsed for jdk1.6
Fix script/resources deployment
Remove client runtime dependency on MC
ContextRoot, URLPattern always start with '/'
Add ServiceRefHandlerFactory

svn merge -r3533:3542 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Fix tokenizer issue with leading '/'

svn merge -r3545:3549 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Fix NPE on Exception

svn merge -r3552:3565 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
[JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation
[JBWS-1692] SOAPElement.importNode() not supported
[JBWS-1624] JBossWS samples don't work with JMX authentication
[JBWS-1692] SOAPElement.importNode() not supported
Remove ServiceExt, because our JAXWS Service cannot be loaded via endorsed
Move security config getter/setter to StubExt



Modified: trunk/build/ant-import/build-setup.xml
===================================================================
--- trunk/build/ant-import/build-setup.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/build/ant-import/build-setup.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -55,6 +55,7 @@
   <property name="jboss40.server.deploy" value="${jboss40.server}/deploy"/>
 
   <property name="jbossws.integration.${jbossws.integration.target}" value="true"/>
+  <property name="jboss.server.instance.${jboss.server.instance}" value="true"/>
  
   <property name="jboss50.available.file" value="${jboss50.client}/jboss-ejb3-client.jar"/>
   <property name="jboss42.available.file" value="${jboss42.client}/jboss-client.jar"/>
@@ -63,11 +64,16 @@
   <available property="jboss50.available" file="${jboss50.available.file}"/>
   <available property="jboss42.available" file="${jboss42.available.file}"/>
   <available property="jboss40.available" file="${jboss40.available.file}"/>
-  
   <available property="jboss40.ejb3.available" file="${jboss40.client}/jboss-ejb3-client.jar"/>
   
   <available property="jbossws.portal.content.available" file="${jbossws.portal.content}" type="dir"/>
   
+  <!-- JDK Detection -->
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+  <available classname="java.io.Console" property="HAVE_JDK_1.6"/>
+  
+  <fail message="JDK1.5 or above is required" unless="HAVE_JDK_1.5"/>
+  
   <!-- ================================================================== -->
   <!-- Initialization                                                     -->
   <!-- ================================================================== -->

Modified: trunk/build/ant-import/build-testsuite.xml
===================================================================
--- trunk/build/ant-import/build-testsuite.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/build/ant-import/build-testsuite.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -116,6 +116,7 @@
       <pathelement location="${jboss.client}/javassist.jar"/>
       <pathelement location="${jboss.client}/jaxb-xjc.jar"/>
       <pathelement location="${jboss.client}/jboss-jboss50.jar"/>
+      <pathelement location="${jboss.client}/jboss-remoting.jar"/>
       <pathelement location="${jboss.client}/jbossws-jboss50.jar"/>
       <pathelement location="${jboss.client}/jbossall-client.jar"/>
       <pathelement location="${jboss.client}/log4j.jar"/>
@@ -323,6 +324,8 @@
       <sysproperty key="jboss.home" value="${jboss.home}"/>
       <sysproperty key="jboss.bind.address" value="${node0}"/>
       <sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
+      <sysproperty key="jmx.authentication.username" value="${jmx.authentication.username}"/>
+      <sysproperty key="jmx.authentication.password" value="${jmx.authentication.password}"/>
       <sysproperty key="org.jboss.ws.wsse.keyStore" value="${tests.output.dir}/resources/jaxrpc/samples/wssecurity/wsse.keystore"/>
       <sysproperty key="org.jboss.ws.wsse.trustStore" value="${tests.output.dir}/resources/jaxrpc/samples/wssecurity/wsse.truststore"/>
       <sysproperty key="org.jboss.ws.wsse.keyStorePassword" value="jbossws"/>
@@ -359,6 +362,8 @@
       <sysproperty key="jboss.home" value="${jboss.home}"/>
       <sysproperty key="jboss.bind.address" value="${node0}"/>
       <sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
+      <sysproperty key="jmx.authentication.username" value="${jmx.authentication.username}"/>
+      <sysproperty key="jmx.authentication.password" value="${jmx.authentication.password}"/>
       <!--
       http://jira.jboss.com/jira/browse/JBWS-917
       <sysproperty key="javax.net.ssl.keyStore" value="${tests.output.dir}/resources/jaxrpc/samples/wssecurity/wsse.keystore"/>

Modified: trunk/build/ant.properties.example
===================================================================
--- trunk/build/ant.properties.example	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/build/ant.properties.example	2007-06-14 09:23:52 UTC (rev 3576)
@@ -15,6 +15,10 @@
 jboss.server.instance=default
 jboss.bind.address=localhost
 
+# JBoss JMX invoker authentication
+#jmx.authentication.username=admin
+#jmx.authentication.password=admin
+
 # JBoss Repository
 #jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
 jboss.repository=http://repository.jboss.org

Modified: trunk/build/dist/ant.properties.example
===================================================================
--- trunk/build/dist/ant.properties.example	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/build/dist/ant.properties.example	2007-06-14 09:23:52 UTC (rev 3576)
@@ -19,6 +19,10 @@
 #jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
 jboss.repository=http://repository.jboss.org
 
+# JBoss JMX invoker authentication
+#jmx.authentication.username=admin
+#jmx.authentication.password=admin
+
 # Java Compiler options
 javac.debug=yes
 javac.deprecation=no

Modified: trunk/build/eclipse/jbossws.userlibraries
===================================================================
--- trunk/build/eclipse/jbossws.userlibraries	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/build/eclipse/jbossws.userlibraries	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <eclipse-userlibraries version="2">
 <library name="jboss-4.0.x" systemlibrary="false">
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-common.jar"/>
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-jmx.jar"/>
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-system.jar"/>
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/lib/jboss.jar"/>
@@ -8,6 +9,8 @@
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
 </library>
 <library name="jboss-4.2.x" systemlibrary="false">
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/lib/jboss-jmx.jar"/>

Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -123,33 +123,12 @@
    {
       log.debug("Invoke: " + inv.getJavaMethod().getName());
 
-      SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
-      Principal principal = securityAdaptor.getPrincipal();
-      Object credential = securityAdaptor.getCredential();
-
       // invoke on the container
       try
       {
          // setup the invocation
-         Method method = inv.getJavaMethod();
-         Object[] args = inv.getArgs();
-         org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+         org.jboss.invocation.Invocation jbInv = getMBeanInvocation(inv);
 
-         // EJB2.1 endpoints will only get an JAXRPC context 
-         MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
-         if (msgContext == null)
-            throw new IllegalStateException("Cannot obtain MessageContext");
-
-         HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
-         if (callback == null)
-            throw new IllegalStateException("Cannot obtain HandlerCallback");
-
-         jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
-         jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
-         jbInv.setType(InvocationType.SERVICE_ENDPOINT);
-         jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
-         jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
-
          String[] sig = { org.jboss.invocation.Invocation.class.getName() };
          Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
          inv.setReturnValue(retObj);
@@ -159,4 +138,32 @@
          handleInvocationException(e);
       }
    }
+
+   private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
+   {
+      // EJB2.1 endpoints will only get an JAXRPC context 
+      MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
+      if (msgContext == null)
+         throw new IllegalStateException("Cannot obtain MessageContext");
+
+      SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
+      Principal principal = securityAdaptor.getPrincipal();
+      Object credential = securityAdaptor.getCredential();
+
+      Method method = inv.getJavaMethod();
+      Object[] args = inv.getArgs();
+      org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+
+      HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
+      if (callback == null)
+         throw new IllegalStateException("Cannot obtain HandlerCallback");
+
+      jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+      jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+      jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+      jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+      jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
+
+      return jbInv;
+   }
 }

Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ServiceEndpointInterceptor.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -71,8 +71,8 @@
          try
          {
             // call the request handlers
-            boolean handlersPass = callback.callRequestHandlerChain(HandlerType.ENDPOINT);
-            handlersPass = handlersPass && callback.callRequestHandlerChain(HandlerType.POST);
+            boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
+            handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);
 
             // Call the next interceptor in the chain
             if (handlersPass)
@@ -90,8 +90,8 @@
             }
 
             // call the response handlers
-            handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
-            handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
+            handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
+            handlersPass = handlersPass && callback.callResponseHandlerChain(wsInv, HandlerType.ENDPOINT);
 
             // update the return value after response handler processing
             Object resObj = wsInv.getReturnValue();
@@ -103,8 +103,8 @@
             try
             {
                // call the fault handlers
-               boolean handlersPass = callback.callFaultHandlerChain(HandlerType.POST, ex);
-               handlersPass = handlersPass && callback.callFaultHandlerChain(HandlerType.ENDPOINT, ex);
+               boolean handlersPass = callback.callFaultHandlerChain(wsInv, HandlerType.POST, ex);
+               handlersPass = handlersPass && callback.callFaultHandlerChain(wsInv, HandlerType.ENDPOINT, ex);
             }
             catch (Exception subEx)
             {

Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -125,40 +125,12 @@
    {
       log.debug("Invoke: " + inv.getJavaMethod().getName());
 
-      SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
-      SecurityContext sc = SecurityContextAssociation.getSecurityContext();
-      Principal principal = securityAdaptor.getPrincipal();
-      Object credential = securityAdaptor.getCredential();
-
-      if (principal == null && sc != null)
-         principal = sc.getUtil().getUserPrincipal();
-
-      if (credential == null && sc != null)
-         credential = sc.getUtil().getCredential();
-
       // invoke on the container
       try
       {
          // setup the invocation
-         Method method = inv.getJavaMethod();
-         Object[] args = inv.getArgs();
-         org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+         org.jboss.invocation.Invocation jbInv = getMBeanInvocation(inv);
 
-         // EJB2.1 endpoints will only get an JAXRPC context 
-         MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
-         if (msgContext == null)
-            throw new IllegalStateException("Cannot obtain MessageContext");
-
-         HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
-         if (callback == null)
-            throw new IllegalStateException("Cannot obtain HandlerCallback");
-
-         jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
-         jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
-         jbInv.setType(InvocationType.SERVICE_ENDPOINT);
-         jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
-         jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
-
          String[] sig = { org.jboss.invocation.Invocation.class.getName() };
          Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
          inv.setReturnValue(retObj);
@@ -168,4 +140,39 @@
          handleInvocationException(e);
       }
    }
+
+   private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
+   {
+      // EJB2.1 endpoints will only get an JAXRPC context 
+      MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
+      if (msgContext == null)
+         throw new IllegalStateException("Cannot obtain MessageContext");
+
+      SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
+      SecurityContext sc = SecurityContextAssociation.getSecurityContext();
+      Principal principal = securityAdaptor.getPrincipal();
+      Object credential = securityAdaptor.getCredential();
+
+      if (principal == null && sc != null)
+         principal = sc.getUtil().getUserPrincipal();
+
+      if (credential == null && sc != null)
+         credential = sc.getUtil().getCredential();
+      
+      Method method = inv.getJavaMethod();
+      Object[] args = inv.getArgs();
+      org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+      
+      HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
+      if (callback == null)
+         throw new IllegalStateException("Cannot obtain HandlerCallback");
+      
+      jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+      jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+      jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+      jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+      jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
+      
+      return jbInv;
+   }
 }

Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -71,8 +71,8 @@
          try
          {
             // call the request handlers
-            boolean handlersPass = callback.callRequestHandlerChain(HandlerType.ENDPOINT);
-            handlersPass = handlersPass && callback.callRequestHandlerChain(HandlerType.POST);
+            boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
+            handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);
 
             // Call the next interceptor in the chain
             if (handlersPass)
@@ -90,8 +90,8 @@
             }
 
             // call the response handlers
-            handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
-            handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
+            handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
+            handlersPass = handlersPass && callback.callResponseHandlerChain(wsInv, HandlerType.ENDPOINT);
 
             // update the return value after response handler processing
             Object resObj = wsInv.getReturnValue();
@@ -103,8 +103,8 @@
             try
             {
                // call the fault handlers
-               boolean handlersPass = callback.callFaultHandlerChain(HandlerType.POST, ex);
-               handlersPass = handlersPass && callback.callFaultHandlerChain(HandlerType.ENDPOINT, ex);
+               boolean handlersPass = callback.callFaultHandlerChain(wsInv, HandlerType.POST, ex);
+               handlersPass = handlersPass && callback.callFaultHandlerChain(wsInv, HandlerType.ENDPOINT, ex);
             }
             catch (Exception subEx)
             {

Modified: trunk/integration/native/ant-import/build-bin-dist.xml
===================================================================
--- trunk/integration/native/ant-import/build-bin-dist.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/ant-import/build-bin-dist.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -68,7 +68,7 @@
 		</copy>
 
 		<copy todir="${bindist.bin.dir}">
-			<fileset dir="${spi.dir}/etc">
+			<fileset dir="${spi.dir}/src/main/etc">
 				<include name="*.sh"/>
 				<include name="*.bat"/>
 			</fileset>
@@ -99,6 +99,7 @@
 		<copy todir="${bindist.lib.dir}" overwrite="true">
 			<fileset dir="${spi.dir}/output/lib">
 				<include name="jbossws-spi.jar"/>
+				<include name="jbossws-spi-scripts.zip"/>
 			</fileset>
 			<fileset dir="${spi.dir}/thirdparty">
 				<include name="getopt.jar"/>
@@ -116,8 +117,9 @@
 				<include name="jboss-jaxrpc.jar"/>
 				<include name="jboss-jaxws.jar"/>
 				<include name="jboss-saaj.jar"/>
+				<include name="jbossws-client.jar"/>
 				<include name="jbossws-core.jar"/>
-				<include name="jbossws-client.jar"/>
+				<include name="jbossws-core-scripts.zip"/>
 			</fileset>
 			<fileset dir="${int.native.dir}/output/lib">
 				<include name="jbossws-context.war"/>

Modified: trunk/integration/native/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/native/ant-import/build-deploy.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/ant-import/build-deploy.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -15,13 +15,13 @@
 
 	<import file="${int.native.dir}/ant-import/macros-deploy-native.xml"/>
 	<import file="${spi.dir}/ant-import/macros-deploy-spi.xml"/>
-
+  
 	<!-- ================================================================== -->
 	<!-- Deployment  JBoss50                                                -->
 	<!-- ================================================================== -->
 
 	<!-- Deploy jbossws to jboss50 -->
-	<target name="deploy-jboss50" depends="jars-jboss50,undeploy-jboss50" description="Deploy jbossws to jboss50">
+	<target name="deploy-jboss50" depends="jars-jboss50,undeploy-jboss50,deploy-jboss50-endorsed" description="Deploy jbossws to jboss50">
 		<ant antfile="${int.sunri.dir}/build.xml" target="undeploy-jboss50" inheritall="false"/>
 		<ant antfile="${int.xfire.dir}/build.xml" target="undeploy-jboss50" inheritall="false"/>		
 		<macro-deploy-native50
@@ -29,24 +29,32 @@
 				jbosslibs="${int.jboss50.dir}/output/lib"
 				corelibs="${core.dir}/output/lib"
 				stacklibs="${int.native.dir}/output/lib"
-				thirdpartylibs="${core.dir}/thirdparty"
-				corescripts="${core.dir}/src/main/etc"/>
-
+				thirdpartylibs="${core.dir}/thirdparty"/>
 		<macro-deploy-spi
 				spilibs="${spi.dir}/output/lib"
-				spiscripts="${spi.dir}/etc"
 				thirdpartylibs="${spi.dir}/thirdparty"
 				jbosshome="${jboss50.home}"/>
 	</target>
+  
+	<target name="deploy-jboss50-endorsed" depends="prepare" if="HAVE_JDK_1.6">
+		<macro-deploy-endorsed
+				jbosshome="${jboss50.home}"
+				corelibs="${core.dir}/output/lib"
+				thirdpartylibs="${core.dir}/thirdparty"/>
+	</target>
 
 	<!-- Remove jbossws from jboss50 -->
-	<target name="undeploy-jboss50" depends="prepare" description="Remove jbossws from jboss50">		
+	<target name="undeploy-jboss50" depends="prepare,undeploy-jboss50-endorsed" description="Remove jbossws from jboss50">		
 		<macro-undeploy-native50/>
 		<macro-undeploy-spi jbosshome="${jboss50.home}"/>
 	</target>
+  
+	<target name="undeploy-jboss50-endorsed" depends="prepare" if="HAVE_JDK_1.6">		
+		<macro-undeploy-endorsed jbosshome="${jboss50.home}"/>
+	</target>
 
 	<!-- Deploy jbossws to jboss42 -->
-	<target name="deploy-jboss42" depends="jars-jboss42,undeploy-jboss42" description="Deploy jbossws to jboss42">
+	<target name="deploy-jboss42" depends="jars-jboss42,undeploy-jboss42,deploy-jboss42-endorsed" description="Deploy jbossws to jboss42">
 		<ant antfile="${int.sunri.dir}/build.xml" target="undeploy-jboss42" inheritall="false"/>
 		<ant antfile="${int.xfire.dir}/build.xml" target="undeploy-jboss42" inheritall="false"/>
 		<macro-deploy-native42
@@ -54,21 +62,28 @@
 				jbosslibs="${int.jboss42.dir}/output/lib"
 				corelibs="${core.dir}/output/lib"
 				stacklibs="${int.native.dir}/output/lib"
-				thirdpartylibs="${core.dir}/thirdparty"
-				corescripts="${core.dir}/src/main/etc"/>
-
+				thirdpartylibs="${core.dir}/thirdparty"/>
 		<macro-deploy-spi
 				spilibs="${spi.dir}/output/lib"
-				spiscripts="${spi.dir}/etc"
 				thirdpartylibs="${spi.dir}/thirdparty"
 				jbosshome="${jboss42.home}"/>
 	</target>
+  
+	<target name="deploy-jboss42-endorsed" depends="prepare" if="HAVE_JDK_1.6">
+		<macro-deploy-endorsed
+				jbosshome="${jboss42.home}"
+				corelibs="${core.dir}/output/lib"
+				thirdpartylibs="${core.dir}/thirdparty"/>
+	</target>
 
 	<!-- Remove jbossws from jboss42 -->
-	<target name="undeploy-jboss42" depends="prepare" description="Remove jbossws from jboss42">
+	<target name="undeploy-jboss42" depends="prepare,undeploy-jboss42-endorsed" description="Remove jbossws from jboss42">
 		<macro-undeploy-native42/>
 		<macro-undeploy-spi jbosshome="${jboss42.home}"/>
 	</target>
+	<target name="undeploy-jboss42-endorsed" depends="prepare" if="HAVE_JDK_1.6">		
+		<macro-undeploy-endorsed jbosshome="${jboss42.home}"/>
+	</target>
   
 	<!-- Deploy jbossws to jboss40 -->
 	<target name="deploy-jboss40" depends="jars-jboss40,undeploy-jboss40,deploy-jboss40-no-ejb3" description="Deploy jbossws to jboss40"/>
@@ -79,12 +94,9 @@
 				jbosslibs="${int.jboss40.dir}/output/lib"
 				corelibs="${core.dir}/output/lib"
 				stacklibs="${int.native.dir}/output/lib"
-				thirdpartylibs="${core.dir}/thirdparty"
-				corescripts="${core.dir}/src/main/etc"/>
-
+				thirdpartylibs="${core.dir}/thirdparty"/>
 		<macro-deploy-spi
 				spilibs="${spi.dir}/output/lib"
-				spiscripts="${spi.dir}/etc"
 				thirdpartylibs="${spi.dir}/thirdparty"
 				jbosshome="${jboss40.home}"/>
 	</target>

Modified: trunk/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- trunk/integration/native/ant-import/macros-deploy-native.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/ant-import/macros-deploy-native.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,10 +23,13 @@
 		<attribute name="corelibs"/>
 		<attribute name="stacklibs"/>
 		<attribute name="thirdpartylibs"/>
-		<attribute name="corescripts"/>
 		<sequential>
 			<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
 
+      <!-- BIN SCRIPTS -->
+      <unzip dest="${jboss50.home}/bin" src="@{corelibs}/jbossws-core-scripts.zip"/>
+			<chmod dir="${jboss50.home}/bin" perm="+x" includes="*.sh"/>
+      
 			<!-- CLIENT JARS -->
 			<copy todir="${jboss50.home}/client" overwrite="true">
 				<fileset dir="@{jbosslibs}">
@@ -66,34 +69,30 @@
 					<include name="jboss-saaj.jar"/>
 				</fileset>
 			</copy>
-
+      
 			<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
 			<unzip dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer" src="@{stacklibs}/jbossws-native50-deployer.zip"/>
 			<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
 			<unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native50.sar"/>
 			<copy tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war" file="@{stacklibs}/jbossws-context.war" overwrite="true"/>
-			<!-- Deploy juddi-service.sar -->
 			<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
 			<unzip dest="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
-
-			<copy todir="${jboss50.home}/bin" overwrite="true">
-				<fileset dir="@{corescripts}">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
-				</fileset>
-			</copy>
-			<chmod dir="${jboss50.home}/bin" perm="+x" includes="*.sh"/>
 		</sequential>
 	</macrodef>
 
 	<macrodef name="macro-undeploy-native50">		
 		<sequential>
 			<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
+      
 			<delete>
-
+        <!-- BIN SCRIPTS -->
+				<fileset dir="${jboss50.home}/bin">
+					<include name="wsconsume.*"/>
+					<include name="wsprovide.*"/>
+					<include name="wsrunclient.*"/>
+					<include name="wstools.*"/>
+				</fileset>
+        
 				<!-- CLIENT JARS -->
 				<fileset dir="${jboss50.home}/client">
 					<include name="jaxb-api.jar"/>
@@ -123,18 +122,7 @@
 			<delete dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
 			<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
 			<delete file="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"/>
-			<!-- Undeploy juddi-service.sar -->
 			<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
-
-			<delete>
-				<fileset dir="${jboss50.home}/bin">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
-				</fileset>
-			</delete>
 		</sequential>
 	</macrodef>
 
@@ -144,10 +132,13 @@
 		<attribute name="corelibs"/>
 		<attribute name="stacklibs"/>
 		<attribute name="thirdpartylibs"/>
-		<attribute name="corescripts"/>
 		<sequential>
 			<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
 
+      <!-- BIN SCRIPTS -->
+      <unzip dest="${jboss42.home}/bin" src="@{corelibs}/jbossws-core-scripts.zip"/>
+			<chmod dir="${jboss42.home}/bin" perm="+x" includes="*.sh"/>
+      
 			<!-- CLIENT JARS -->
 			<copy todir="${jboss42.home}/client" overwrite="true">
 				<fileset dir="@{jbosslibs}">
@@ -169,36 +160,18 @@
 					<include name="policy.jar"/>
 				</fileset>
 			</copy>
-
+      
 			<!-- SERVER JARS -->
 			<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
 				<fileset dir="@{jbosslibs}">
 					<include name="jbossws-jboss42.jar"/>
 				</fileset>
-				<fileset dir="@{corelibs}">
-					<include name="jboss-jaxrpc.jar"/>
-					<include name="jboss-jaxws.jar"/>
-					<include name="jboss-saaj.jar"/>
-				</fileset>
 			</copy>
 
 			<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
 			<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native42.sar"/>
-			<!-- Deploy juddi-service.sar -->
 			<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
 			<unzip dest="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
-
-			<copy todir="${jboss42.home}bin" overwrite="true">
-				<fileset dir="@{corescripts}">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
-				</fileset>
-			</copy>
-			<chmod dir="${jboss42.home}/bin" perm="+x" includes="*.sh"/>
-
 		</sequential>
 	</macrodef>
 
@@ -206,8 +179,16 @@
 		<sequential>
 			<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
 			<delete>
-
-				<!-- CLIENT JARS -->
+        
+        <!-- BIN SCRIPTS -->
+				<fileset dir="${jboss42.home}/bin">
+					<include name="wsconsume.*"/>
+					<include name="wsprovide.*"/>
+					<include name="wsrunclient.*"/>
+					<include name="wstools.*"/>
+				</fileset>
+        
+  			<!-- CLIENT JARS -->
 				<fileset dir="${jboss42.home}/client">
 					<include name="jaxb-api.jar"/>
 					<include name="jaxb-impl.jar"/>
@@ -226,6 +207,9 @@
 				</fileset>
 
 				<!-- SERVER JARS -->
+				<fileset dir="${jboss42.home}/lib/endorsed">
+					<include name="jaxb-api.jar"/>
+				</fileset>
 				<fileset dir="${jboss42.home}/lib">
 					<!-- Remove only, do not deploy -->
 					<include name="jbossws-integration.jar"/>
@@ -238,18 +222,7 @@
 				</fileset>
 			</delete>
 			<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
-			<!-- Undeploy juddi-service.sar -->
 			<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
-
-			<delete>
-				<fileset dir="${jboss42.home}/bin">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
-				</fileset>
-			</delete>
 		</sequential>
 	</macrodef>
 
@@ -259,10 +232,13 @@
 		<attribute name="corelibs"/>
 		<attribute name="stacklibs"/>
 		<attribute name="thirdpartylibs"/>
-		<attribute name="corescripts"/>
 		<sequential>
 			<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
 
+      <!-- BIN SCRIPTS -->
+      <unzip dest="${jboss40.home}/bin" src="@{corelibs}/jbossws-core-scripts.zip"/>
+			<chmod dir="${jboss40.home}/bin" perm="+x" includes="*.sh"/>
+      
 			<!-- CLIENT JARS -->
 			<copy todir="${jboss40.home}/client" overwrite="true">
 				<fileset dir="@{jbosslibs}">
@@ -300,21 +276,8 @@
 
 			<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
 			<unjar dest="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native40.sar"/>
-			<!-- Deploy juddi-service.sar -->
 			<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
 			<unzip dest="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
-
-			<copy todir="${jboss40.home}/bin" overwrite="true">
-				<fileset dir="@{corescripts}">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
-				</fileset>
-			</copy>
-			<chmod dir="${jboss40.home}/bin" perm="+x" includes="*.sh"/>
-
 		</sequential>
 	</macrodef>
 
@@ -338,8 +301,16 @@
 		<sequential>
 			<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
 			<delete>
-
-				<!-- CLIENT JARS -->
+        
+        <!-- BIN SCRIPTS -->
+				<fileset dir="${jboss40.home}/bin">
+					<include name="wsconsume.*"/>
+					<include name="wsprovide.*"/>
+					<include name="wsrunclient.*"/>
+					<include name="wstools.*"/>
+				</fileset>
+        
+  			<!-- CLIENT JARS -->
 				<fileset dir="${jboss40.home}/client">
 					<include name="jaxb-api.jar"/>
 					<include name="jaxb-impl.jar"/>
@@ -372,18 +343,41 @@
 				</fileset>
 			</delete>
 			<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
-			<!-- Undeploy juddi-service.sar -->
 			<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
 			<!-- Remove only, do not deploy -->
 			<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
+		</sequential>
+	</macrodef>
+  
+  <!-- Deploy API jars to lib/endorsed for usage with jdk1.6 -->
+	<macrodef name="macro-deploy-endorsed">
+		<attribute name="jbosshome"/>
+		<attribute name="corelibs"/>
+		<attribute name="thirdpartylibs"/>
+		<sequential>
+			<copy todir="@{jbosshome}/lib/endorsed" overwrite="true">
+				<fileset dir="@{thirdpartylibs}">
+					<include name="jaxb-api.jar"/>
+				</fileset>
+				<fileset dir="@{corelibs}">
+					<include name="jboss-jaxrpc.jar"/>
+					<include name="jboss-jaxws.jar"/>
+					<include name="jboss-saaj.jar"/>
+				</fileset>
+			</copy>
+		</sequential>
+	</macrodef>
 
+  <!-- Undeploy API jars from lib/endorsed -->
+	<macrodef name="macro-undeploy-endorsed">
+		<attribute name="jbosshome"/>
+		<sequential>
 			<delete>
-				<fileset dir="${jboss40.home}/bin">
-					<include name="wspublish.sh"/>
-					<include name="wsrunclient.bat"/>
-					<include name="wsrunclient.sh"/>
-					<include name="wstools.bat"/>
-					<include name="wstools.sh"/>
+				<fileset dir="@{jbosshome}/lib/endorsed">
+					<include name="jaxb-api.jar"/>
+					<include name="jboss-jaxrpc.jar"/>
+					<include name="jboss-jaxws.jar"/>
+					<include name="jboss-saaj.jar"/>
 				</fileset>
 			</delete>
 		</sequential>

Modified: trunk/integration/native/build.xml
===================================================================
--- trunk/integration/native/build.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/build.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -158,7 +158,9 @@
       <metainf dir="${core.dir}/src/main/resources/standard-config">
         <include name="standard-*-config.xml"/>
       </metainf>
-      <metainf dir="${native.resources.dir}/jbossws-native50.sar/META-INF"/>
+      <metainf dir="${native.resources.dir}/jbossws-native50.sar/META-INF">
+        <include name="jbossws-beans.xml"/>
+      </metainf>
     </jar>
     
     <!-- Build jbossws-native50.deployer -->
@@ -185,6 +187,8 @@
       </fileset>
       <fileset dir="${core.dir}/output/lib">
         <include name="jboss-jaxws.jar"/>
+        <include name="jboss-jaxrpc.jar"/>
+        <include name="jboss-saaj.jar"/>
         <include name="jbossws-core.jar"/>
       </fileset>
       <fileset dir="${core.dir}/thirdparty">

Modified: trunk/integration/native/src/main/etc/bin-dist-build.xml
===================================================================
--- trunk/integration/native/src/main/etc/bin-dist-build.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/src/main/etc/bin-dist-build.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -59,6 +59,12 @@
 	<available property="jboss40.available" file="${jboss40.available.file}"/>
   
   <available property="jboss40.ejb3.available" file="${jboss40.client}/jboss-ejb3-client.jar"/>
+  
+  <!-- JDK Detection -->
+  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+  <available classname="java.io.Console" property="HAVE_JDK_1.6"/>
+  
+  <fail message="JDK1.5 or above is required" unless="HAVE_JDK_1.5"/>
 
 	<import file="${basedir}/build/build-deploy.xml"/>
 	<import file="${basedir}/build/build-testsuite.xml"/>
@@ -129,6 +135,11 @@
 
 	<target name="tests-main" depends="tests-jars" description="Build the test deployments."/>
 
+  <!-- dummy jar targets -->
+	<target name="jars-jboss50" depends="prepare"/>
+	<target name="jars-jboss42" depends="prepare"/>
+	<target name="jars-jboss40" depends="prepare"/>
+  
 	<!-- ================================================================== -->
 	<!-- Miscellaneous                                                       -->
 	<!-- ================================================================== -->

Modified: trunk/integration/native/src/main/etc/bin-dist-deploy.xml
===================================================================
--- trunk/integration/native/src/main/etc/bin-dist-deploy.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/src/main/etc/bin-dist-deploy.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -18,7 +18,7 @@
 	<!-- ================================================================== -->
 
 	<!-- Deploy jbossws/native to jboss50 -->
-	<target name="deploy-jboss50" depends="undeploy-jboss50" description="Deploy jbossws/native to jboss50">		
+	<target name="deploy-jboss50" depends="undeploy-jboss50,deploy-jboss50-endorsed" description="Deploy jbossws/native to jboss50">		
 		<macro-undeploy-sunri50/>
 		<macro-undeploy-xfire50/>
 		<macro-deploy-native50
@@ -26,15 +26,18 @@
 				jbosslibs="${lib.dir}"
 				corelibs="${lib.dir}"
 				stacklibs="${lib.dir}"
-				thirdpartylibs="${lib.dir}"
-				corescripts="${bin.dir}"/>
-
+				thirdpartylibs="${lib.dir}"/>
 		<macro-deploy-spi
 				spilibs="${lib.dir}"
-				spiscripts="${bin.dir}"
 				thirdpartylibs="${lib.dir}"
         jbosshome="${jboss50.home}"/>
 	</target>
+	<target name="deploy-jboss50-endorsed" depends="prepare" if="HAVE_JDK_1.6">
+		<macro-deploy-endorsed
+				jbosshome="${jboss50.home}"
+				corelibs="${lib.dir}"
+				thirdpartylibs="${lib.dir}"/>
+	</target>
 
 	<!-- Remove jbossws/native from jboss50 -->
 	<target name="undeploy-jboss50" depends="prepare" description="Remove jbossws/native from jboss50">
@@ -43,7 +46,7 @@
 	</target>
 
 	<!-- Deploy jbossws/native to jboss42 -->
-	<target name="deploy-jboss42" depends="undeploy-jboss42" description="Deploy jbossws/native to jboss42">
+	<target name="deploy-jboss42" depends="undeploy-jboss42,deploy-jboss42-endorsed" description="Deploy jbossws/native to jboss42">
 		<macro-undeploy-sunri42/>
 		<macro-undeploy-xfire42/>
 		<macro-deploy-native42
@@ -51,21 +54,27 @@
 				jbosslibs="${lib.dir}"
 				corelibs="${lib.dir}"
 				stacklibs="${lib.dir}"
-				thirdpartylibs="${lib.dir}"
-				corescripts="${bin.dir}"/>
-    
+				thirdpartylibs="${lib.dir}"/>
 		<macro-deploy-spi
 				spilibs="${lib.dir}"
-				spiscripts="${bin.dir}"
 				thirdpartylibs="${lib.dir}"
         jbosshome="${jboss42.home}"/>
 	</target>
+	<target name="deploy-jboss42-endorsed" depends="prepare" if="HAVE_JDK_1.6">
+		<macro-deploy-endorsed
+				jbosshome="${jboss42.home}"
+				corelibs="${lib.dir}"
+				thirdpartylibs="${lib.dir}"/>
+	</target>
 
 	<!-- Remove jbossws/native from jboss42 -->
-	<target name="undeploy-jboss42" depends="prepare" description="Remove jbossws/native from jboss42">
+	<target name="undeploy-jboss42" depends="prepare,undeploy-jboss42-endorsed" description="Remove jbossws/native from jboss42">
 		<macro-undeploy-native42/>
 		<macro-undeploy-spi jbosshome="${jboss42.home}"/>
 	</target>
+	<target name="undeploy-jboss42-endorsed" depends="prepare" if="HAVE_JDK_1.6">		
+		<macro-undeploy-endorsed jbosshome="${jboss42.home}"/>
+	</target>
 
 	<!-- Deploy jbossws/native to jboss40 -->
 	<target name="deploy-jboss40" depends="deploy-jboss40-no-ejb3" description="Deploy jbossws/native to jboss40"/>
@@ -76,12 +85,10 @@
 				jbosslibs="${lib.dir}"
 				corelibs="${lib.dir}"
 				stacklibs="${lib.dir}"
-				thirdpartylibs="${lib.dir}"
-				corescripts="${bin.dir}"/>
+				thirdpartylibs="${lib.dir}"/>
     
 		<macro-deploy-spi
 				spilibs="${lib.dir}"
-				spiscripts="${bin.dir}"
 				thirdpartylibs="${lib.dir}"
         jbosshome="${jboss40.home}"/>
 	</target>

Modified: trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -33,10 +33,6 @@
     <property name="bindAddress">${jboss.bind.address}</property>
   </bean>
   
-  <!-- Bind Service objects in client environment context  -->
-  <!-- The bean name is compiled into the server. Changeit with the next release. -->
-  <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-  
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
     <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>

Modified: trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -33,10 +33,6 @@
     <property name="bindAddress">${jboss.bind.address}</property>
   </bean>
   
-  <!-- Bind Service objects in client environment context  -->
-  <!-- The bean name is compiled into the server. Changeit with the next release. -->
-  <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-  
   <!-- Locate the single instance of the kernel -->  
   <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
     <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>

Modified: trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -135,7 +135,7 @@
     Each handles a single aspect of web service deployment 
   --> 
   <bean name="WSClassLoaderInjectionDeployer" class="org.jboss.wsf.container.jboss50.ClassLoaderInjectionDeployer"/>
-  <bean name="WSContextRootDeployer" class="org.jboss.wsf.spi.deployment.ContextRootDeployer"/>
+  <bean name="WSContextRootDeployer" class="org.jboss.ws.core.server.BackwardCompatibleContextRootDeployer"/>
   <bean name="WSEagerInitializeDeployer" class="org.jboss.wsf.stack.jbws.EagerInitializeDeployer"/>
   <bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
     <property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
@@ -161,7 +161,7 @@
   <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
   <bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeployer"/>
   <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
-  <bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
+  <bean name="WSURLPatternDeployer" class="org.jboss.ws.core.server.BackwardCompatibleURLPatternDeployer"/>
   <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
     <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
     <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>

Modified: trunk/integration/spi/ant-import/build-release.xml
===================================================================
--- trunk/integration/spi/ant-import/build-release.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/ant-import/build-release.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,9 +23,9 @@
     <copy todir="${jboss.repository.dir}/jbossws-spi/${repository.id}/lib" overwrite="true">
       <fileset dir="${spi.output.lib.dir}">
         <include name="jbossws-spi.jar"/>
-        <include name="jbossws-integration-src.zip"/>
-		  <include name="jbossws-spi-scripts.zip"/>
-		</fileset>
+        <include name="jbossws-spi-src.zip"/>
+        <include name="jbossws-spi-scripts.zip"/>
+	  </fileset>
     </copy>
     <copy tofile="${jboss.repository.dir}/jbossws-spi/${repository.id}/component-info.xml" file="${spi.etc.dir}/component-info.xml" filtering="true" overwrite="true">
       <filterset>

Modified: trunk/integration/spi/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/spi/ant-import/build-thirdparty.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/ant-import/build-thirdparty.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -41,6 +41,8 @@
     <mkdir dir="${thirdparty.dir}"/>
     <get src="${jboss.repository}/apache-ant/${apache-ant}/lib/ant.jar" dest="${thirdparty.dir}/ant.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar" dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
@@ -57,6 +59,7 @@
     <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/stax-api/${stax-api}/lib/stax-api.jar" dest="${thirdparty.dir}/stax-api.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaf/${sun-jaf}/lib/activation.jar" dest="${thirdparty.dir}/activation.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>

Modified: trunk/integration/spi/ant-import/macros-deploy-spi.xml
===================================================================
--- trunk/integration/spi/ant-import/macros-deploy-spi.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/ant-import/macros-deploy-spi.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -15,29 +15,27 @@
 
 	<macrodef name="macro-deploy-spi">
 		<attribute name="spilibs"/>
-		<attribute name="spiscripts"/>
 		<attribute name="thirdpartylibs"/>
 		<attribute name="jbosshome"/>
 		<sequential>
+      
+      <!-- BIN SCRIPTS -->
+      <unzip dest="@{jbosshome}/bin" src="@{spilibs}/jbossws-spi-scripts.zip"/>
+			<chmod dir="@{jbosshome}/bin" perm="+x" includes="*.sh"/>
+      
+      <!-- CLIENT JARS-->
 			<copy todir="@{jbosshome}/client">
 				<fileset dir="@{spilibs}">
 					<include name="jbossws-spi.jar"/>
 				</fileset>
 			</copy>
+      
+      <!-- SERVER JARS-->
 			<copy todir="@{jbosshome}/server/${jboss.server.instance}/lib">
 				<fileset dir="@{spilibs}">
 					<include name="jbossws-spi.jar"/>
 				</fileset>
 			</copy>
-			<copy todir="@{jbosshome}/bin" overwrite="true">
-				<fileset dir="@{spiscripts}">
-					<include name="wsconsume.bat"/>
-					<include name="wsconsume.sh"/>
-					<include name="wsprovide.bat"/>
-					<include name="wsprovide.sh"/>
-				</fileset>
-			</copy>
-			<chmod dir="@{jbosshome}/bin" perm="+x" includes="*.sh"/>
 		</sequential>
 	</macrodef>
 
@@ -45,18 +43,21 @@
 		<attribute name="jbosshome"/>
 		<sequential>
 			<delete>
+        <!-- BIN SCRIPTS -->
+				<fileset dir="@{jbosshome}/bin">
+					<include name="wsconsume.*"/>
+					<include name="wsprovide.*"/>
+				</fileset>
+        
+        <!-- CLIENT JARS-->
 				<fileset dir="@{jbosshome}/client">
 					<include name="jbossws-spi.jar"/>
 				</fileset>
+        
+        <!-- SERVER JARS-->
 				<fileset dir="@{jbosshome}/server/${jboss.server.instance}/lib">
 					<include name="jbossws-spi.jar"/>
 				</fileset>
-				<fileset dir="@{jbosshome}/bin">
-					<include name="wsconsume.bat"/>
-					<include name="wsconsume.sh"/>
-					<include name="wsprovide.bat"/>
-					<include name="wsprovide.sh"/>
-				</fileset>
 			</delete>
 		</sequential>
 	</macrodef>

Modified: trunk/integration/spi/build.xml
===================================================================
--- trunk/integration/spi/build.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/build.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -71,9 +71,7 @@
   <target name="compile-etc" depends="init">
     <mkdir dir="${spi.output.etc.dir}"/>
     <copy todir="${spi.output.etc.dir}" filtering="yes">
-      <fileset dir="${spi.etc.dir}">
-        <include name="component-info.xml"/>
-  	  </fileset>
+      <fileset dir="${spi.etc.dir}"/>
       <fileset dir="${build.dir}/etc">
         <include name="default.mf"/>
   	  </fileset>
@@ -111,15 +109,23 @@
       </fileset>
     </jar>
     
-    <!-- Build jbossws-src.zip -->
+    <!-- Build jbossws-spi-scripts.zip -->
+    <zip zipfile="${spi.output.lib.dir}/jbossws-spi-scripts.zip" >
+			<fileset dir="${spi.output.etc.dir}">
+				<include name="wsconsume.bat"/>
+				<include name="wsprovide.bat"/>
+			</fileset>
+			<zipfileset dir="${spi.output.etc.dir}" filemode="755">
+				<include name="wsconsume.sh"/>
+				<include name="wsprovide.sh"/>
+			</zipfileset>
+    </zip>
+	  
+    <!-- Build jbossws-spi-src.zip -->
     <zip zipfile="${spi.output.lib.dir}/jbossws-spi-src.zip" >
       <fileset dir="${spi.java.dir}"/>
     </zip>
 
-	  <!-- Build jbossws-spi-scripts.zip -->
-    <zip zipfile="${spi.output.lib.dir}/jbossws-spi-scripts.zip" >
-      <fileset dir="${spi.dir}/etc"/>
-    </zip>
   </target>
   
   <!-- ================================================================== -->

Modified: trunk/integration/spi/src/main/etc/component-info.xml
===================================================================
--- trunk/integration/spi/src/main/etc/component-info.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/etc/component-info.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,4 +1,5 @@
 <project name="jboss/jbossws-spi">
+    <artifact id="jbossws-spi-scripts.zip"/>
 
 	<component id="jboss/jbossws-spi"
 				  description="JBossWS SPI"

Copied: trunk/integration/spi/src/main/etc/wsconsume.bat (from rev 3528, branches/jbossws-2.0/integration/spi/src/main/etc/wsconsume.bat)
===================================================================
--- trunk/integration/spi/src/main/etc/wsconsume.bat	                        (rev 0)
+++ trunk/integration/spi/src/main/etc/wsconsume.bat	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,55 @@
+ at echo off
+
+rem $Id: wsgen.bat 2158 2007-01-27 06:20:59Z jason.greene at jboss.com $
+
+ at if not "%ECHO%" == ""  echo %ECHO%
+ at if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.\
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+set PROGNAME=run.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
+
+rem Read all command line arguments
+
+REM
+REM The %ARGS% env variable commented out in favor of using %* to include
+REM all args in java command line. See bug #840239. [jpl]
+REM
+REM set ARGS=
+REM :loop
+REM if [%1] == [] goto endloop
+REM         set ARGS=%ARGS% %1
+REM         shift
+REM         goto loop
+REM :endloop
+
+set JAVA=%JAVA_HOME%\bin\java
+set JBOSS_HOME=%DIRNAME%\..
+rem Setup the java endorsed dirs
+set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
+
+rem Setup the wstools classpath
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/stax-api.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-xjc.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxws-rt.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxws-tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-saaj.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxrpc.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxws.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+
+rem Execute the JVM
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSCONSUME_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSConsume %*

Copied: trunk/integration/spi/src/main/etc/wsconsume.sh (from rev 3528, branches/jbossws-2.0/integration/spi/src/main/etc/wsconsume.sh)
===================================================================
--- trunk/integration/spi/src/main/etc/wsconsume.sh	                        (rev 0)
+++ trunk/integration/spi/src/main/etc/wsconsume.sh	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+#
+# Invoke wsconsume with dynamic classpath
+# depending on the deployed stack and the location
+#
+# @author Heiko.Braun at jboss.com
+# @version $Id: $
+#
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+    CYGWIN*)
+        cygwin=true
+        ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+    [ -n "$JBOSS_HOME" ] &&
+        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+    [ -n "$JAVA_HOME" ] &&
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+    # get the full path (without any relative bits)
+    JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
+	JAVA="$JAVA_HOME/bin/java"
+    else
+	JAVA="java"
+    fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="$JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+###
+# Setup the LIBDIR
+# This script maybe used form within the jbossws distribution
+# or installed under JBOSS_HOME/bin
+###
+
+PARENT=`cd $DIRNAME/..; pwd`
+if [ -d $PARENT/client ]; then	
+	LIBDIR=$JBOSS_HOME/client
+else
+	LIBDIR=$PARENT/lib	
+fi
+
+# Is it a JBossWS-native or SunRI installation?
+if [ -a $LIBDIR/jbossws-client.jar ]; then
+    JBOSSWS_NATIVE="true"
+fi
+
+###
+# Setup the wsconsume classpath
+# The classpath is dynamically build depending on the stack that
+# is deployed. See $JBOSSWS_NATIVE above.
+###
+
+# shared libs
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JAVA_HOME/lib/tools.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/activation.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/getopt.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/wstx.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossall-client.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/log4j.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/mail.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-spi.jar"
+
+# shared jaxws libs 
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jaxws-tools.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jaxws-rt.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/stax-api.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jaxb-api.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jaxb-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jaxb-xjc.jar"
+
+# stack specific dependencies
+if [ "x$JBOSSWS_NATIVE" = "x" ]; then
+   echo "Seems to be a Sun-RI stack deployed"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-sunri-client.jar"
+else
+   echo "Seems to be a JBossWS-Native stack deployed"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/javassist.jar"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jbossws-client.jar"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
+   WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$LIBDIR/jboss-saaj.jar"
+fi
+
+###
+# Execute the JVM
+###
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+    WSCONSUME_CLASSPATH=`cygpath --path --windows "$WSCONSUME_CLASSPATH"`
+    JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
+fi
+
+"$JAVA" $JAVA_OPTS \
+   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+   -Dlog4j.configuration=wstools-log4j.xml \
+   -classpath "$WSCONSUME_CLASSPATH" \
+   org.jboss.wsf.spi.tools.cmd.WSConsume "$@"

Copied: trunk/integration/spi/src/main/etc/wsprovide.bat (from rev 3528, branches/jbossws-2.0/integration/spi/src/main/etc/wsprovide.bat)
===================================================================
--- trunk/integration/spi/src/main/etc/wsprovide.bat	                        (rev 0)
+++ trunk/integration/spi/src/main/etc/wsprovide.bat	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,49 @@
+ at echo off
+
+rem $Id: wsprovide.bat 3101 2007-05-16 08:26:33Z heiko.braun at jboss.com $
+
+ at if not "%ECHO%" == ""  echo %ECHO%
+ at if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.\
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+set PROGNAME=run.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
+
+rem Read all command line arguments
+
+REM
+REM The %ARGS% env variable commented out in favor of using %* to include
+REM all args in java command line. See bug #840239. [jpl]
+REM
+REM set ARGS=
+REM :loop
+REM if [%1] == [] goto endloop
+REM         set ARGS=%ARGS% %1
+REM         shift
+REM         goto loop
+REM :endloop
+
+set JAVA=%JAVA_HOME%\bin\java
+set JBOSS_HOME=%DIRNAME%\..
+rem Setup the java endorsed dirs
+set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
+
+rem Setup the wstools classpath
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxws.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxrpc.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-saaj.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
+
+rem Execute the JVM
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSProvide %*

Copied: trunk/integration/spi/src/main/etc/wsprovide.sh (from rev 3528, branches/jbossws-2.0/integration/spi/src/main/etc/wsprovide.sh)
===================================================================
--- trunk/integration/spi/src/main/etc/wsprovide.sh	                        (rev 0)
+++ trunk/integration/spi/src/main/etc/wsprovide.sh	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+#
+# Invoke wsprovide with dynamic classpath
+# depending on the deployed stack and the location
+#
+# @author Heiko.Braun at jboss.com
+# @version $Id: $
+#
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+    CYGWIN*)
+        cygwin=true
+        ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+    [ -n "$JBOSS_HOME" ] &&
+        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+    [ -n "$JAVA_HOME" ] &&
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+    # get the full path (without any relative bits)
+    JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
+	JAVA="$JAVA_HOME/bin/java"
+    else
+	JAVA="java"
+    fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="$JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+###
+# Setup the LIBDIR
+# This script maybe used form within the jbossws distribution
+# or installed under JBOSS_HOME/bin
+###
+
+PARENT=`cd $DIRNAME/..; pwd`
+if [ -d $PARENT/client ]; then
+	LIBDIR=$JBOSS_HOME/client
+else
+	LIBDIR=$PARENT/lib
+fi
+
+# is it a JBossWS-native or SunRI installation?
+if [ -a $LIBDIR/jbossws-client.jar ]; then
+    JBOSSWS_NATIVE="true"
+fi
+
+###
+# Setup the wsprovide classpath
+# The classpath is dynamically build depending on the stack that
+# is deployed. See $JBOSSWS_NATIVE above.
+###
+
+# shared libs
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JAVA_HOME/lib/tools.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-spi.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/activation.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/getopt.jar"
+
+# TODO: verify jbossall-client.jar dependency. It might be just logging
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossall-client.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/log4j.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/mail.jar"
+
+# shared jaxws libs
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxb-api.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxb-impl.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxb-xjc.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxws-tools.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxws-rt.jar"
+
+# stack specific dependencies
+if [ "x$JBOSSWS_NATIVE" = "x" ]; then
+   echo "Seems to be a Sun-RI stack deployed"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-sunri-client.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jaxws-api.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jsr181-api.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-api.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/saaj-impl.jar"
+else
+   echo "Seems to be a JBossWS-Native stack deployed"	
+	WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-xml-binding.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/javassist.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossall-client.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jbossws-client.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxws.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-jaxrpc.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/jboss-saaj.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/policy.jar"
+   WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$LIBDIR/wsdl4j.jar"
+fi
+
+###
+# Execute the JVM
+###
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+    WSPROVIDE_CLASSPATH=`cygpath --path --windows "$WSPROVIDE_CLASSPATH"`
+    JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
+fi
+
+"$JAVA" $JAVA_OPTS \
+   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+   -Dlog4j.configuration=wstools-log4j.xml \
+   -classpath "$WSPROVIDE_CLASSPATH" \
+   org.jboss.wsf.spi.tools.cmd.WSProvide "$@"

Deleted: trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,194 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.ws.integration;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Properties;
-
-
-// $Id$
-
-/**
- * Load a factory using this ordered lookup procedure
- *
- * <ol>
- *  <li>Use the system property
- *  <li>Use the properties file "lib/jaxm.properties" in the JRE directory
- *  <li>Use the Services API (as detailed in the JAR specification), if available, to determine the classname
- *  <li>Use the default factory implementation class
- * </ol>
- *
- * @author Thomas.Diesler at jboss.com
- * @since 14-Dec-2006
- */
-public class FactoryLoader
-{
-   private FactoryLoader()
-   {
-   }
-
-   /**   
-    *  
-    *  @return the factory impl, or null 
-    */
-   public static Object loadFactory(String propertyName, String defaultFactory) 
-   {
-      Object factory = null;
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
-      // Use the system property
-      PrivilegedAction action = new PropertyAccessAction(propertyName);
-      String factoryName = (String)AccessController.doPrivileged(action);
-      if (factoryName != null)
-      {
-         try
-         {
-            //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
-            Class factoryClass = loader.loadClass(factoryName);
-            factory = factoryClass.newInstance();
-         }
-         catch (Throwable t)
-         {
-            throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
-         }
-      }
-
-      // Use the properties file "lib/jaxm.properties" in the JRE directory.
-      // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
-      if (factory == null)
-      {
-         action = new PropertyAccessAction("java.home");
-         String javaHome = (String)AccessController.doPrivileged(action);
-         File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
-         if (jaxmFile.exists())
-         {
-            try
-            {
-               action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
-               Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
-               factoryName = jaxmProperties.getProperty(propertyName);
-               if (factoryName != null)
-               {
-                  //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
-                  Class factoryClass = loader.loadClass(factoryName);
-                  factory = factoryClass.newInstance();
-               }
-            }
-            catch (Throwable t)
-            {
-               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
-            }
-         }
-      }
-
-      // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
-      if (factory == null)
-      {
-         String filename = "META-INF/services/" + propertyName;
-         InputStream inStream = loader.getResourceAsStream(filename);
-         if (inStream != null)
-         {
-            try
-            {
-               BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
-               factoryName = br.readLine();
-               br.close();
-               if (factoryName != null)
-               {
-                  //if(log.isTraceEnabled()) log.trace("Load from Service API " + filename + ": " + factoryName);
-                  Class factoryClass = loader.loadClass(factoryName);
-                  factory = factoryClass.newInstance();
-               }
-            }
-            catch (Throwable t)
-            {
-               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
-            }
-         }
-      }
-
-      // Use the default factory implementation class.
-      if (factory == null && defaultFactory != null)
-      {
-         try
-         {
-            factoryName = defaultFactory;
-            //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
-            Class factoryClass = loader.loadClass(factoryName);
-            factory = factoryClass.newInstance();
-         }
-         catch (Throwable t)
-         {
-            throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
-         }
-      }
-
-      return factory;
-   }
-
-   private static class PropertyAccessAction implements PrivilegedAction
-   {
-      private String name;
-
-      PropertyAccessAction(String name)
-      {
-         this.name = name;
-      }
-
-      public Object run()
-      {
-         return System.getProperty(name);
-      }
-   }
-
-   private static class PropertyFileAccessAction implements PrivilegedAction
-   {
-      private String filename;
-
-      PropertyFileAccessAction(String filename)
-      {
-         this.filename = filename;
-      }
-
-      public Object run()
-      {
-         try
-         {
-            InputStream inStream = new FileInputStream(filename);
-            Properties props = new Properties();
-            props.load(inStream);
-            return props;
-         }
-         catch (IOException ex)
-         {
-            throw new SecurityException("Cannot load properties: " + filename, ex);
-         }
-      }
-   }
-}

Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -37,8 +37,6 @@
  */
 public interface ServiceRefHandler
 {
-   String BEAN_NAME = "ServiceRefHandler";
-   
    ServiceRefMetaData newServiceRefMetaData();
 
    Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs);

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -26,7 +26,6 @@
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
 
 /**
  * A deployer that assigns the context root to the service 
@@ -39,8 +38,21 @@
    @Override
    public void create(Deployment dep)
    {
+      String contextRoot = getExplicitContextRoot(dep);
+      if (contextRoot == null)
+         contextRoot = getImplicitContextRoot(dep);
+      
+      // Always prefix with '/'
+      if (contextRoot.startsWith("/") == false)
+         contextRoot = "/" + contextRoot;
+      
+      dep.getService().setContextRoot(contextRoot);
+   }
+
+   protected String getExplicitContextRoot(Deployment dep)
+   {
       String contextRoot = null;
-      
+
       // #1 Use the explicit context root from the web meta data
       UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
       if (webMetaData != null)
@@ -70,22 +82,21 @@
          contextRoot = appMetaData.getWebServiceContextRoot();
       }
 
-      // #4 Use the implicit context root derived from the deployment name
-      if (contextRoot == null)
+      return contextRoot;
+   }
+
+   /** Use the implicit context root derived from the deployment name
+    */
+   protected String getImplicitContextRoot(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      String simpleName = udi.simpleName;
+      String contextRoot = simpleName.substring(0, simpleName.length() - 4);
+      if (udi.parent != null)
       {
-         UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
-         String simpleName = udi.simpleName;
-         contextRoot = simpleName.substring(0, simpleName.length() - 4);
-         if (udi.parent != null)
-         {
-            simpleName = udi.parent.simpleName;
-            contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" + contextRoot;
-         }
+         simpleName = udi.parent.simpleName;
+         contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" + contextRoot;
       }
-
-      if (contextRoot.startsWith("/"))
-         contextRoot = contextRoot.substring(1);
-
-      dep.getService().setContextRoot(contextRoot);
+      return contextRoot;
    }
 }
\ No newline at end of file

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -42,12 +42,19 @@
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {
-         String urlPattern = getUrlPattern(dep, ep);
+         String urlPattern = getExplicitPattern(dep, ep);
+         if (urlPattern == null)
+            urlPattern = getImplicitPattern(dep, ep);
+         
+         // Always prefix with '/'
+         if (urlPattern.startsWith("/") == false)
+            urlPattern = "/" + urlPattern;
+
          ep.setURLPattern(urlPattern);
       }
    }
 
-   private String getUrlPattern(Deployment dep, Endpoint ep)
+   protected String getExplicitPattern(Deployment dep, Endpoint ep)
    {
       String urlPattern = null;
 
@@ -81,13 +88,14 @@
          if (anWebContext != null && anWebContext.urlPattern().length() > 0)
             urlPattern = anWebContext.urlPattern();
       }
+      
+      return urlPattern;
+   }
 
+   protected String getImplicitPattern(Deployment dep, Endpoint ep)
+   {
       // #4 Fallback to the ejb-name 
-      if (urlPattern == null)
-      {
-         urlPattern = "/" + ep.getShortName();
-      }
-
+      String urlPattern = ep.getShortName();
       return urlPattern;
    }
 }
\ No newline at end of file

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/HandlerCallback.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/HandlerCallback.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/HandlerCallback.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -34,11 +34,11 @@
 public interface HandlerCallback
 {
    /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-   boolean callRequestHandlerChain(HandlerType type);
+   boolean callRequestHandlerChain(Invocation wsInv, HandlerType type);
 
    /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-   boolean callResponseHandlerChain(HandlerType type);
+   boolean callResponseHandlerChain(Invocation wsInv, HandlerType type);
 
    /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-   boolean callFaultHandlerChain(HandlerType type, Exception ex);
+   boolean callFaultHandlerChain(Invocation wsInv, HandlerType type, Exception ex);
 }
\ No newline at end of file

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,7 +23,7 @@
 
 // $Id$
 
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
 
 /**
  * A container idependent SecurityAdaptorFactory
@@ -35,7 +35,7 @@
 {
    public static SecurityAdaptor getSecurityAdaptor()
    {
-      SecurityAdaptor securityAdaptor = (SecurityAdaptor)FactoryLoader.loadFactory(SecurityAdaptor.class.getName(), null);
+      SecurityAdaptor securityAdaptor = (SecurityAdaptor)ServiceLoader.loadService(SecurityAdaptor.class.getName(), null);
       if (securityAdaptor == null)
          throw new IllegalStateException("Cannot load SecurityAdaptor");
 

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/test/TestDeployerJBoss.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/test/TestDeployerJBoss.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/test/TestDeployerJBoss.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -21,11 +21,21 @@
  */
 package org.jboss.wsf.spi.test;
 
+import java.io.IOException;
+import java.io.Serializable;
 import java.net.URL;
+import java.security.Principal;
 
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
 import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import javax.management.ReflectionException;
 
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+
 /**
  * A JBossWS test helper that deals with test deployment/undeployment, etc.
  *
@@ -37,19 +47,72 @@
    private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
    
    private MBeanServerConnection server;
+   private String username;
+   private String password;
 
    public TestDeployerJBoss(MBeanServerConnection server)
    {
       this.server = server;
+      
+      username = System.getProperty("jmx.authentication.username");
+      if ("${jmx.authentication.username}".equals(username))
+         username = null;
+      
+      password = System.getProperty("jmx.authentication.password");
+      if ("${jmx.authentication.password}".equals(password))
+         password = null;
    }
 
    public void deploy(URL url) throws Exception
    {
-      server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url }, new String[] { "java.net.URL" });
+      invokeMainDeployer("deploy", url);
    }
 
    public void undeploy(URL url) throws Exception
    {
-      server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { url }, new String[] { "java.net.URL" });
+      invokeMainDeployer("undeploy", url);
    }
+
+   private void invokeMainDeployer(String methodName, URL url) throws Exception
+   {
+      Principal prevUsername = null;
+      Object prevPassword = null;
+      
+      SecurityAdaptor securityAdaptor = SecurityAdaptorFactory.getSecurityAdaptor();
+      if (username != null || password != null)
+      {
+         prevUsername = securityAdaptor.getPrincipal();
+         prevPassword = securityAdaptor.getCredential();
+         securityAdaptor.setPrincipal(new SimplePrincipal(username));
+         securityAdaptor.setCredential(password);
+      }
+      
+      try
+      {
+         server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[] { url }, new String[] { "java.net.URL" });
+      }
+      finally
+      {
+         if (username != null || password != null)
+         {
+            securityAdaptor.setPrincipal(prevUsername);
+            securityAdaptor.setCredential(prevPassword);
+         }
+      }
+   }
+
+   public static class SimplePrincipal implements Principal, Serializable
+   {
+      private String name;
+      
+      public SimplePrincipal(String name)
+      {
+         this.name = name;
+      }
+
+      public String getName()
+      {
+         return name;
+      }
+   }
 }

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,35 +1,34 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.wsf.spi.tools;
 
-import org.jboss.ws.integration.FactoryLoader;
-import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
-
 import java.io.File;
 import java.io.PrintStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
 
+import org.jboss.wsf.spi.utils.ServiceLoader;
+
 /**
  * WSContractConsumer is responsible for generating JAX-WS client and server
  * artifacts from the specified WSDL file. To implement a client, one would use
@@ -56,7 +55,7 @@
    {
       return newInstance(Thread.currentThread().getContextClassLoader());
    }
-   
+
    /**
     * Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be used to
     * locate the WebServiceImporterProvide implementation
@@ -66,40 +65,40 @@
     */
    public static WSContractConsumer newInstance(ClassLoader loader)
    {
-      ClassLoader  oldLoader = Thread.currentThread().getContextClassLoader();
+      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
       try
       {
          Thread.currentThread().setContextClassLoader(loader);
-         WSContractConsumerFactory factory = (WSContractConsumerFactory)
-               FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+         WSContractConsumerFactory factory = (WSContractConsumerFactory)ServiceLoader.loadService(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
          return factory.createConsumer();
       }
-      finally{
+      finally
+      {
          Thread.currentThread().setContextClassLoader(oldLoader);
       }
    }
-   
+
    /**
     * Specifies the JAX-WS and JAXB binding files to use on import operations.
     * 
     * @param bindingFiles list of JAX-WS or JAXB binding files
     */
    public abstract void setBindingFiles(List<File> bindingFiles);
-   
+
    /**
     * Sets the OASIS XML Catalog file to use for entity resolution.
     * 
     * @param catalog the OASIS XML Catalog file
     */
    public abstract void setCatalog(File catalog);
-   
+
    /**
     * Sets the main output directory. If the directory does not exist, it will be created.
     * 
     * @param directory the root directory for generated files
     */
    public abstract void setOutputDirectory(File directory);
-   
+
    /**
     * Sets the source directory. This directory will contain any generated Java source.
     * If the directory does not exist, it will be created. If not specified, 
@@ -108,15 +107,14 @@
     * @param directory the root directory for generated source code
     */
    public abstract void setSourceDirectory(File directory);
-   
+
    /**
     * Enables/Disables Java source generation.
     * 
     * @param generateSource whether or not to generate Java source.
     */
    public abstract void setGenerateSource(boolean generateSource);
-   
-   
+
    /**
     * Sets the target package for generated source. If not specified the default
     * is based off of the XML namespace.
@@ -124,14 +122,14 @@
     * @param targetPackage the target package for generated source
     */
    public abstract void setTargetPackage(String targetPackage);
-   
+
    /**
     * Sets the @@WebService.wsdlLocation and @@WebServiceClient.wsdlLocation attributes to a custom value.
     * 
     * @param wsdlLocation the custom WSDL location to use in generated source
     */
    public abstract void setWsdlLocation(String wsdlLocation);
-   
+
    /**
     * Sets the PrintStream to use for status feedback. The simplest example
     * would be to use System.out.
@@ -139,8 +137,7 @@
     * @param messageStream  the stream to use for status messages:
     */
    public abstract void setMessageStream(PrintStream messageStream);
-   
- 
+
    /**
     * Sets the additional classpath to use if/when invoking the Java compiler.
     * Typically an implementation will use the system <code>java.class.path</code> 
@@ -153,7 +150,7 @@
     *                  single jar or directory
     */
    public abstract void setAdditionalCompilerClassPath(List<String> classPath);
-   
+
    /**
     * Generate the required artifacts using the specified WSDL URL. This method
     * may be called more than once, although this is probably not desireable
@@ -161,7 +158,7 @@
     * @param wsdl the URL of the WSDL
     */
    public abstract void consume(URL wsdl);
- 
+
    /**
     * Generate the required artifacts using the specified WSDL. This method
     * may be called more than once, although this is probably not desireable.
@@ -182,7 +179,7 @@
          File file = new File(wsdl);
          url = file.toURL();
       }
-         
+
       consume(url);
    }
 }

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,11 +1,9 @@
 package org.jboss.wsf.spi.tools;
 
-import org.jboss.wsf.spi.tools.WSContractProviderFactory;
-import org.jboss.ws.integration.FactoryLoader;
-
 import java.io.File;
 import java.io.PrintStream;
 
+import org.jboss.wsf.spi.utils.ServiceLoader;
 
 /**
  * WSContractProvider is responsible for generating the required portable
@@ -33,12 +31,12 @@
 {
    private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl";
    public static final String PROVIDER_PROPERTY = "org.jboss.wsf.tools.ProviderFactoryImpl";
-   
-   protected WSContractProvider() 
+
+   protected WSContractProvider()
    {
-      
+
    }
-   
+
    /**
     * Obtain a new instance of a WSContractProvider. This will use the current
     * thread's context class loader to locate the WSContractProviderFactory
@@ -50,7 +48,7 @@
    {
       return newInstance(Thread.currentThread().getContextClassLoader());
    }
-   
+
    /**
     * Obtain a new instance of a WSContractProvider. The specified ClassLoader will be used to
     * locate the WSContractProviderFactory implementation
@@ -60,40 +58,40 @@
     */
    public static WSContractProvider newInstance(ClassLoader loader)
    {
-      ClassLoader  oldLoader = Thread.currentThread().getContextClassLoader();
+      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
       try
       {
          Thread.currentThread().setContextClassLoader(loader);
-         WSContractProviderFactory factory = (WSContractProviderFactory)
-               FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+         WSContractProviderFactory factory = (WSContractProviderFactory)ServiceLoader.loadService(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
          return factory.createProvider(loader);
       }
-      finally{
+      finally
+      {
          Thread.currentThread().setContextClassLoader(oldLoader);
       }
    }
-   
+
    /**
     * Enables/Disables WSDL generation.
     * 
     * @param generateWsdl whether or not to generate WSDL
     */
    public abstract void setGenerateWsdl(boolean generateWsdl);
-   
+
    /**
     * Enables/Disables Java source generation.
     * 
     * @param generateSource whether or not to generate Java source.
     */
    public abstract void setGenerateSource(boolean generateSource);
-   
+
    /**
     * Sets the main output directory. If the directory does not exist, it will be created.
     * 
     * @param directory the root directory for generated files
     */
    public abstract void setOutputDirectory(File directory);
-   
+
    /**
     * Sets the resource directory. This directory will contain any generated
     * WSDL and XSD files. If the directory does not exist, it will be created.
@@ -102,7 +100,7 @@
     * @param directory the root directory for generated resource files
     */
    public abstract void setResourceDirectory(File directory);
-  
+
    /**
     * Sets the source directory. This directory will contain any generated Java source.
     * If the directory does not exist, it will be created. If not specified, 
@@ -111,7 +109,7 @@
     * @param directory the root directory for generated source code
     */
    public abstract void setSourceDirectory(File directory);
-   
+
    /**
     * Sets the ClassLoader used to discover types. This defaults to the one used
     * in instantiation.
@@ -119,7 +117,7 @@
     * @param loader the ClassLoader to use
     */
    public abstract void setClassLoader(ClassLoader loader);
-   
+
    /**
     * Generates artifacts using the current settings. This method may be invoked
     * more than once (e.g. multiple endpoints).
@@ -137,7 +135,7 @@
     * @throws RuntimeException if any error occurs during processing
     */
    public abstract void provide(Class<?> endpointClass);
-   
+
    /**
     * Sets the PrintStream to use for status feedback. The simplest example
     * would be to use System.out.

Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/.classpath	2007-06-14 09:23:52 UTC (rev 3576)
@@ -15,7 +15,7 @@
 	<classpathentry kind="lib" path="thirdparty/jboss-j2ee.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
-	<classpathentry kind="lib" path="thirdparty/jboss-remoting.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-remoting.jar" sourcepath="thirdparty/jboss-remoting-src.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jbosssx-client.jar"/>
 	<classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
 	<classpathentry kind="lib" path="thirdparty/mail.jar"/>

Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -77,6 +77,7 @@
     <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip" dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting-src.jar" dest="${thirdparty.dir}/jboss-remoting-src.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar" dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx.jar" dest="${thirdparty.dir}/jbosssx.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-src.zip" dest="${thirdparty.dir}/jbosssx-src.zip" usetimestamp="true" verbose="true"/>

Modified: trunk/jbossws-core/ant-import-tests/build-testsuite.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-testsuite.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/ant-import-tests/build-testsuite.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -60,9 +60,9 @@
 			<pathelement location="${core.dir}/thirdparty/wsdl4j.jar"/>
 			<pathelement location="${core.dir}/thirdparty/jboss-logging-log4j.jar"/>
 			<!--
-					<pathelement location="${core.dir}/thirdparty/log4j.jar"/>
-					<pathelement location="${tests.etc.dir}"/>
-					-->
+			<pathelement location="${core.dir}/thirdparty/log4j.jar"/>
+			<pathelement location="${tests.etc.dir}"/>
+		  -->
 		</path>
 
 	</target>

Modified: trunk/jbossws-core/build.xml
===================================================================
--- trunk/jbossws-core/build.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/build.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -172,26 +172,19 @@
 			</metainf>			
 		</jar>
 
-		<!-- Build jbossws-resources.zip -->
-		<zip zipfile="${core.output.lib.dir}/jbossws-resources.zip" >
-			<fileset dir="${core.resources.dir}/standard-config">
-				<include name="standard-*-config.xml"/>
-			</fileset>
+		<!-- Build jbossws-core-scripts.zip -->
+		<zip zipfile="${core.output.lib.dir}/jbossws-core-scripts.zip" >
 			<fileset dir="${core.output.etc.dir}">
-				<include name="wsprovide.bat"/>
-				<include name="wsconsume.bat"/>
 				<include name="wsrunclient.bat"/>
 				<include name="wstools.bat"/>
 			</fileset>
 			<zipfileset dir="${core.output.etc.dir}" filemode="755">
-				<include name="wsprovide.sh"/>
-				<include name="wsconsume.sh"/>
 				<include name="wsrunclient.sh"/>
 				<include name="wstools.sh"/>
 			</zipfileset>
 		</zip>
 
-		<!-- Build jbossws-src.zip -->
+		<!-- Build jbossws-core-src.zip -->
 		<zip zipfile="${core.output.lib.dir}/jbossws-core-src.zip" >
 			<fileset dir="${core.java.dir}"/>
 		</zip>

Modified: trunk/jbossws-core/src/main/etc/component-info.xml
===================================================================
--- trunk/jbossws-core/src/main/etc/component-info.xml	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/etc/component-info.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -31,12 +31,18 @@
     <import componentref="jboss/jbossws-spi">
       <compatible version="@repository.id@"/>
     </import>
+    <import componentref="jboss/remoting">
+      <compatible version="@jboss-remoting@"/>
+    </import>
     <import componentref="stax-api">
       <compatible version="@stax-api@"/>
     </import>
     <import componentref="sun-jaxb">
       <compatible version="@sun-jaxb@"/>
     </import>
+    <import componentref="sun-jaxws">
+      <compatible version="@sun-jaxws@"/>
+    </import>
     
     <export>
       <include input="jbossws-core.jar"/>

Deleted: trunk/jbossws-core/src/main/etc/wspublish.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wspublish.sh	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/etc/wspublish.sh	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-# $Id: wspublish.sh 2157 2007-01-27 06:03:58Z jason.greene at jboss.com $
-
-DIRNAME=`dirname $0`
-PROGNAME=`basename $0`
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-    [ -n "$TOMCAT_HOME" ] &&
-        TOMCAT_HOME=`cygpath --unix "$TOMCAT_HOME"`
-    [ -n "$JAVA_HOME" ] &&
-        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-export TOMCAT_HOME
-
-# Setup the JVM
-if [ "x$JAVA" = "x" ]; then
-    if [ "x$JAVA_HOME" != "x" ]; then
-	JAVA="$JAVA_HOME/bin/java"
-    else
-	JAVA="java"
-    fi
-fi
-
-#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
-
-# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS"
-
-# Setup the WSPUBLISH classpath
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/jbossws-thirdparty.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/jbossws-core.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/log4j.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/servlet-api.jar"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-    TOMCAT_HOME=`cygpath --path --windows "$TOMCAT_HOME"`
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
-    WSPUBLISH_CLASSPATH=`cygpath --path --windows "$WSPUBLISH_CLASSPATH"`
-fi
-
-# Display our environment
-echo "========================================================================="
-echo ""
-echo "  WSPUBLISH Environment"
-echo ""
-echo "  TOMCAT_HOME: $TOMCAT_HOME"
-echo ""
-echo "  JAVA: $JAVA"
-echo ""
-echo "  JAVA_OPTS: $JAVA_OPTS"
-echo ""
-#echo "  CLASSPATH: $WSPUBLISH_CLASSPATH"
-#echo ""
-echo "========================================================================="
-echo ""
-
-# Execute the JVM
-"$JAVA" $JAVA_OPTS \
-   -classpath "$WSPUBLISH_CLASSPATH" \
-   org.jboss.ws.tools.wspublish -dest $TOMCAT_HOME/webapps "$@"
-

Modified: trunk/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -25,11 +25,10 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Properties;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
-import org.jboss.logging.Logger;
-
 /** The javax.xml.rpc.ServiceFactory is an abstract class that provides a
  * factory for the creation of instances of the type javax.xml.rpc.Service.
  * This abstract class follows the abstract static factory design pattern.
@@ -46,7 +45,7 @@
 public abstract class ServiceFactory
 {
    // provide logging
-   private static Logger log = Logger.getLogger(ServiceFactory.class);
+   private static Logger log = Logger.getLogger(ServiceFactory.class.getName());
 
    // The singlton
    private static ServiceFactory factory;
@@ -101,7 +100,7 @@
                   }
                   catch (ClassNotFoundException e1)
                   {
-                     if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
+                     log.severe("Cannot load factory: " + factoryName);
                   }
                }
             }

Modified: trunk/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,12 +23,12 @@
 
 // $Id$
 
+import java.util.logging.Logger;
+
 import javax.xml.namespace.QName;
 import javax.xml.soap.Detail;
 import javax.xml.soap.Name;
 
-import org.jboss.logging.Logger;
-
 /** The SOAPFaultException exception represents a SOAP fault.
  * 
  * The message part in the SOAP fault maps to the contents of faultdetail
@@ -49,7 +49,7 @@
 public class SOAPFaultException extends RuntimeException
 {
    // provide logging
-   private static Logger log = Logger.getLogger(SOAPFaultException.class);
+   private static Logger log = Logger.getLogger(SOAPFaultException.class.getName());
 
    private QName faultCode;
    private String faultString;
@@ -61,7 +61,7 @@
       super(faultString);
 
       Name detailName = faultDetail != null ? faultDetail.getElementName() : null;
-      if(log.isDebugEnabled()) log.debug("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
+      log.fine("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
 
       this.faultCode = faultCode;
       this.faultString = faultString;

Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -24,8 +24,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.jboss.ws.integration.FactoryLoader;
-
 /**
  A factory for creating SOAPMessage objects.
  
@@ -72,7 +70,7 @@
       try
       {
          String propertyName = "javax.xml.soap.MessageFactory";
-         factory = (MessageFactory)FactoryLoader.loadFactory(propertyName, null);
+         factory = (MessageFactory)SAAJFactoryLoader.loadFactory(propertyName, null);
       }
       catch (RuntimeException rte)
       {

Copied: trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java (from rev 3509, branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java)
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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 javax.xml.soap;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+
+// $Id$
+
+/**
+ * Load a factory using this ordered lookup procedure
+ *
+ * <ol>
+ *  <li>Use the system property
+ *  <li>Use the properties file "lib/jaxm.properties" in the JRE directory
+ *  <li>Use the Services API (as detailed in the JAR specification), if available, to determine the classname
+ *  <li>Use the default factory implementation class
+ * </ol>
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 14-Dec-2006
+ */
+public class SAAJFactoryLoader
+{
+   private SAAJFactoryLoader()
+   {
+   }
+
+   /**   
+    *  
+    *  @return the factory impl, or null 
+    */
+   public static Object loadFactory(String propertyName, String defaultFactory) 
+   {
+      Object factory = null;
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+      // Use the system property
+      PrivilegedAction action = new PropertyAccessAction(propertyName);
+      String factoryName = (String)AccessController.doPrivileged(action);
+      if (factoryName != null)
+      {
+         try
+         {
+            //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+            Class factoryClass = loader.loadClass(factoryName);
+            factory = factoryClass.newInstance();
+         }
+         catch (Throwable t)
+         {
+            throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+         }
+      }
+
+      // Use the properties file "lib/jaxm.properties" in the JRE directory.
+      // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+      if (factory == null)
+      {
+         action = new PropertyAccessAction("java.home");
+         String javaHome = (String)AccessController.doPrivileged(action);
+         File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
+         if (jaxmFile.exists())
+         {
+            try
+            {
+               action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+               Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+               factoryName = jaxmProperties.getProperty(propertyName);
+               if (factoryName != null)
+               {
+                  //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+                  Class factoryClass = loader.loadClass(factoryName);
+                  factory = factoryClass.newInstance();
+               }
+            }
+            catch (Throwable t)
+            {
+               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+            }
+         }
+      }
+
+      // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+      if (factory == null)
+      {
+         String filename = "META-INF/services/" + propertyName;
+         InputStream inStream = loader.getResourceAsStream(filename);
+         if (inStream != null)
+         {
+            try
+            {
+               BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+               factoryName = br.readLine();
+               br.close();
+               if (factoryName != null)
+               {
+                  //if(log.isTraceEnabled()) log.trace("Load from Service API " + filename + ": " + factoryName);
+                  Class factoryClass = loader.loadClass(factoryName);
+                  factory = factoryClass.newInstance();
+               }
+            }
+            catch (Throwable t)
+            {
+               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+            }
+         }
+      }
+
+      // Use the default factory implementation class.
+      if (factory == null && defaultFactory != null)
+      {
+         try
+         {
+            factoryName = defaultFactory;
+            //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+            Class factoryClass = loader.loadClass(factoryName);
+            factory = factoryClass.newInstance();
+         }
+         catch (Throwable t)
+         {
+            throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+         }
+      }
+
+      return factory;
+   }
+
+   private static class PropertyAccessAction implements PrivilegedAction
+   {
+      private String name;
+
+      PropertyAccessAction(String name)
+      {
+         this.name = name;
+      }
+
+      public Object run()
+      {
+         return System.getProperty(name);
+      }
+   }
+
+   private static class PropertyFileAccessAction implements PrivilegedAction
+   {
+      private String filename;
+
+      PropertyFileAccessAction(String filename)
+      {
+         this.filename = filename;
+      }
+
+      public Object run()
+      {
+         try
+         {
+            InputStream inStream = new FileInputStream(filename);
+            Properties props = new Properties();
+            props.load(inStream);
+            return props;
+         }
+         catch (IOException ex)
+         {
+            throw new SecurityException("Cannot load properties: " + filename, ex);
+         }
+      }
+   }
+}

Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -21,9 +21,6 @@
  */
 package javax.xml.soap;
 
-import org.jboss.ws.integration.FactoryLoader;
-
-
 // $Id$
 
 /**
@@ -60,7 +57,7 @@
    {
       String propertyName = "javax.xml.soap.MetaFactory";
       String defaultImpl = "org.jboss.ws.core.soap.SAAJMetaFactoryImpl";
-      SAAJMetaFactory factory = (SAAJMetaFactory)FactoryLoader.loadFactory(propertyName, defaultImpl);
+      SAAJMetaFactory factory = (SAAJMetaFactory)SAAJFactoryLoader.loadFactory(propertyName, defaultImpl);
       
       if (factory == null)
          throw new SOAPException("Failed to to determine the implementation class for: " + propertyName);

Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,9 +23,8 @@
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.logging.Logger;
 
-import org.jboss.logging.Logger;
-
 /** A factory for creating SOAPConnection objects. Implementation of this class
  * is optional. If SOAPConnectionFactory.newInstance() throws an
  * UnsupportedOperationException then the implementation does not support the
@@ -40,7 +39,7 @@
 public abstract class SOAPConnectionFactory
 {
    // provide logging
-   private static Logger log = Logger.getLogger(SOAPConnectionFactory.class);
+   private static Logger log = Logger.getLogger(SOAPConnectionFactory.class.getName());
 
    private static final String DEFAULT_SOAP_CONNECTION_FACTORY = "org.jboss.ws.core.soap.SOAPConnectionFactoryImpl";
    private static final String[] alternativeFactories = new String[] { "org.jboss.webservice.soap.SOAPConnectionFactoryImpl",
@@ -81,7 +80,7 @@
                }
                catch (ClassNotFoundException e1)
                {
-                  if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
+                  log.severe("Cannot load factory: " + factoryName);
                }
             }
          }

Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -25,7 +25,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.jboss.ws.integration.FactoryLoader;
 import org.w3c.dom.Element;
 
 /** SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
@@ -62,7 +61,7 @@
          try
          {
             String propertyName = "javax.xml.soap.SOAPFactory";
-            soapFactory = (SOAPFactory)FactoryLoader.loadFactory(propertyName, null);
+            soapFactory = (SOAPFactory)SAAJFactoryLoader.loadFactory(propertyName, null);
          }
          catch (RuntimeException rte)
          {

Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -718,23 +718,7 @@
     **/
    public static Service create(URL wsdlLocation, QName serviceName)
    {
-      Service service;
-      try
-      {
-         Class extClass = Class.forName("org.jboss.ws.core.jaxws.client.ServiceExt");
-         Constructor ctor = extClass.getConstructor(new Class[] { URL.class, QName.class });
-         service = (Service)ctor.newInstance(new Object[] { wsdlLocation, serviceName });
-      }
-      catch (InvocationTargetException ex)
-      {
-         Throwable target = ex.getTargetException();
-         throw new WebServiceException(target);
-      }
-      catch (Exception e)
-      {
-         service = new Service(wsdlLocation, serviceName);
-      }
-      return service;
+      return new Service(wsdlLocation, serviceName);
    }
 
    /**

Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -28,15 +28,14 @@
 
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
-import org.jboss.logging.Logger;
-
 public abstract class AddressingBuilder implements AddressingType
 {
    // provide logging
-   private static Logger log = Logger.getLogger(AddressingBuilder.class);
+   private static Logger log = Logger.getLogger(AddressingBuilder.class.getName());
 
    protected AddressingBuilder()
    {
@@ -67,7 +66,7 @@
       }
       catch (Exception e)
       {
-         log.warn("Could not create and instance of " + name + " trying " + DEFAULT_ADDRESSING_BUILDER);
+         log.warning("Could not create and instance of " + name + " trying " + DEFAULT_ADDRESSING_BUILDER);
       }
 
       // default builder

Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -33,7 +33,6 @@
 import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
-import org.jboss.ws.integration.FactoryLoader;
 import org.w3c.dom.Element;
 
 /**
@@ -88,7 +87,7 @@
    {
       try
       {
-         return (Provider)FactoryLoader.loadFactory(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
+         return (Provider)ProviderLoader.loadProvider(DEFAULT_JAXWSPROVIDER);
       }
       catch (WebServiceException ex)
       {

Copied: trunk/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java (from rev 3509, branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java)
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,205 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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 javax.xml.ws.spi;
+
+// $Id$
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+/**
+ * Load the provider using the following algorithm.
+ * 
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+ * 
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the 
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key is 
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+ * 
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+ * as the name of the implementation class.
+ * 
+ * 4. Finally, a default implementation class name is used.
+ *  
+ * @author Thomas.Diesler at jboss.com
+ * @since 03-May-2006
+ */
+public abstract class ProviderLoader
+{
+   /**
+    * This method uses the algirithm described above. 
+    * 
+    * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+    * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+    * 
+    * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the 
+    * java.util.Properties.load(InputStream) method and it contains an entry whose key is 
+    * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+    * 
+    * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+    * as the name of the implementation class.
+    * 
+    * 4. Finally, a default implementation class name is used.
+    */
+   public static Provider loadProvider(String defaultFactory)
+   {
+      Object factory = null;
+      String factoryName = null;
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+      // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+      String propertyName = Provider.JAXWSPROVIDER_PROPERTY;
+      String filename = "META-INF/services/" + propertyName;
+      InputStream inStream = loader.getResourceAsStream(filename);
+      if (inStream != null)
+      {
+         try
+         {
+            BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+            factoryName = br.readLine();
+            br.close();
+            if (factoryName != null)
+            {
+               Class factoryClass = loader.loadClass(factoryName);
+               factory = factoryClass.newInstance();
+            }
+         }
+         catch (Throwable t)
+         {
+            throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+         }
+      }
+
+      // Use the properties file "lib/jaxws.properties" in the JRE directory.
+      // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+      if (factory == null)
+      {
+         PrivilegedAction action = new PropertyAccessAction("java.home");
+         String javaHome = (String)AccessController.doPrivileged(action);
+         File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+         if (jaxmFile.exists())
+         {
+            try
+            {
+               action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+               Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+               factoryName = jaxmProperties.getProperty(propertyName);
+               if (factoryName != null)
+               {
+                  //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+                  Class factoryClass = loader.loadClass(factoryName);
+                  factory = factoryClass.newInstance();
+               }
+            }
+            catch (Throwable t)
+            {
+               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+            }
+         }
+      }
+
+      // Use system property
+      if (factory == null)
+      {
+         PrivilegedAction action = new PropertyAccessAction(propertyName);
+         factoryName = (String)AccessController.doPrivileged(action);
+         if (factoryName != null)
+         {
+            try
+            {
+               //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+               Class factoryClass = loader.loadClass(factoryName);
+               factory = factoryClass.newInstance();
+            }
+            catch (Throwable t)
+            {
+               throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+            }
+         }
+      }
+      
+      // Use the default factory implementation class.
+      if (factory == null && defaultFactory != null)
+      {
+         try
+         {
+            //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+            Class factoryClass = loader.loadClass(defaultFactory);
+            factory = factoryClass.newInstance();
+         }
+         catch (Throwable t)
+         {
+            throw new IllegalStateException("Failed to load: " + defaultFactory, t);
+         }
+      }
+
+      return (Provider)factory;
+   }
+
+   private static class PropertyAccessAction implements PrivilegedAction
+   {
+      private String name;
+
+      PropertyAccessAction(String name)
+      {
+         this.name = name;
+      }
+
+      public Object run()
+      {
+         return System.getProperty(name);
+      }
+   }
+
+   private static class PropertyFileAccessAction implements PrivilegedAction
+   {
+      private String filename;
+
+      PropertyFileAccessAction(String filename)
+      {
+         this.filename = filename;
+      }
+
+      public Object run()
+      {
+         try
+         {
+            InputStream inStream = new FileInputStream(filename);
+            Properties props = new Properties();
+            props.load(inStream);
+            return props;
+         }
+         catch (IOException ex)
+         {
+            throw new SecurityException("Cannot load properties: " + filename, ex);
+         }
+      }
+   }
+}

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,6 +23,7 @@
 
 // $Id:CommonClient.java 660 2006-08-01 16:29:43Z thomas.diesler at jboss.com $
 
+import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -54,6 +55,7 @@
 import org.jboss.ws.core.utils.HolderUtils;
 import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
 import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
 import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
 import org.jboss.ws.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -61,6 +63,8 @@
 import org.jboss.ws.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.metadata.umdm.UnifiedMetaData;
 import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
 
 /**
@@ -88,6 +92,8 @@
    private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName, UnboundHeader>();
    // A List<AttachmentPart> of attachment parts set through the proxy
    private List<AttachmentPart> attachmentParts = new ArrayList<AttachmentPart>();
+   // The WS-Security config
+   private String securityConfig;
 
    /** Create a call that needs to be configured manually
     */
@@ -639,4 +645,34 @@
       EndpointMetaData epMetaData = getEndpointMetaData();
       return epMetaData.getConfigFile();
    }
+   
+   public String getSecurityConfig()
+   {
+      return securityConfig;
+   }
+
+   public void setSecurityConfig(String securityConfig)
+   {
+      this.securityConfig = securityConfig;
+      
+      if (securityConfig != null)
+      {
+         EndpointMetaData epMetaData = getEndpointMetaData();
+         ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+         if (serviceMetaData.getSecurityConfiguration() == null)
+         {
+            try
+            {
+               WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
+               UnifiedVirtualFile vfsRoot = serviceMetaData.getUnifiedMetaData().getRootFile();
+               WSSecurityConfiguration config = wsseConfFactory.createConfiguration(vfsRoot, securityConfig);
+               serviceMetaData.setSecurityConfiguration(config);
+            }
+            catch (IOException ex)
+            {
+               WSException.rethrow("Cannot set security config", ex);
+            }
+         }
+      }
+   }
 }

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -126,4 +126,14 @@
     * Creates a new empty AttachmentPart object.
     */
    AttachmentPart createAttachmentPart();
+
+   /** 
+    * Get the WS-Security configuration  
+    */
+   String getSecurityConfig();
+
+   /** 
+    * Set the WS-Security configuration  
+    */
+   void setSecurityConfig(String securityConfig);
 }

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,29 +23,34 @@
 
 // $Id$
 
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.xml.rpc.Stub;
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.EndpointReference;
+
 import org.jboss.logging.Logger;
 import org.jboss.remoting.Client;
 import org.jboss.remoting.InvokerLocator;
 import org.jboss.remoting.marshal.MarshalFactory;
 import org.jboss.remoting.marshal.Marshaller;
 import org.jboss.remoting.marshal.UnMarshaller;
-import org.jboss.ws.core.*;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.MessageTrace;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.WSTimeoutException;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.metadata.config.EndpointProperty;
 
-import javax.xml.rpc.Stub;
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.EndpointReference;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.SocketTimeoutException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
 /**
  * SOAPConnection implementation.
  * <p/>
@@ -100,10 +105,6 @@
       // HTTPClientInvoker conect sends gratuitous POST
       // http://jira.jboss.com/jira/browse/JBWS-711
       clientConfig.put(Client.ENABLE_LEASE, false);
-
-      // Enable chunked encoding
-      // This is the default size. May be overridden through endpoint config
-      clientConfig.put("chunkedLength", "1024");
    }
 
    public boolean isClosed()
@@ -156,9 +157,6 @@
          targetAddress = endpoint.toString();
       }
 
-      // remoting props may come from client config as well
-      mergeConfigContribution();
-
       // setup remoting client            
       Map<String, Object> metadata = createRemotingMetaData(reqMessage, callProps);
       Client client = createRemotingClient(endpoint, targetAddress, oneway);
@@ -167,7 +165,7 @@
       {
          if (log.isDebugEnabled())
             log.debug("Remoting metadata: " + metadata);
-         
+
          // debug the outgoing message
          MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
 
@@ -195,9 +193,9 @@
       }
       catch (Throwable th)
       {
-         if(timeout!=null && (th.getCause() instanceof SocketTimeoutException))
+         if (timeout != null && (th.getCause() instanceof SocketTimeoutException))
          {
-            throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));            
+            throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));
          }
 
          IOException io = new IOException("Could not transmit message");
@@ -206,25 +204,6 @@
       }
    }
 
-   private void mergeConfigContribution()
-   {
-      // check for config property contribution
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if(msgContext!=null)
-      {
-         Properties epmdProps = msgContext.getEndpointMetaData().getProperties();
-
-         // chunksize settings
-         String chunkSizeValue = epmdProps.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
-         int chunkSize = chunkSizeValue!=null ? Integer.valueOf(chunkSizeValue) : -1;
-         if(chunkSize>0)
-            clientConfig.put(EndpointProperty.CHUNKED_ENCODING_SIZE, chunkSizeValue);
-         else
-            clientConfig.remove("chunkedLength");
-
-      }
-   }
-
    private String addURLParameter(String url, String key, String value)
    {
       int qmIndex = url.indexOf("?");
@@ -278,6 +257,7 @@
 
    private Map<String, Object> createRemotingMetaData(MessageAbstraction reqMessage, Map callProps)
    {
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
 
       Map<String, Object> metadata = new HashMap<String, Object>();
 
@@ -288,6 +268,27 @@
       if (reqMessage != null)
       {
          populateHeaders(reqMessage, metadata);
+
+         // Enable chunked encoding. This is the default size. 
+         clientConfig.put("chunkedLength", "1024");
+         
+         // May be overridden through endpoint config
+         if (msgContext != null)
+         {
+            Properties epmdProps = msgContext.getEndpointMetaData().getProperties();
+
+            // chunksize settings
+            String chunkSizeValue = epmdProps.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
+            int chunkSize = chunkSizeValue != null ? Integer.valueOf(chunkSizeValue) : -1;
+            if (chunkSize > 0)
+            {
+               clientConfig.put(EndpointProperty.CHUNKED_ENCODING_SIZE, chunkSizeValue);
+            }
+            else
+            {
+               clientConfig.remove("chunkedLength");
+            }
+         }
       }
       else
       {
@@ -345,7 +346,7 @@
    protected void populateHeaders(MessageAbstraction reqMessage, Map<String, Object> metadata)
    {
       MimeHeaders mimeHeaders = reqMessage.getMimeHeaders();
-      
+
       Properties props = new Properties();
       metadata.put("HEADER", props);
 

Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,178 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceFeature;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.ConfigProvider;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-
-/**
- * Extends the standard JAXWS Service 
- *
- * @author Thomas.Diesler at jboss.com
- * @since 18-Jan-2007
- */
-public class ServiceExt extends Service implements ConfigProvider
-{
-   // The config name for all created ports 
-   private String configName;
-   // The config file for all created ports 
-   private String configFile;
-   // The WS-Security config
-   private String securityConfig;
-
-   public ServiceExt(URL wsdlDocumentLocation, QName serviceName)
-   {
-      super(wsdlDocumentLocation, serviceName);
-   }
-
-   /** 
-    * Get the port configuration file for newly created ports 
-    */
-   public String getConfigFile()
-   {
-      return configFile;
-   }
-
-   /** 
-    * Get the port configuration name for newly created ports 
-    */
-   public String getConfigName()
-   {
-      return configName;
-   }
-
-   /** 
-    * Set the port configuration name for newly created ports 
-    */
-   public void setConfigName(String configName)
-   {
-      this.configName = configName;
-   }
-
-   /** 
-    * Set the port configuration name for newly created ports 
-    */
-   public void setConfigName(String configName, String configFile)
-   {
-      this.configName = configName;
-      this.configFile = configFile;
-   }
-
-   /** 
-    * Get the WS-Security configuration  
-    */
-   public String getSecurityConfig()
-   {
-      return securityConfig;
-   }
-
-   /** 
-    * Set the WS-Security configuration  
-    */
-   public void setSecurityConfig(String securityConfig)
-   {
-      this.securityConfig = securityConfig;
-   }
-
-   @Override
-   public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
-   {
-      T port = super.getPort(serviceEndpointInterface, features);
-      configurePort(port);
-      return port;
-   }
-
-   @Override
-   public <T> T getPort(Class<T> serviceEndpointInterface)
-   {
-      T port = super.getPort(serviceEndpointInterface);
-      configurePort(port);
-      return port;
-   }
-
-   @Override
-   public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
-   {
-      T port = super.getPort(endpointReference, serviceEndpointInterface, features);
-      configurePort(port);
-      return port;
-   }
-
-   @Override
-   public <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
-   {
-      T port = super.getPort(portName, serviceEndpointInterface, features);
-      configurePort(port);
-      return port;
-   }
-
-   @Override
-   public <T> T getPort(QName portName, Class<T> serviceEndpointInterface)
-   {
-      T port = super.getPort(portName, serviceEndpointInterface);
-      configurePort(port);
-      return port;
-   }
-
-   private void configurePort(Object port)
-   {
-      ConfigProvider cp = (ConfigProvider)port;
-      if (configName != null || configFile != null)
-         cp.setConfigName(configName, configFile);
-
-      if (securityConfig != null)
-      {
-         EndpointMetaData epMetaData = ((StubExt)port).getEndpointMetaData();
-         ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
-         if (serviceMetaData.getSecurityConfiguration() == null)
-         {
-            try
-            {
-               WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
-               UnifiedVirtualFile vfsRoot = serviceMetaData.getUnifiedMetaData().getRootFile();
-               WSSecurityConfiguration config = wsseConfFactory.createConfiguration(vfsRoot, securityConfig);
-               serviceMetaData.setSecurityConfiguration(config);
-            }
-            catch (IOException ex)
-            {
-               WSException.rethrow("Cannot set security config", ex);
-            }
-         }
-      }
-   }
-}

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -109,7 +109,7 @@
 
       String targetClassName = (targetClass != null ? targetClass.getName() : null);
       String externalName = encCtx.getNameInNamespace() + "/" + encName;
-      log.info("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
+      log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
 
       String serviceImplClass = null;
 

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -40,13 +40,14 @@
 import org.jboss.ws.core.HTTPMessageImpl;
 import org.jboss.ws.core.MessageAbstraction;
 import org.jboss.ws.core.soap.EnvelopeBuilder;
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.SOAPBodyImpl;
 import org.jboss.ws.core.soap.SOAPContentElement;
 import org.jboss.ws.core.soap.Style;
 import org.jboss.ws.core.soap.XMLFragment;
-import org.jboss.ws.integration.FactoryLoader;
 import org.jboss.wsf.spi.utils.DOMUtils;
+import org.jboss.wsf.spi.utils.ServiceLoader;
 import org.w3c.dom.Element;
 
 /**
@@ -111,7 +112,7 @@
                try
                {
                   soapBody.removeContents();
-                  EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+                  EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
                   envBuilder.setStyle(style);
                   Element domBodyElement = DOMUtils.sourceToElement(source);
                   envBuilder.buildBodyElementRpc(soapBody, domBodyElement);

Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleContextRootDeployer.java (from rev 3528, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleContextRootDeployer.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleContextRootDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleContextRootDeployer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.ws.core.server;
+
+//$Id$
+
+import java.util.StringTokenizer;
+
+import org.jboss.wsf.spi.deployment.ContextRootDeployer;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+
+/**
+ * A deployer that assigns the context root to the service.
+ * 
+ * If there is no explicit <context-root>, this deployer uses 
+ * the first token from the <port-component-uri> element.  
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class BackwardCompatibleContextRootDeployer extends ContextRootDeployer
+{
+   @Override
+   protected String getExplicitContextRoot(Deployment dep)
+   {
+      String contextRoot = super.getExplicitContextRoot(dep);
+      if (contextRoot == null)
+      {
+         for (Endpoint ep : dep.getService().getEndpoints())
+         {
+            String urlPattern = getUrlPattern(dep, ep);
+            if (urlPattern != null)
+            {
+               StringTokenizer st = new StringTokenizer(urlPattern, "/");
+               if (st.countTokens() > 1)
+               {
+                  String firstToken = st.nextToken();
+                  if (contextRoot != null && contextRoot.equals(firstToken) == false)
+                     throw new IllegalStateException("All endpoints must share the same <context-root>: " + contextRoot + "!=" +  firstToken);
+
+                  contextRoot = firstToken;
+               }
+            }
+         }
+      }
+      return contextRoot;
+   }
+
+   private String getUrlPattern(Deployment dep, Endpoint ep)
+   {
+      String urlPattern = null;
+
+      UnifiedApplicationMetaData appMetaData = dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+      if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null)
+      {
+         UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+         UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
+         if (pcmd != null)
+         {
+            urlPattern = pcmd.getPortComponentURI();
+         }
+      }
+
+      return urlPattern;
+   }
+}
\ No newline at end of file

Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleURLPatternDeployer.java (from rev 3528, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleURLPatternDeployer.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleURLPatternDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/BackwardCompatibleURLPatternDeployer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.ws.core.server;
+
+//$Id$
+
+import java.util.StringTokenizer;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.URLPatternDeployer;
+
+/**
+ * A deployer that assigns the URLPattern to endpoints. 
+ *
+ * This deployer uses the first token from the <port-component-uri>
+ * as the context root.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 19-May-2007
+ */
+public class BackwardCompatibleURLPatternDeployer extends URLPatternDeployer
+{
+
+   @Override
+   protected String getExplicitPattern(Deployment dep, Endpoint ep)
+   {
+      String contextRoot = dep.getService().getContextRoot();
+      if (contextRoot == null)
+         throw new IllegalStateException("Cannot obtain context root");
+
+      String urlPattern = super.getExplicitPattern(dep, ep);
+      if (urlPattern != null)
+      {
+         if (urlPattern.startsWith("/") == false)
+            urlPattern = "/" + urlPattern;
+
+         StringTokenizer st = new StringTokenizer(urlPattern, "/");
+         if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot))
+         {
+            urlPattern = urlPattern.substring(contextRoot.length());
+         }
+      }
+      return urlPattern;
+   }
+}
\ No newline at end of file

Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java (from rev 3528, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java	                        (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.ws.core.server;
+
+// $Id$
+
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.wsf.spi.invocation.BasicEndpointInvocation;
+
+/** An invocation that delegates to the jbossws-core EndpointInvocation
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class DelegatingInvocation extends BasicEndpointInvocation
+{
+   private EndpointInvocation getEndpointInvocation()
+   {
+      EndpointInvocation epInv = getInvocationContext().getAttachment(EndpointInvocation.class);
+      if (epInv == null)
+         throw new IllegalStateException("Cannot obtain endpoint invocation");
+      
+      return epInv;
+   }
+   
+   @Override
+   public void setReturnValue(Object value)
+   {
+      EndpointInvocation epInv = getEndpointInvocation();
+      epInv.setReturnValue(value);
+
+      SOAPMessageContext msgContext = (SOAPMessageContext)getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
+      if (msgContext != null && msgContext.getMessage() == null)
+      {
+         try
+         {
+            // Bind the response message
+            OperationMetaData opMetaData = epInv.getOperationMetaData();
+            CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
+            CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
+            SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
+            msgContext.setMessage(resMessage);
+         }
+         catch (BindingException ex)
+         {
+            WSException.rethrow(ex);
+         }
+      }
+   }
+
+   @Override
+   public Object[] getArgs()
+   {
+      EndpointInvocation epInv = getEndpointInvocation();
+      return epInv.getRequestPayload();
+   }
+
+   @Override
+   public Object getReturnValue()
+   {
+      EndpointInvocation epInv = getEndpointInvocation();
+      return epInv.getReturnValue();
+   }
+
+   @Override
+   public void setArgs(Object[] args)
+   {
+      throw new IllegalArgumentException("Cannot set args on this invocation");
+   }
+}

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -28,7 +28,7 @@
 
 import javax.xml.ws.Endpoint;
 
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
 
 /**
  * An abstract HTTP Server
@@ -53,7 +53,7 @@
     */
    public static HttpServer create()
    {
-      HttpServer server = (HttpServer)FactoryLoader.loadFactory(HTTP_SERVER_PROPERTY, null);
+      HttpServer server = (HttpServer)ServiceLoader.loadService(HTTP_SERVER_PROPERTY, null);
       return server;
    }
    

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -25,36 +25,30 @@
 
 import java.lang.reflect.Method;
 import java.util.HashMap;
-import java.util.Iterator;
 
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
 import javax.xml.rpc.server.ServiceLifecycle;
 import javax.xml.rpc.server.ServletEndpointContext;
 import javax.xml.rpc.soap.SOAPFaultException;
 import javax.xml.soap.Name;
-import javax.xml.soap.SOAPBody;
 import javax.xml.soap.SOAPBodyElement;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.http.HTTPBinding;
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
 import org.jboss.ws.core.CommonBinding;
 import org.jboss.ws.core.CommonBindingProvider;
 import org.jboss.ws.core.CommonMessageContext;
 import org.jboss.ws.core.CommonSOAPBinding;
 import org.jboss.ws.core.DirectionHolder;
-import org.jboss.ws.core.MessageAbstraction;
 import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.MessageAbstraction;
 import org.jboss.ws.core.DirectionHolder.Direction;
 import org.jboss.ws.core.jaxrpc.ServletEndpointContextImpl;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
 import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
 import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
 import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
@@ -70,7 +64,6 @@
 import org.jboss.ws.metadata.umdm.OperationMetaData;
 import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.BasicEndpointInvocation;
 import org.jboss.wsf.spi.invocation.Invocation;
 import org.jboss.wsf.spi.invocation.InvocationContext;
 import org.jboss.wsf.spi.invocation.InvocationHandler;
@@ -207,6 +200,9 @@
                Invocation inv = setupInvocation(endpoint, sepInv, invContext);
                InvocationHandler invHandler = endpoint.getInvocationHandler();
                invHandler.invoke(endpoint, null, inv);
+               
+               // Handler processing might have replaced the endpoint invocation
+               sepInv = inv.getInvocationContext().getAttachment(EndpointInvocation.class);
             }
             finally
             {
@@ -279,7 +275,7 @@
       }
    }
 
-   protected Invocation setupInvocation(Endpoint ep, EndpointInvocation sepInv, InvocationContext invContext) throws Exception
+   protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception
    {
       CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
       if (msgContext instanceof SOAPMessageContextJAXWS)
@@ -297,11 +293,13 @@
          invContext.addAttachment(ServletEndpointContext.class, servletEndpointContext);
       }
 
-      Invocation inv = new DelegatingInvocation(sepInv);
-      inv.setInvocationContext(invContext);
-      inv.setJavaMethod(getImplMethod(endpoint, sepInv));
+      invContext.addAttachment(EndpointInvocation.class, epInv);
+      
+      Invocation wsInv = new DelegatingInvocation();
+      wsInv.setInvocationContext(invContext);
+      wsInv.setJavaMethod(getImplMethod(endpoint, epInv));
 
-      return inv;
+      return wsInv;
    }
 
    protected Method getImplMethod(Endpoint endpoint, EndpointInvocation sepInv) throws ClassNotFoundException, NoSuchMethodException
@@ -397,7 +395,7 @@
          if (opMetaData == null)
          {
             String faultString;
-            
+
             SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
             SOAPBodyElement soapBodyElement = soapBody.getBodyElement();
             if (soapBodyElement != null)
@@ -426,56 +424,4 @@
       }
       return opMetaData;
    }
-
-   class DelegatingInvocation extends BasicEndpointInvocation
-   {
-      private EndpointInvocation sepInv;
-
-      public DelegatingInvocation(EndpointInvocation sepInv)
-      {
-         this.sepInv = sepInv;
-      }
-
-      @Override
-      public void setReturnValue(Object value)
-      {
-         sepInv.setReturnValue(value);
-
-         SOAPMessageContext msgContext = (SOAPMessageContext)getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
-         if (msgContext != null && msgContext.getMessage() == null)
-         {
-            try
-            {
-               // Bind the response message
-               OperationMetaData opMetaData = sepInv.getOperationMetaData();
-               CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
-               CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
-               SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, sepInv);
-               msgContext.setMessage(resMessage);
-            }
-            catch (BindingException ex)
-            {
-               WSException.rethrow(ex);
-            }
-         }
-      }
-
-      @Override
-      public Object[] getArgs()
-      {
-         return sepInv.getRequestPayload();
-      }
-
-      @Override
-      public Object getReturnValue()
-      {
-         return sepInv.getReturnValue();
-      }
-
-      @Override
-      public void setArgs(Object[] args)
-      {
-         throw new IllegalArgumentException("Cannot set args on this invocation");
-      }
-   }
 }

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,11 +23,19 @@
 
 // $Id$
 
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
 import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
 import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
 import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.HandlerCallback;
 import org.jboss.wsf.spi.invocation.InvocationContext;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
 
@@ -39,6 +47,9 @@
  */
 public class ServiceEndpointInvokerEJB21 extends ServiceEndpointInvoker
 {
+   // provide logging
+   private static final Logger log = Logger.getLogger(ServiceEndpointInvokerEJB21.class);
+   
    @Override
    protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception
    {
@@ -89,15 +100,42 @@
       }
 
       /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-      public boolean callRequestHandlerChain(HandlerType type)
+      public boolean callRequestHandlerChain(Invocation wsInv, HandlerType type)
       {
-         if (type == HandlerType.PRE)
-            return true;
-         else return delegate.callRequestHandlerChain(sepMetaData, type);
+         boolean handlerPass = true;
+         if (type == HandlerType.ENDPOINT)
+         {
+            handlerPass = delegate.callRequestHandlerChain(sepMetaData, type);
+         }
+         else if (type == HandlerType.POST)
+         {
+            handlerPass = delegate.callRequestHandlerChain(sepMetaData, type);
+            
+            // Verify that the the message has not been mofified
+            CommonMessageContext messageContext = MessageContextAssociation.peekMessageContext();
+            if(handlerPass && messageContext.isModified())
+            {
+               try
+               {
+                  OperationMetaData opMetaData = messageContext.getOperationMetaData();
+                  CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
+                  CommonBinding binding = bindingProvider.getCommonBinding();
+                  
+                  log.debug("Handler modified payload, unbind message and update invocation args");
+                  EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
+                  wsInv.getInvocationContext().addAttachment(EndpointInvocation.class, epInv);
+               }
+               catch (BindingException ex)
+               {
+                  throw new WSException(ex);
+               }
+            }
+         }
+         return handlerPass;
       }
 
       /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-      public boolean callResponseHandlerChain(HandlerType type)
+      public boolean callResponseHandlerChain(Invocation wsInv, HandlerType type)
       {
          if (type == HandlerType.PRE)
             return true;
@@ -105,7 +143,7 @@
       }
 
       /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
-      public boolean callFaultHandlerChain(HandlerType type, Exception ex)
+      public boolean callFaultHandlerChain(Invocation wsInv, HandlerType type, Exception ex)
       {
          if (type == HandlerType.PRE)
             return true;

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -45,7 +45,7 @@
 import org.jboss.ws.core.CommonMessageContext;
 import org.jboss.ws.core.soap.attachment.MimeConstants;
 import org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder;
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
 import org.jboss.wsf.spi.utils.IOUtils;
 
 /**
@@ -249,7 +249,7 @@
             soapMessage.setAttachments(attachments);
 
          // Get the SOAPEnvelope builder
-         EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+         EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
          envBuilder.setStyle(getStyle());
 
          // Build the payload

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/NodeImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/NodeImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -556,6 +556,17 @@
       {
          retNode = new TextImpl(node);
       }
+      else if (node instanceof org.w3c.dom.Element)
+      {
+         try
+         {
+            retNode = new SOAPFactoryImpl().createElement((Element)node);
+         }
+         catch (SOAPException ex)
+         {
+            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "CAnnot convert to SOAP element: " + node);
+         }
+      }
       else
       {
          throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Operation not supported on this type of node: " + node);

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -143,7 +143,7 @@
    }
 
    public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
-   {     
+   {
       elementName = new NameImpl(qname);
 
       Document owner = domNode.getOwnerDocument();
@@ -153,7 +153,6 @@
       return this.completeNamespaceDeclaration();
    }
 
-
    /**
     * Adds an attribute with the specified name and value to this SOAPElement object.
     *
@@ -325,8 +324,17 @@
    public SOAPElement addTextNode(String value) throws SOAPException
    {
       log.trace("addTextNode: " + value);
-      org.w3c.dom.Text domText = element.getOwnerDocument().createTextNode(value);
-      javax.xml.soap.Text soapText = new TextImpl(domText);
+      org.w3c.dom.Node domNode;
+      if (value.startsWith("<!--") && value.endsWith("-->"))
+      {
+         value = value.substring(4, value.length() - 3);
+         domNode = element.getOwnerDocument().createComment(value);
+      }
+      else
+      {
+         domNode = element.getOwnerDocument().createTextNode(value);
+      }
+      javax.xml.soap.Text soapText = new TextImpl(domNode);
       appendChild(soapText);
       return this;
    }

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -24,7 +24,6 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
 
 import org.jboss.logging.Logger;

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -42,7 +42,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.util.NotImplementedException;
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
 import org.w3c.dom.Attr;
 import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
@@ -172,7 +172,7 @@
          else
             throw new SOAPException("Unsupported DOMSource node: " + node);
 
-         EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+         EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
          envBuilder.setStyle(Style.DOCUMENT);
          envBuilder.build(soapMessage, domElement);
       }
@@ -181,7 +181,7 @@
          try
          {
             StreamSource streamSource = (StreamSource)source;
-            EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+            EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
             envBuilder.setStyle(Style.DOCUMENT);
             InputStream stream = streamSource.getInputStream();
             Reader reader = streamSource.getReader();
@@ -362,7 +362,7 @@
 
    public Document getOwnerDocument()
    {
-      throw new NotImplementedException();
+      return doc;
    }
 
    public org.w3c.dom.Node getParentNode()

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -134,7 +134,7 @@
       KeyStore keyStore = null; 
       try
       {
-         if(log.isDebugEnabled()) log.debug("loadStore: " + storeURL);
+         log.debug("loadStore: " + storeURL);
          InputStream stream = storeURL.openStream();
          if (stream == null)
             throw new WSSecurityException("Cannot load store from: " + storeURL);
@@ -203,17 +203,33 @@
 
    private String execPasswordCmd(String keyStorePasswordCmd) throws WSSecurityException
    {
-      if(log.isDebugEnabled()) log.debug("Executing cmd: " + keyStorePasswordCmd);
+      log.debug("Executing cmd: " + keyStorePasswordCmd);
       try
       {
+         String password = null;
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec(keyStorePasswordCmd);
-         InputStream stdin = p.getInputStream();
-         BufferedReader reader = new BufferedReader(new InputStreamReader(stdin));
-         String password = reader.readLine();
-         stdin.close();
-         int exitCode = p.waitFor();
-         if(log.isDebugEnabled()) log.debug("Command exited with: " + exitCode);
+         int status = p.waitFor();
+         if (status == 0)
+         {
+            InputStream stdin = p.getInputStream();
+            BufferedReader reader = new BufferedReader(new InputStreamReader(stdin));
+            password = reader.readLine();
+            stdin.close();
+         }
+         else
+         {
+            InputStream stderr = p.getErrorStream();
+            BufferedReader reader = new BufferedReader(new InputStreamReader(stderr));
+            String line = reader.readLine();
+            while (line != null)
+            {
+               log.error(line);
+               line = reader.readLine();
+            }
+            stderr.close();
+         }
+         log.debug("Command exited with: " + status);
          return password;
       }
       catch (Exception e)
@@ -233,7 +249,7 @@
          classname = keyStorePasswordCmd.substring(0, colon);
          ctorArg = keyStorePasswordCmd.substring(colon + 1);
       }
-      if(log.isDebugEnabled()) log.debug("Loading class: " + classname + ", ctorArg=" + ctorArg);
+      log.debug("Loading class: " + classname + ", ctorArg=" + ctorArg);
       try
       {
          ClassLoader loader = Thread.currentThread().getContextClassLoader();
@@ -252,16 +268,16 @@
          }
          try
          {
-            if(log.isDebugEnabled()) log.debug("Checking for toCharArray");
+            log.debug("Checking for toCharArray");
             Class[] sig = {};
             Method toCharArray = c.getMethod("toCharArray", sig);
             Object[] args = {};
-            if(log.isDebugEnabled()) log.debug("Invoking toCharArray");
+            log.debug("Invoking toCharArray");
             password = new String((char[])toCharArray.invoke(instance, args));
          }
          catch (NoSuchMethodException e)
          {
-            if(log.isDebugEnabled()) log.debug("No toCharArray found, invoking toString");
+            log.debug("No toCharArray found, invoking toString");
             password = instance.toString();
          }
       }
@@ -428,7 +444,7 @@
       }
       catch (Exception e)
       {
-         if(log.isDebugEnabled()) log.debug("Certificate is invalid", e);
+         log.debug("Certificate is invalid", e);
          throw new FailedAuthenticationException();
       }
 
@@ -477,7 +493,7 @@
       }
       catch (CertPathValidatorException cpve)
       {
-         if(log.isDebugEnabled()) log.debug("Certificate is invalid:", cpve);
+         log.debug("Certificate is invalid:", cpve);
          throw new FailedAuthenticationException();
       }
       catch (InvalidAlgorithmParameterException e)

Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,24 +1,24 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.ws.tools.jaxws.impl;
 
 import com.sun.tools.ws.wscompile.WsimportTool;
@@ -39,81 +39,94 @@
  */
 public class SunRIConsumerImpl extends WSContractConsumer
 {
-   private List<File> bindingFiles = null;
-   private File catalog = null;
-   private boolean generateSource = false;
+   private List<File> bindingFiles;
+   private File catalog;
+   private boolean generateSource;
    private File outputDir = new File("output");
-   private File sourceDir = null;
-   private String targetPackage = null;
-   private PrintStream messageStream = null;
-   private String wsdlLocation = null;
-   private List<String> additionalCompilerClassPath = null;
+   private File sourceDir;
+   private String targetPackage;
+   private PrintStream messageStream;
+   private String wsdlLocation;
+   private List<String> additionalCompilerClassPath;
 
    @Override
-   public void setBindingFiles(List<File> bindingFiles) {
+   public void setBindingFiles(List<File> bindingFiles)
+   {
       this.bindingFiles = bindingFiles;
    }
 
    @Override
-   public void setCatalog(File catalog) {
+   public void setCatalog(File catalog)
+   {
       this.catalog = catalog;
    }
 
    @Override
-   public void setGenerateSource(boolean generateSource) {
+   public void setGenerateSource(boolean generateSource)
+   {
       this.generateSource = generateSource;
    }
 
    @Override
-   public void setMessageStream(PrintStream messageStream) {
-      // TODO Auto-generated method stub
+   public void setMessageStream(PrintStream messageStream)
+   {
       this.messageStream = messageStream;
    }
 
    @Override
-   public void setOutputDirectory(File directory) {
-      // TODO Auto-generated method stub
+   public void setOutputDirectory(File directory)
+   {
       outputDir = directory;
    }
 
    @Override
-   public void setSourceDirectory(File directory) {
+   public void setSourceDirectory(File directory)
+   {
       sourceDir = directory;
    }
 
    @Override
-   public void setTargetPackage(String targetPackage) {
+   public void setTargetPackage(String targetPackage)
+   {
       this.targetPackage = targetPackage;
    }
 
    @Override
-   public void setWsdlLocation(String wsdlLocation) {
+   public void setWsdlLocation(String wsdlLocation)
+   {
       this.wsdlLocation = wsdlLocation;
    }
 
-   public void setAdditionalCompilerClassPath(List<String> additionalCompilerClassPath) {
+   public void setAdditionalCompilerClassPath(List<String> additionalCompilerClassPath)
+   {
       this.additionalCompilerClassPath = additionalCompilerClassPath;
    }
 
    @Override
-   public void consume(URL wsdl) {
+   public void consume(URL wsdl)
+   {
       List<String> args = new ArrayList<String>();
-      if (bindingFiles != null) {
-         for (File file : bindingFiles) {
+      if (bindingFiles != null)
+      {
+         for (File file : bindingFiles)
+         {
             args.add("-b");
             args.add(file.getAbsolutePath());
 
          }
       }
 
-      if (catalog != null) {
+      if (catalog != null)
+      {
          args.add("-catalog");
          args.add(catalog.getAbsolutePath());
       }
 
-      if (generateSource) {
+      if (generateSource)
+      {
          args.add("-keep");
-         if (sourceDir != null) {
+         if (sourceDir != null)
+         {
             if (!sourceDir.exists() && !sourceDir.mkdirs())
                throw new IllegalStateException("Could not make directory: " + sourceDir.getName());
 
@@ -122,20 +135,25 @@
          }
       }
 
-      if (targetPackage != null) {
+      if (targetPackage != null)
+      {
          args.add("-p");
          args.add(targetPackage);
       }
 
-      if (wsdlLocation != null) {
+      if (wsdlLocation != null)
+      {
          args.add("-wsdllocation");
          args.add(wsdlLocation);
       }
 
       PrintStream stream = messageStream;
-      if (stream != null) {
+      if (stream != null)
+      {
          args.add("-verbose");
-      } else {
+      }
+      else
+      {
          stream = new NullPrintStream();
       }
 
@@ -150,20 +168,26 @@
       try
       {
          // enforce woodstox
-         if(null == System.getProperty("javax.xml.stream.XMLInputFactory"))
+         if (null == System.getProperty("javax.xml.stream.XMLInputFactory"))
             System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
-         
+
          WsimportTool compileTool = new WsimportTool(stream);
          boolean success = compileTool.run(args.toArray(new String[0]));
 
-         if(!success) throw new IllegalStateException("WsImport invocation failed");
+         if (!success)
+            throw new IllegalStateException("WsImport invocation failed");
       }
       catch (Throwable t)
       {
-         messageStream.println("Failed to invoke WsImport");
-         t.printStackTrace(messageStream);
+         if (messageStream != null)
+         {
+            messageStream.println("Failed to invoke WsImport");
+            t.printStackTrace(messageStream);
+         }
+         else
+         {
+            t.printStackTrace();
+         }
       }
-
    }
 }
-

Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692 (from rev 3565, branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692)

Deleted: trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java	2007-06-13 13:30:03 UTC (rev 3565)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.test.ws.common.jbws1692;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPMessage;
-
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * SOAPElement.importNode() not supported
- * 
- * http://jira.jboss.org/jira/browse/JBWS-1692
- *
- * @author Thomas.Diesler at jboss.org
- * @since 13-Jun-2006
- */
-public class JBWS1692TestCase extends JBossWSTest
-{
-   public void testImportNode() throws Exception
-   {
-      MessageFactory factory = MessageFactory.newInstance();
-      File soapreqfile = new File("resources/common/jbws1692/soap-request-template.xml");
-      SOAPMessage msg = factory.createMessage(null, new FileInputStream(soapreqfile));
-
-      // Get the node that needs to be imported
-      Node someNode = getNode("resources/common/jbws1692/import-node.xml");
-
-      // Import the node
-      Node importedNode = msg.getSOAPPart().getOwnerDocument().importNode(someNode, true);
-      
-      // Append the node to the first child
-      msg.getSOAPBody().getFirstChild().appendChild(importedNode);
-      
-      ByteArrayOutputStream baos = new ByteArrayOutputStream();
-      msg.writeTo(baos);
-      String resXML = new String(baos.toByteArray());
-      assertTrue("Invalid response: " + resXML, resXML.indexOf("<a xmlns='urn:custom'><b:Request xmlns:b='urn:custom-ns'/></a>") > 0);
-   }
-   
-   private Node getNode(String xmlFile) throws Exception
-   {
-      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-      factory.setNamespaceAware(true);
-      factory.setIgnoringComments(true);
-
-      File requestFile = new File(xmlFile);
-      FileInputStream fis = new FileInputStream(requestFile);
-
-      Document doc = factory.newDocumentBuilder().parse(fis);
-      NodeList nodes = doc.getElementsByTagNameNS("urn:custom-ns", "Request");
-      return nodes.item(0);
-   }
-}
\ No newline at end of file

Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java (from rev 3565, branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java)
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java	                        (rev 0)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/common/jbws1692/JBWS1692TestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.test.ws.common.jbws1692;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * SOAPElement.importNode() not supported
+ * 
+ * http://jira.jboss.org/jira/browse/JBWS-1692
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 13-Jun-2006
+ */
+public class JBWS1692TestCase extends JBossWSTest
+{
+   public void testImportNode() throws Exception
+   {
+      MessageFactory factory = MessageFactory.newInstance();
+      File soapreqfile = new File("resources/common/jbws1692/soap-request-template.xml");
+      SOAPMessage msg = factory.createMessage(null, new FileInputStream(soapreqfile));
+
+      // Get the node that needs to be imported
+      Node someNode = getNode("resources/common/jbws1692/import-node.xml");
+
+      // Import the node
+      Node importedNode = msg.getSOAPPart().getOwnerDocument().importNode(someNode, true);
+      
+      // Append the node to the first child
+      msg.getSOAPBody().getFirstChild().appendChild(importedNode);
+      
+      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+      msg.writeTo(baos);
+      String resXML = new String(baos.toByteArray());
+      assertTrue("Invalid response: " + resXML, resXML.indexOf("<a xmlns='urn:custom'><b:Request xmlns:b='urn:custom-ns'/></a>") > 0);
+   }
+   
+   private Node getNode(String xmlFile) throws Exception
+   {
+      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+      factory.setNamespaceAware(true);
+      factory.setIgnoringComments(true);
+
+      File requestFile = new File(xmlFile);
+      FileInputStream fis = new FileInputStream(requestFile);
+
+      Document doc = factory.newDocumentBuilder().parse(fis);
+      NodeList nodes = doc.getElementsByTagNameNS("urn:custom-ns", "Request");
+      return nodes.item(0);
+   }
+}
\ No newline at end of file

Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -28,11 +28,16 @@
 
 import javax.naming.InitialContext;
 import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
 
 import junit.framework.Test;
 
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.wsf.spi.utils.DOMWriter;
 
 /**
  * Deploying a war that also contains normal servlets the web.xml is modified as if they are all endpoints
@@ -63,14 +68,14 @@
       }
    }
 
-   public void testAccessEnpoint() throws Exception
+   public void testEnpointAccess() throws Exception
    {
       assertEquals(ServletTest.MESSAGE, port.echoString(ServletTest.MESSAGE));
    }
 
-   public void testAccessServlet() throws Exception
+   public void testServletAccess() throws Exception
    {
-      URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest");
+      URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest?type=txtMessage");
 
       InputStream is = servletURL.openStream();
       InputStreamReader isr = new InputStreamReader(is);
@@ -80,4 +85,28 @@
 
       assertEquals(ServletTest.MESSAGE, line);
    }
+
+   /**
+    * [JBWS-1706] SOAPConnection.get fails with ProtocolException
+    * 
+    * Gets a SOAP response message from a specific endpoint
+    * and blocks until it has received the response. HTTP-GET
+    * from a valid endpoint that contains a valid webservice
+    * resource should succeed. The endpoint tested contains
+    * a valid webservice resource that must return a SOAP 
+    * response. HTTP-GET must succeed.
+    *
+    */
+   public void testSOAPConnectionGet() throws Exception
+   {
+      URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest?type=soapMessage");
+
+      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+      SOAPMessage resMessage = con.get(servletURL);
+      SOAPEnvelope env = resMessage.getSOAPPart().getEnvelope();
+
+      String envStr = DOMWriter.printNode(env, false);
+      String expStr = "<ztrade:GetLastTradePriceResponse xmlns:ztrade='http://wombat.ztrade.com'><Price>95.12</Price></ztrade:GetLastTradePriceResponse>";
+      assertTrue(envStr.contains(expStr));
+   }
 }

Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -22,12 +22,21 @@
 package org.jboss.test.ws.jaxrpc.jbws1093;
 
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.PrintWriter;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
 
 /**
  * JBWS-1093 - This servlet is called ServletTest to check that we are
@@ -40,10 +49,44 @@
 {
    public static final String MESSAGE = "Success!!";
 
-   protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+   protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    {
-      PrintWriter writer = response.getWriter();
-      writer.println(MESSAGE);
+      String reqType = req.getParameter("type");
+      if ("txtMessage".equals(reqType))
+      {
+         PrintWriter writer = res.getWriter();
+         writer.println(MESSAGE);
+      }
+      else if ("soapMessage".equals(reqType))
+      {
+         try
+         {
+            // Create a SOAPMessage
+            MessageFactory msgFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+            SOAPMessage msg = msgFactory.createMessage();
+
+            SOAPPart sp = msg.getSOAPPart();
+
+            SOAPEnvelope env = sp.getEnvelope();
+
+            SOAPBody body = env.getBody();
+
+            Name elName = env.createName("GetLastTradePriceResponse", "ztrade", "http://wombat.ztrade.com");
+            body.addBodyElement(elName).addChildElement("Price").addTextNode("95.12");
+
+            msg.saveChanges();
+
+            res.setStatus(HttpServletResponse.SC_OK);
+
+            // Write out the message on the response stream.
+            OutputStream os = res.getOutputStream();
+            msg.writeTo(os);
+            os.flush();
+         }
+         catch (SOAPException e)
+         {
+            throw new ServletException(e);
+         }
+      }
    }
-
 }

Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleEncryptTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleEncryptTestCase.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleEncryptTestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -32,7 +32,6 @@
 import junit.framework.Test;
 
 import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.client.ServiceExt;
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 
@@ -73,9 +72,9 @@
       QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
 
       Service service = Service.create(wsdlURL, serviceName);
-      ((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
       
       Hello port = (Hello)service.getPort(Hello.class);
+      ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
       ((StubExt)port).setConfigName("Standard WSSecurity Client");
 
       Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();

Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleSignTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleSignTestCase.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleSignTestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -32,7 +32,6 @@
 import junit.framework.Test;
 
 import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.client.ServiceExt;
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 
@@ -69,9 +68,9 @@
       QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
 
       Service service = Service.create(wsdlURL, serviceName);
-      ((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
       
       Hello port = (Hello)service.getPort(Hello.class);
+      ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
       ((StubExt)port).setConfigName("Standard WSSecurity Client");
 
       Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();

Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -31,8 +31,6 @@
 
 import junit.framework.Test;
 
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.client.ServiceExt;
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 

Copied: trunk/jbossws-core/src/test/resources/common/jbws1692 (from rev 3565, branches/jbossws-2.0/jbossws-core/src/test/resources/common/jbws1692)

Deleted: trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/common/jbws1692/import-node.xml	2007-06-13 13:30:03 UTC (rev 3565)
+++ trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1 +0,0 @@
-<b:Request xmlns:b="urn:custom-ns"/>
\ No newline at end of file

Copied: trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml (from rev 3565, branches/jbossws-2.0/jbossws-core/src/test/resources/common/jbws1692/import-node.xml)
===================================================================
--- trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml	                        (rev 0)
+++ trunk/jbossws-core/src/test/resources/common/jbws1692/import-node.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1 @@
+<b:Request xmlns:b="urn:custom-ns"/>
\ No newline at end of file

Deleted: trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml	2007-06-13 13:30:03 UTC (rev 3565)
+++ trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
-  <SOAP-ENV:Body><a xmlns="urn:custom"/></SOAP-ENV:Body>
-</SOAP-ENV:Envelope>
\ No newline at end of file

Copied: trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml (from rev 3565, branches/jbossws-2.0/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml)
===================================================================
--- trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml	                        (rev 0)
+++ trunk/jbossws-core/src/test/resources/common/jbws1692/soap-request-template.xml	2007-06-14 09:23:52 UTC (rev 3576)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+  <SOAP-ENV:Body><a xmlns="urn:custom"/></SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
\ No newline at end of file

Modified: trunk/testsuite/.classpath
===================================================================
--- trunk/testsuite/.classpath	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/testsuite/.classpath	2007-06-14 09:23:52 UTC (rev 3576)
@@ -13,5 +13,7 @@
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/activation.jar"/>
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-api.jar"/>
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-impl.jar"/>
+	<classpathentry kind="lib" path="/integration-spi/thirdparty/stax-api.jar"/>
+	<classpathentry kind="lib" path="/integration-spi/thirdparty/wsdl4j.jar" sourcepath="/integration-spi/thirdparty/wsdl4j-src.jar"/>
 	<classpathentry kind="output" path="output/eclipse"/>
 </classpath>

Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java	2007-06-14 09:23:52 UTC (rev 3576)
@@ -23,6 +23,9 @@
 
 import java.net.URL;
 
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
@@ -54,10 +57,15 @@
       Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
       TestEndpoint port = service.getPort(TestEndpoint.class);
 
+      // [JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation
+      Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
+      String nsURI = wsdl.getNamespace("jbws1616");
+      assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
+      
       // [JBWS-1655] Add support for endpoint address rewriting
       BindingProvider bp = (BindingProvider)port;
       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
-      
+
       String helloWorld = "Hello world!";
       String retObj = port.echo(helloWorld);
       assertEquals(helloWorld, retObj);
@@ -70,12 +78,26 @@
       Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
       TestEndpoint port = service.getPort(TestEndpoint.class);
 
+      // [JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation
+      Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
+      String nsURI = wsdl.getNamespace("jbws1616");
+      assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
+      
       // [JBWS-1655] Add support for endpoint address rewriting
       BindingProvider bp = (BindingProvider)port;
       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
-      
+
       String helloWorld = "Hello world!";
       String retObj = port.echo(helloWorld);
       assertEquals(helloWorld, retObj);
    }
+
+   private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+   {
+      WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+      WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+      Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+      return definition;
+   }
 }

Modified: trunk/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- trunk/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl	2007-06-13 21:25:17 UTC (rev 3575)
+++ trunk/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl	2007-06-14 09:23:52 UTC (rev 3576)
@@ -8,6 +8,7 @@
 <definitions name="TestEndpointService" 
   targetNamespace="http://eardeployment.jaxws/" 
   xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:jbws1616="http://jira.jboss.org/jira/browse/JBWS-1616"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://eardeployment.jaxws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
   <!-- Test a schema import -->  




More information about the jbossws-commits mailing list