[jboss-svn-commits] JBL Code SVN: r21608 - in labs/jbossesb/branches/JBESB_4_4_GA_CP: product/docs and 36 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 18 17:59:31 EDT 2008


Author: kevin.conner at jboss.com
Date: 2008-08-18 17:59:30 -0400 (Mon, 18 Aug 2008)
New Revision: 21608

Added:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jboss-jaxws.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jboss-saaj.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jbossws-spi.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/wsdl4j-1.6.2.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ContractReferencePublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ServletContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/ActionProcessingDetailFaultException.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMetaData.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageValidationException.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/response.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/lib/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/lib/soap-xmlbeans-1.2.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/helloworld.wsdl
Removed:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/lib/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/lib/ext/build-time/jboss-jaxws.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/lib/ext/build-time/jboss-saaj.jar
Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/docs/ProgrammersGuide.odt
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/install/conf/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/errors/Factory.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/message/Fault.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/readme.txt
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/MBeanSoapUIInvoker.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/MockSOAPClient.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/contract.jsp
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/index.jsp
Log:
Port of JimMa's workspace: JBESB-1653


Property changes on: labs/jbossesb/branches/JBESB_4_4_GA_CP
___________________________________________________________________
Name: svn:ignore
   - .settings
.classpath
.project
bin
.packaging
build
junit
ObjectToFileWriter.tst
null
classes
ESB.ipr
ESB.iws
runci.bat

   + .settings
.classpath
.project
bin
.packaging
build
junit
ObjectToFileWriter.tst
null
classes
ESB.ipr
ESB.iws
runci.bat
kev


Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -337,6 +337,16 @@
 		</xsd:restriction>
 	</xsd:simpleType>
 
+	<xsd:simpleType name="webserviceType">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="disabled" />
+			<xsd:enumeration value="none" />
+			<xsd:enumeration value="addressing" />
+			<xsd:enumeration value="security" />
+			<xsd:enumeration value="all" />
+		</xsd:restriction>
+	</xsd:simpleType>
+
 	<xsd:element name="actions">
 		<xsd:annotation>
 			<xsd:documentation xml:lang="en">
@@ -349,6 +359,11 @@
 					ref="jesb:action" />
 			</xsd:sequence>
 			<xsd:attribute name="mep" type="jesb:mepType" />
+                        <xsd:attribute name="inXsd" type="xsd:string" />
+                        <xsd:attribute name="outXsd" type="xsd:string" />
+                        <xsd:attribute name="faultXsd" type="xsd:string" />
+                        <xsd:attribute name="webservice" type="jesb:webserviceType" />
+                        <xsd:attribute name="validate" type="xsd:boolean" />
 		</xsd:complexType>
 	</xsd:element>
 	<xsd:element name="action">

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/install/conf/jbossesb-properties.xml	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/install/conf/jbossesb-properties.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -63,6 +63,13 @@
     	<property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
     	<property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
     	<property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
+    	
+    	<!--  Uncomment this to return stack traces when exposing an ESB service through WS
+    	<property name="org.jboss.soa.esb.ws.returnStackTrace" value="true"/>
+    	-->
+    	<!--  Uncomment this to specify the WS response timeout when exposing an ESB service through WS
+    	<property name="org.jboss.soa.esb.ws.timeout" value="30000"/>
+    	-->
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jboss-jaxws.jar (from rev 21592, labs/jbossesb/workspace/jimma/product/lib/ext/jboss-jaxws.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jboss-saaj.jar (from rev 21592, labs/jbossesb/workspace/jimma/product/lib/ext/jboss-saaj.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/jbossws-spi.jar (from rev 21592, labs/jbossesb/workspace/jimma/product/lib/ext/jbossws-spi.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/lib/ext/wsdl4j-1.6.2.jar (from rev 21592, labs/jbossesb/workspace/jimma/product/lib/ext/wsdl4j-1.6.2.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ContractReferencePublisher.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/publish/ContractReferencePublisher.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ContractReferencePublisher.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ContractReferencePublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,37 @@
+package org.jboss.internal.soa.esb.publish;
+
+import java.net.URI;
+
+import org.jboss.soa.esb.Service;
+
+/**
+ * Contract Publisher which represents a referenced contract.
+ *
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public interface ContractReferencePublisher extends Publisher
+{
+    /**
+     * Get the service represented by this contract configuration.
+     * @return The service.
+     */
+    public Service getService() ;
+    
+    /**
+     * Get the service description represented by this contract configuration.
+     * @return The service description.
+     */
+    public String getDescription() ;
+    
+    /**
+     * Get the URI of the service.
+     * @return The service URI.
+     */
+    public URI getServiceURI() ;
+    
+    /**
+     * Get the URI of the contract.
+     * @return The contract URI.
+     */
+    public URI getServiceContractURI() ;
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ServletContractPublisher.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/publish/ServletContractPublisher.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ServletContractPublisher.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/publish/ServletContractPublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.internal.soa.esb.publish;
+
+import org.jboss.soa.esb.addressing.EPR;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Action contract Publisher.
+ *
+ * @author
+ */
+public interface ServletContractPublisher extends ContractPublisher {
+
+    /**
+     * Get the contract information within a servlet context.
+     * <p/>
+     * A Service may publish a number of addressable endpoints. The publisher
+     * will likely return different contract info depending on the endpoint EPR.
+     * <p/>
+     * This info can be stored and published from a global registry of some sort.
+     *
+     * @param epr Endpoint EPR.
+     * @param servletRequest The servlet request context.
+     * @return Contract information.
+     */
+    public ContractInfo getContractInfo(final EPR epr, final HttpServletRequest servletRequest) ;
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -20,9 +20,11 @@
  */
 package org.jboss.internal.soa.esb.util;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.Reader;
+import java.io.StringReader;
 import java.io.Writer;
 
 import javax.xml.namespace.QName;
@@ -31,10 +33,16 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
 
 import org.jboss.internal.soa.esb.util.stax.ParsingSupport;
 import org.jboss.internal.soa.esb.util.stax.StreamHelper;
+import org.jboss.soa.esb.util.ClassUtil;
 import org.jboss.util.StringPropertyReplacer;
+import org.xml.sax.SAXException;
 
 /**
  * Helper class for manipulating XML documents.
@@ -51,6 +59,10 @@
      * The XML output factory.
      */
     private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance() ;
+    /**
+     * The schema factory.
+     */
+    private static final SchemaFactory SCHEMA_FACTORY = SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
 
     /**
      * Get the XML stream reader.
@@ -149,6 +161,39 @@
         streamWriter.writeEndDocument() ;
         streamWriter.flush() ;
     }
+    
+    /**
+     * Get the schema for the specified resource.
+     * @param resource The schema resource to parse.
+     * @return The resource schema for validation. 
+     * @throws SAXException For errors during parsing.
+     */
+    public static Schema getSchema(final String resource)
+        throws SAXException
+    {
+        final InputStream resourceIS = ClassUtil.getResourceAsStream(resource, XMLHelper.class) ;
+        return SCHEMA_FACTORY.newSchema(new StreamSource(resourceIS)) ;
+    }
+    
+    /**
+     * Validate the specified xml against the schema.
+     * @param schema The resource schema for validation.
+     * @param xml The XML to validate.
+     * @return true if valid, false otherwise.
+     */
+    public static boolean validate(final Schema schema, final String xml)
+    {
+        final Validator validator = schema.newValidator() ;
+        try
+        {
+            validator.validate(new StreamSource(new StringReader(xml))) ;
+            return true ;
+        }
+        catch (final IOException ioe) {} // fall through
+        catch (final SAXException saxe) {} // fall through
+        
+        return false ;
+    }
 
     /**
      * Create the XML input factory.

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,211 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.internal.soa.esb.webservice;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.Node;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.couriers.FaultMessageException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.message.Fault;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.w3c.dom.Document;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-
-/**
- * This is the abstract base class for a SOAP messages
- * @author kevin
- */
-public abstract class BaseWebService
-{
-    private static final QName SERVER_FAULT_QN = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Server") ;
-    
-    private static final boolean RETURN_STACK_TRACES ;
-    private static final Logger LOGGER = Logger.getLogger(BaseWebService.class);
-    
-    protected final ServiceInvoker serviceInvoker ;
-    
-    protected BaseWebService(final String category, final String name)
-        throws MessageDeliverException
-    {
-        serviceInvoker = new ServiceInvoker(category, name) ;
-    }
-    
-    public Object invoke(final Object obj)
-        throws SOAPException
-    {
-        final SOAPMessage request = (SOAPMessage)obj;
-        final Message esbReq = MessageFactory.getInstance().getMessage() ;
-        try
-        {
-            final SOAPBody soapBody = request.getSOAPBody() ;
-            if (soapBody == null)
-            {
-                throw new SOAPException("Missing SOAP body from request") ;
-            }
-            // There is a bug in JBossWS extractContentAsDocument so we do this ourselves
-            final Iterator children = soapBody.getChildElements() ;
-            boolean found = false ;
-            while(children.hasNext())
-            {
-                final Node node = (Node)children.next() ;
-                if (node instanceof SOAPElement)
-                {
-                    if (found)
-                    {
-                        throw new SOAPException("Found multiple SOAPElements in SOAPBody") ;
-                    }
-                    final ByteArrayOutputStream byteStream = new ByteArrayOutputStream() ;
-                    YADOMUtil.serialize(node, new StreamResult(byteStream), true);
-                    byteStream.close();
-                    esbReq.getBody().add(byteStream.toString()) ;
-                    found = true ;
-                }
-            }
-            
-            if (!found)
-            {
-                throw new SOAPException("Could not find SOAPElement in SOAPBody") ;
-            }
-            
-            final Message esbRes = deliverMessage(esbReq) ;
-            if (esbRes != null)
-            {
-                final Object input = esbRes.getBody().get() ;
-                if (input == null)
-                {
-                    throw new SOAPException("Null response from service") ;
-                }
-                final String soapRes = input.toString();
-                
-                final Document respDoc = YADOMUtil.parseStream(new ByteArrayInputStream(soapRes.getBytes()),
-                        false, false, true);
-                final SOAPMessage response = javax.xml.soap.MessageFactory.newInstance().createMessage();
-                response.getSOAPBody().addDocument(respDoc) ;
-                return response ;
-            }
-            else
-            {
-                return null ;
-            }
-         }
-        catch (final Exception ex)
-        {
-            SOAPMessage faultMsg = null;
-            if (ex instanceof FaultMessageException)
-            {
-                final FaultMessageException fme = (FaultMessageException) ex ;
-                final Message faultMessage = fme.getReturnedMessage() ;
-                if (faultMessage != null)
-                {
-                    final Body body = faultMessage.getBody() ;
-                    final QName faultCode = (QName)body.get(Fault.DETAIL_CODE_CONTENT) ;
-                    final String faultDescription = (String)body.get(Fault.DETAIL_DESCRIPTION_CONTENT) ;
-                    final String faultDetail = (String)body.get(Fault.DETAIL_DETAIL_CONTENT) ;
-                    
-                    if (faultCode != null)
-                    {
-                        faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
-                        final SOAPFault fault = faultMsg.getSOAPBody().addFault(faultCode, faultDescription) ;
-                        if (faultDetail != null)
-                        {
-                            try
-                            {
-                                final Document detailDoc = YADOMUtil.parseStream(new ByteArrayInputStream(faultDetail.getBytes()),
-                                        false, false, true);
-                                final Detail detail = fault.addDetail() ;
-                                detail.appendChild(detailDoc.getDocumentElement()) ;
-                            }
-                            catch (final Exception ex2)
-                            {
-                                LOGGER.warn("Failed to parse fault detail", ex2) ;
-                            }
-                        }
-                    }
-                    else
-                    {
-                        final Throwable cause = fme.getCause() ;
-                        faultMsg = (cause != null) ? generateFault(cause) : generateFault(ex) ;
-                    }
-                }
-            }
-            
-            if (faultMsg == null)
-            {
-                faultMsg = generateFault(ex) ;
-            }
-            return faultMsg ;
-        }
-    }
-    
-    private SOAPMessage generateFault(final Throwable th)
-        throws SOAPException
-    {
-        final SOAPMessage faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
-        if (RETURN_STACK_TRACES)
-        {
-            final StringWriter sw = new StringWriter() ;
-            final PrintWriter pw = new PrintWriter(sw) ;
-            th.printStackTrace(pw) ;
-            pw.flush() ;
-            pw.close() ;
-            faultMsg.getSOAPBody().addFault(SERVER_FAULT_QN, sw.toString());
-        }
-        else
-        {
-            faultMsg.getSOAPBody().addFault(SERVER_FAULT_QN, th.getMessage());
-        }
-        return faultMsg ;
-    }
-    
-    protected abstract Message deliverMessage(final Message request)
-        throws Exception ;
-    
-    static
-    {
-        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE) ;
-        final String returnStackTraces = propertyManager.getProperty(Environment.WS_RETURN_STACK_TRACE);
-        RETURN_STACK_TRACES = Boolean.parseBoolean(returnStackTraces) ;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,211 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.internal.soa.esb.webservice;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.Node;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.couriers.FaultMessageException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Fault;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.w3c.dom.Document;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+
+/**
+ * This is the abstract base class for a SOAP messages
+ * @author kevin
+ */
+public abstract class BaseWebService
+{
+    private static final QName SERVER_FAULT_QN = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Server") ;
+    
+    private static final boolean RETURN_STACK_TRACES ;
+    private static final Logger LOGGER = Logger.getLogger(BaseWebService.class);
+    
+    protected final ServiceInvoker serviceInvoker ;
+    
+    protected BaseWebService(final String category, final String name)
+        throws MessageDeliverException
+    {
+        serviceInvoker = new ServiceInvoker(category, name) ;
+    }
+    
+    public Object invoke(final Object obj)
+        throws SOAPException
+    {
+        final SOAPMessage request = (SOAPMessage)obj;
+        final Message esbReq = MessageFactory.getInstance().getMessage() ;
+        try
+        {
+            final SOAPBody soapBody = request.getSOAPBody() ;
+            if (soapBody == null)
+            {
+                throw new SOAPException("Missing SOAP body from request") ;
+            }
+            // There is a bug in JBossWS extractContentAsDocument so we do this ourselves
+            final Iterator children = soapBody.getChildElements() ;
+            boolean found = false ;
+            while(children.hasNext())
+            {
+                final Node node = (Node)children.next() ;
+                if (node instanceof SOAPElement)
+                {
+                    if (found)
+                    {
+                        throw new SOAPException("Found multiple SOAPElements in SOAPBody") ;
+                    }
+                    final ByteArrayOutputStream byteStream = new ByteArrayOutputStream() ;
+                    YADOMUtil.serialize(node, new StreamResult(byteStream), true);
+                    byteStream.close();
+                    esbReq.getBody().add(byteStream.toString()) ;
+                    found = true ;
+                }
+            }
+            
+            if (!found)
+            {
+                throw new SOAPException("Could not find SOAPElement in SOAPBody") ;
+            }
+            
+            final Message esbRes = deliverMessage(esbReq) ;
+            if (esbRes != null)
+            {
+                final Object input = esbRes.getBody().get() ;
+                if (input == null)
+                {
+                    throw new SOAPException("Null response from service") ;
+                }
+                final String soapRes = input.toString();
+                
+                final Document respDoc = YADOMUtil.parseStream(new ByteArrayInputStream(soapRes.getBytes()),
+                        false, false, true);
+                final SOAPMessage response = javax.xml.soap.MessageFactory.newInstance().createMessage();
+                response.getSOAPBody().addDocument(respDoc) ;
+                return response ;
+            }
+            else
+            {
+                return null ;
+            }
+         }
+        catch (final Exception ex)
+        {
+            SOAPMessage faultMsg = null;
+            if (ex instanceof FaultMessageException)
+            {
+                final FaultMessageException fme = (FaultMessageException) ex ;
+                final Message faultMessage = fme.getReturnedMessage() ;
+                if (faultMessage != null)
+                {
+                    final Body body = faultMessage.getBody() ;
+                    final QName faultCode = (QName)body.get(Fault.DETAIL_CODE_CONTENT) ;
+                    final String faultDescription = (String)body.get(Fault.DETAIL_DESCRIPTION_CONTENT) ;
+                    final String faultDetail = (String)body.get(Fault.DETAIL_DETAIL_CONTENT) ;
+                    
+                    if (faultCode != null)
+                    {
+                        faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
+                        final SOAPFault fault = faultMsg.getSOAPBody().addFault(faultCode, faultDescription) ;
+                        if (faultDetail != null)
+                        {
+                            try
+                            {
+                                final Document detailDoc = YADOMUtil.parseStream(new ByteArrayInputStream(faultDetail.getBytes()),
+                                        false, false, true);
+                                final Detail detail = fault.addDetail() ;
+                                detail.appendChild(detailDoc.getDocumentElement()) ;
+                            }
+                            catch (final Exception ex2)
+                            {
+                                LOGGER.warn("Failed to parse fault detail", ex2) ;
+                            }
+                        }
+                    }
+                    else
+                    {
+                        final Throwable cause = fme.getCause() ;
+                        faultMsg = (cause != null) ? generateFault(cause) : generateFault(ex) ;
+                    }
+                }
+            }
+            
+            if (faultMsg == null)
+            {
+                faultMsg = generateFault(ex) ;
+            }
+            return faultMsg ;
+        }
+    }
+    
+    private SOAPMessage generateFault(final Throwable th)
+        throws SOAPException
+    {
+        final SOAPMessage faultMsg = javax.xml.soap.MessageFactory.newInstance().createMessage() ;
+        if (RETURN_STACK_TRACES)
+        {
+            final StringWriter sw = new StringWriter() ;
+            final PrintWriter pw = new PrintWriter(sw) ;
+            th.printStackTrace(pw) ;
+            pw.flush() ;
+            pw.close() ;
+            faultMsg.getSOAPBody().addFault(SERVER_FAULT_QN, sw.toString());
+        }
+        else
+        {
+            faultMsg.getSOAPBody().addFault(SERVER_FAULT_QN, th.getMessage());
+        }
+        return faultMsg ;
+    }
+    
+    protected abstract Message deliverMessage(final Message request)
+        throws Exception ;
+    
+    static
+    {
+        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE) ;
+        final String returnStackTraces = propertyManager.getProperty(Environment.WS_RETURN_STACK_TRACE);
+        RETURN_STACK_TRACES = Boolean.parseBoolean(returnStackTraces) ;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,324 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.webservice;
-
-import java.io.StringWriter;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingFault;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.BindingOutput;
-import javax.wsdl.Definition;
-import javax.wsdl.Fault;
-import javax.wsdl.Input;
-import javax.wsdl.Message;
-import javax.wsdl.Operation;
-import javax.wsdl.Output;
-import javax.wsdl.Part;
-import javax.wsdl.PortType;
-import javax.wsdl.Types;
-import javax.wsdl.WSDLException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.xml.namespace.QName;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.dom.YADOMUtil;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-import org.jboss.soa.esb.util.ClassUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.ibm.wsdl.extensions.schema.SchemaImpl;
-import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
-import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
-import com.ibm.wsdl.extensions.soap.SOAPBodyImpl;
-import com.ibm.wsdl.extensions.soap.SOAPFaultImpl;
-
-public class ESBContractGenerator {
-	private static final QName XSD_QN = new QName("http://www.w3.org/2001/XMLSchema", "schema");
-	private static WSDLFactory wsdlFactory ;
- 
-	public static String generateWSDL(final Service serviceConfig, final ESBServiceEndpointInfo serviceInfo)
-			throws ConfigurationException {
-		final Definition def = getWSDLFactory().newDefinition() ;
-		final String namespace = serviceInfo.getNamespace() ;
-		def.setTargetNamespace(namespace);
-		def.addNamespace("tns", namespace);
-		def.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
-		// add types
-		Types types = def.createTypes();
-		def.setTypes(types);
-
-		Message reqMessage = null;
-		Message resMessage = null;
-		List<Message> faultMessages = null;
-
-		String inXsd = serviceConfig.getActions().getInXsd();
-		String outXsd = serviceConfig.getActions().getOutXsd();
-		String faultXsd = serviceConfig.getActions().getFaultXsd();
-
-		int nsSuffixCounter = 0 ;
-		if (inXsd != null) {
-			try {
-				Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(inXsd, ESBContractGenerator.class),
-						false, false);
-				if (doc != null) {
-					reqMessage = addMessage(def, doc.getDocumentElement(),
-							serviceInfo.getRequestName(), "in", ++nsSuffixCounter);
-				}
-			} catch (Exception e) {
-				throw new ConfigurationException("File defined in inXsd attribute '" + serviceConfig.getActions().getInXsd() + "' not found in classpath.", e);
-			} 
-		}
-
-		if (outXsd != null) {
-			try {
-				Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(outXsd, ESBContractGenerator.class),
-						false, false);
-				if (doc != null) {
-					resMessage = addMessage(def, doc.getDocumentElement(),
-							serviceInfo.getResponseName(), "out", ++nsSuffixCounter);
-				}
-			} catch (Exception e) {
-				throw new ConfigurationException("File defined in outXsd attribute '" + serviceConfig.getActions().getOutXsd() + "' not found in classpath.", e);
-			} 
-
-		}
-
-		if ((faultXsd != null) && !serviceInfo.isOneWay()) {
-			try {
-				final String[] xsds = faultXsd.split(",") ;
-				faultMessages = new ArrayList<Message>();
-				for(String xsd: xsds) {
-					Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(xsd, ESBContractGenerator.class),
-						false, false);
-					if (doc != null) {
-						addFaultMessage(faultMessages, def, doc.getDocumentElement(),
-							serviceInfo.getFaultName(), "fault", ++nsSuffixCounter);
-					}
-				}
-			} catch (Exception e) {
-				throw new ConfigurationException("File defined in faultXsd attribute '" + serviceConfig.getActions().getFaultXsd() + "' not found in classpath.", e);
-			} 
-
-		}
-
-		PortType portType = addPortType(def, serviceInfo, reqMessage,
-			resMessage, faultMessages);
-		Binding binding = addBinding(def, serviceInfo, portType);
-		addService(def, serviceInfo, binding);
-		StringWriter sw = new java.io.StringWriter();
-		try {
-			getWSDLFactory().newWSDLWriter().writeWSDL(def, sw);
-		} catch (WSDLException e) {
-			new ConfigurationException("Failed to generate wsdl for service:" + serviceConfig.getCategory() + "/" + serviceConfig.getName() , e);
-		}
-		return sw.toString();
-	}
-
-	private static void addSchema(Types types, Element xsdElement) {
-		SchemaImpl schemaImpl = new SchemaImpl();
-		schemaImpl.setElement(xsdElement);
-		schemaImpl.setElementType(XSD_QN);
-		types.addExtensibilityElement(schemaImpl);
-	}
-
-	private static Message addMessage(Definition def, Element element, String msgName, String partName, int nsSuffixCounter) {
-		String schemaNs = YADOMUtil
-				.getAttribute(element, "targetNamespace", "");
-		addSchema(def.getTypes(), element);
-		if (def.getNamespace(schemaNs) == null) {
-			def.addNamespace("ns" + nsSuffixCounter, schemaNs);
-		}
-		// add request message
-		Node node = YADOMUtil.getNode(element, "/schema/element");
-		Message msg = def.createMessage();
-		msg.setQName(new QName(def.getTargetNamespace(), msgName));
-		msg.setUndefined(false);
-		Part part = def.createPart();
-		part.setName(partName);
-		part.setElementName(new QName(schemaNs, YADOMUtil.getAttribute(
-				(Element) node, "name", "")));
-		msg.addPart(part);
-		def.addMessage(msg);
-		return msg;
-	}
-
-	private static void addFaultMessage(final List<Message> faultMessages,
-			Definition def, Element element, String msgName, String partName,
-			int nsSuffixCounter) {
-		String schemaNs = YADOMUtil
-				.getAttribute(element, "targetNamespace", "");
-		addSchema(def.getTypes(), element);
-		if (def.getNamespace(schemaNs) == null) {
-			def.addNamespace("ns" + nsSuffixCounter, schemaNs);
-		}
-		// add request message
-		NodeList nodes = YADOMUtil.getNodeList(element, "/schema/element");
-		for (int i = 0; i < nodes.getLength(); i++) {
-			final int nameIndex = i + 1;
-			Node node = nodes.item(0);
-			Message msg = def.createMessage();
-			msg.setQName(new QName(def.getTargetNamespace(), msgName
-					+ nameIndex));
-			msg.setUndefined(false);
-			Part part = def.createPart();
-			part.setName(partName + nameIndex);
-			part.setElementName(new QName(schemaNs, YADOMUtil.getAttribute(
-					(Element) node, "name", "")));
-			msg.addPart(part);
-			def.addMessage(msg);
-			faultMessages.add(msg);
-		}
-	}
-
-	private static PortType addPortType(Definition def, final ESBServiceEndpointInfo serviceInfo,
-			Message inMessage, Message outMessage, List<Message> faultMessages) {
-		// add port type
-		PortType portType = def.createPortType();
-		portType.setQName(new QName(def.getTargetNamespace(), serviceInfo.getPortName())) ;
-		Operation op = def.createOperation();
-		op.setUndefined(false);
-		op.setName(serviceInfo.getOperationName());
-		if (inMessage != null) {
-			Input in = def.createInput();
-			in.setMessage(inMessage);
-			in.setName(inMessage.getQName().getLocalPart());
-			op.setInput(in);
-		}
-		if (outMessage != null) {
-			Output out = def.createOutput();
-			out.setMessage(outMessage);
-			out.setName(outMessage.getQName().getLocalPart());
-			op.setOutput(out);
-		}
-
-		int count = 1 ;
-		for (Message message : faultMessages) {
-			Fault fault = def.createFault();
-			fault.setMessage(message);
-			fault.setName("fault" + (count++));
-			op.addFault(fault);
-		}
-		portType.addOperation(op);
-		portType.setUndefined(false);
-		def.addPortType(portType);
-		return portType;
-	}
-
-	private static Binding addBinding(Definition def, final ESBServiceEndpointInfo serviceInfo, PortType portType) {
-		// add binding
-		Binding binding = def.createBinding();
-		binding.setUndefined(false);
-		binding.setPortType(portType);
-		binding.setQName(new QName(def.getTargetNamespace(), serviceInfo.getBindingName())) ;
-		SOAPBindingImpl soapBinding = new SOAPBindingImpl();
-		soapBinding.setStyle("document");
-		soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http");
-		binding.addExtensibilityElement(soapBinding);
-
-		BindingOperation bop = def.createBindingOperation();
-
-		bop.setName(serviceInfo.getOperationName());
-		Operation op = (Operation) portType.getOperations().get(0);
-		bop.setOperation(op);
-		if (op.getInput() != null) {
-			BindingInput binput = def.createBindingInput();
-			bop.setBindingInput(binput);
-			SOAPBodyImpl soapBody = new SOAPBodyImpl();
-			soapBody.setUse("literal");
-			binput.addExtensibilityElement(soapBody);
-		}
-		if (op.getOutput() != null) {
-			BindingOutput boutput = def.createBindingOutput();
-			bop.setBindingOutput(boutput);
-			SOAPBodyImpl soapBody = new SOAPBodyImpl();
-			soapBody.setUse("literal");
-			boutput.addExtensibilityElement(soapBody);
-		}
-		final Map faults = op.getFaults() ;
-		if (faults != null) {
-			Iterator iterator = op.getFaults().values().iterator();
-			while (iterator.hasNext()) {
-				Fault fault = (Fault) iterator.next();
-				BindingFault bfault = def.createBindingFault();
-				bfault.setName(fault.getName());
-				bop.addBindingFault(bfault);
-				SOAPFaultImpl soapFault = new SOAPFaultImpl();
-				soapFault.setName(fault.getName());
-				soapFault.setUse("literal");
-				bfault.addExtensibilityElement(soapFault);
-			}
-		}
-		binding.addBindingOperation(bop);
-		def.addBinding(binding);
-		return binding;
-
-	}
-
-	private static void addService(Definition def, final ESBServiceEndpointInfo serviceInfo, Binding binding) {
-		// create service
-		javax.wsdl.Service service = def.createService();
-		service.setQName(new QName(def.getTargetNamespace(), serviceInfo.getServiceName()));
-		javax.wsdl.Port port = def.createPort();
-		port.setBinding(binding);
-		port.setName(serviceInfo.getPortName());
-		SOAPAddressImpl soapAddress = new SOAPAddressImpl();
-		soapAddress.setLocationURI("http://change_this_URI/"+serviceInfo.getServletPath());
-		port.addExtensibilityElement(soapAddress);
-		service.addPort(port);
-		def.addService(service);
-	}
-	
-	private synchronized static WSDLFactory getWSDLFactory()
-	    throws ConfigurationException
-	{
-	    if (wsdlFactory == null)
-	    {
-	        try
-	        {
-	            wsdlFactory = AccessController.doPrivileged(new PrivilegedExceptionAction<WSDLFactory>() {
-	                public WSDLFactory run() throws WSDLException
-	                {
-	                    return WSDLFactory.newInstance();
-	                }
-	            }) ;
-	        }
-	        catch (final PrivilegedActionException pae)
-	        {
-	            throw new ConfigurationException("Failed to instantiate the WSDL factory", pae.getCause()) ;
-	        }
-	    }
-	    return wsdlFactory ;
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,324 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.webservice;
+
+import java.io.StringWriter;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingFault;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.PortType;
+import javax.wsdl.Types;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.ibm.wsdl.extensions.schema.SchemaImpl;
+import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
+import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
+import com.ibm.wsdl.extensions.soap.SOAPBodyImpl;
+import com.ibm.wsdl.extensions.soap.SOAPFaultImpl;
+
+public class ESBContractGenerator {
+	private static final QName XSD_QN = new QName("http://www.w3.org/2001/XMLSchema", "schema");
+	private static WSDLFactory wsdlFactory ;
+ 
+	public static String generateWSDL(final Service serviceConfig, final ESBServiceEndpointInfo serviceInfo)
+			throws ConfigurationException {
+		final Definition def = getWSDLFactory().newDefinition() ;
+		final String namespace = serviceInfo.getNamespace() ;
+		def.setTargetNamespace(namespace);
+		def.addNamespace("tns", namespace);
+		def.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
+		// add types
+		Types types = def.createTypes();
+		def.setTypes(types);
+
+		Message reqMessage = null;
+		Message resMessage = null;
+		List<Message> faultMessages = null;
+
+		String inXsd = serviceConfig.getActions().getInXsd();
+		String outXsd = serviceConfig.getActions().getOutXsd();
+		String faultXsd = serviceConfig.getActions().getFaultXsd();
+
+		int nsSuffixCounter = 0 ;
+		if (inXsd != null) {
+			try {
+				Document doc = YADOMUtil.parseStream(ClassUtil
+						.getResourceAsStream(inXsd, ESBContractGenerator.class),
+						false, false);
+				if (doc != null) {
+					reqMessage = addMessage(def, doc.getDocumentElement(),
+							serviceInfo.getRequestName(), "in", ++nsSuffixCounter);
+				}
+			} catch (Exception e) {
+				throw new ConfigurationException("File defined in inXsd attribute '" + serviceConfig.getActions().getInXsd() + "' not found in classpath.", e);
+			} 
+		}
+
+		if (outXsd != null) {
+			try {
+				Document doc = YADOMUtil.parseStream(ClassUtil
+						.getResourceAsStream(outXsd, ESBContractGenerator.class),
+						false, false);
+				if (doc != null) {
+					resMessage = addMessage(def, doc.getDocumentElement(),
+							serviceInfo.getResponseName(), "out", ++nsSuffixCounter);
+				}
+			} catch (Exception e) {
+				throw new ConfigurationException("File defined in outXsd attribute '" + serviceConfig.getActions().getOutXsd() + "' not found in classpath.", e);
+			} 
+
+		}
+
+		if ((faultXsd != null) && !serviceInfo.isOneWay()) {
+			try {
+				final String[] xsds = faultXsd.split(",") ;
+				faultMessages = new ArrayList<Message>();
+				for(String xsd: xsds) {
+					Document doc = YADOMUtil.parseStream(ClassUtil
+						.getResourceAsStream(xsd, ESBContractGenerator.class),
+						false, false);
+					if (doc != null) {
+						addFaultMessage(faultMessages, def, doc.getDocumentElement(),
+							serviceInfo.getFaultName(), "fault", ++nsSuffixCounter);
+					}
+				}
+			} catch (Exception e) {
+				throw new ConfigurationException("File defined in faultXsd attribute '" + serviceConfig.getActions().getFaultXsd() + "' not found in classpath.", e);
+			} 
+
+		}
+
+		PortType portType = addPortType(def, serviceInfo, reqMessage,
+			resMessage, faultMessages);
+		Binding binding = addBinding(def, serviceInfo, portType);
+		addService(def, serviceInfo, binding);
+		StringWriter sw = new java.io.StringWriter();
+		try {
+			getWSDLFactory().newWSDLWriter().writeWSDL(def, sw);
+		} catch (WSDLException e) {
+			new ConfigurationException("Failed to generate wsdl for service:" + serviceConfig.getCategory() + "/" + serviceConfig.getName() , e);
+		}
+		return sw.toString();
+	}
+
+	private static void addSchema(Types types, Element xsdElement) {
+		SchemaImpl schemaImpl = new SchemaImpl();
+		schemaImpl.setElement(xsdElement);
+		schemaImpl.setElementType(XSD_QN);
+		types.addExtensibilityElement(schemaImpl);
+	}
+
+	private static Message addMessage(Definition def, Element element, String msgName, String partName, int nsSuffixCounter) {
+		String schemaNs = YADOMUtil
+				.getAttribute(element, "targetNamespace", "");
+		addSchema(def.getTypes(), element);
+		if (def.getNamespace(schemaNs) == null) {
+			def.addNamespace("ns" + nsSuffixCounter, schemaNs);
+		}
+		// add request message
+		Node node = YADOMUtil.getNode(element, "/schema/element");
+		Message msg = def.createMessage();
+		msg.setQName(new QName(def.getTargetNamespace(), msgName));
+		msg.setUndefined(false);
+		Part part = def.createPart();
+		part.setName(partName);
+		part.setElementName(new QName(schemaNs, YADOMUtil.getAttribute(
+				(Element) node, "name", "")));
+		msg.addPart(part);
+		def.addMessage(msg);
+		return msg;
+	}
+
+	private static void addFaultMessage(final List<Message> faultMessages,
+			Definition def, Element element, String msgName, String partName,
+			int nsSuffixCounter) {
+		String schemaNs = YADOMUtil
+				.getAttribute(element, "targetNamespace", "");
+		addSchema(def.getTypes(), element);
+		if (def.getNamespace(schemaNs) == null) {
+			def.addNamespace("ns" + nsSuffixCounter, schemaNs);
+		}
+		// add request message
+		NodeList nodes = YADOMUtil.getNodeList(element, "/schema/element");
+		for (int i = 0; i < nodes.getLength(); i++) {
+			final int nameIndex = i + 1;
+			Node node = nodes.item(0);
+			Message msg = def.createMessage();
+			msg.setQName(new QName(def.getTargetNamespace(), msgName
+					+ nameIndex));
+			msg.setUndefined(false);
+			Part part = def.createPart();
+			part.setName(partName + nameIndex);
+			part.setElementName(new QName(schemaNs, YADOMUtil.getAttribute(
+					(Element) node, "name", "")));
+			msg.addPart(part);
+			def.addMessage(msg);
+			faultMessages.add(msg);
+		}
+	}
+
+	private static PortType addPortType(Definition def, final ESBServiceEndpointInfo serviceInfo,
+			Message inMessage, Message outMessage, List<Message> faultMessages) {
+		// add port type
+		PortType portType = def.createPortType();
+		portType.setQName(new QName(def.getTargetNamespace(), serviceInfo.getPortName())) ;
+		Operation op = def.createOperation();
+		op.setUndefined(false);
+		op.setName(serviceInfo.getOperationName());
+		if (inMessage != null) {
+			Input in = def.createInput();
+			in.setMessage(inMessage);
+			in.setName(inMessage.getQName().getLocalPart());
+			op.setInput(in);
+		}
+		if (outMessage != null) {
+			Output out = def.createOutput();
+			out.setMessage(outMessage);
+			out.setName(outMessage.getQName().getLocalPart());
+			op.setOutput(out);
+		}
+
+		int count = 1 ;
+		for (Message message : faultMessages) {
+			Fault fault = def.createFault();
+			fault.setMessage(message);
+			fault.setName("fault" + (count++));
+			op.addFault(fault);
+		}
+		portType.addOperation(op);
+		portType.setUndefined(false);
+		def.addPortType(portType);
+		return portType;
+	}
+
+	private static Binding addBinding(Definition def, final ESBServiceEndpointInfo serviceInfo, PortType portType) {
+		// add binding
+		Binding binding = def.createBinding();
+		binding.setUndefined(false);
+		binding.setPortType(portType);
+		binding.setQName(new QName(def.getTargetNamespace(), serviceInfo.getBindingName())) ;
+		SOAPBindingImpl soapBinding = new SOAPBindingImpl();
+		soapBinding.setStyle("document");
+		soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http");
+		binding.addExtensibilityElement(soapBinding);
+
+		BindingOperation bop = def.createBindingOperation();
+
+		bop.setName(serviceInfo.getOperationName());
+		Operation op = (Operation) portType.getOperations().get(0);
+		bop.setOperation(op);
+		if (op.getInput() != null) {
+			BindingInput binput = def.createBindingInput();
+			bop.setBindingInput(binput);
+			SOAPBodyImpl soapBody = new SOAPBodyImpl();
+			soapBody.setUse("literal");
+			binput.addExtensibilityElement(soapBody);
+		}
+		if (op.getOutput() != null) {
+			BindingOutput boutput = def.createBindingOutput();
+			bop.setBindingOutput(boutput);
+			SOAPBodyImpl soapBody = new SOAPBodyImpl();
+			soapBody.setUse("literal");
+			boutput.addExtensibilityElement(soapBody);
+		}
+		final Map faults = op.getFaults() ;
+		if (faults != null) {
+			Iterator iterator = op.getFaults().values().iterator();
+			while (iterator.hasNext()) {
+				Fault fault = (Fault) iterator.next();
+				BindingFault bfault = def.createBindingFault();
+				bfault.setName(fault.getName());
+				bop.addBindingFault(bfault);
+				SOAPFaultImpl soapFault = new SOAPFaultImpl();
+				soapFault.setName(fault.getName());
+				soapFault.setUse("literal");
+				bfault.addExtensibilityElement(soapFault);
+			}
+		}
+		binding.addBindingOperation(bop);
+		def.addBinding(binding);
+		return binding;
+
+	}
+
+	private static void addService(Definition def, final ESBServiceEndpointInfo serviceInfo, Binding binding) {
+		// create service
+		javax.wsdl.Service service = def.createService();
+		service.setQName(new QName(def.getTargetNamespace(), serviceInfo.getServiceName()));
+		javax.wsdl.Port port = def.createPort();
+		port.setBinding(binding);
+		port.setName(serviceInfo.getPortName());
+		SOAPAddressImpl soapAddress = new SOAPAddressImpl();
+		soapAddress.setLocationURI("http://change_this_URI/"+serviceInfo.getServletPath());
+		port.addExtensibilityElement(soapAddress);
+		service.addPort(port);
+		def.addService(service);
+	}
+	
+	private synchronized static WSDLFactory getWSDLFactory()
+	    throws ConfigurationException
+	{
+	    if (wsdlFactory == null)
+	    {
+	        try
+	        {
+	            wsdlFactory = AccessController.doPrivileged(new PrivilegedExceptionAction<WSDLFactory>() {
+	                public WSDLFactory run() throws WSDLException
+	                {
+	                    return WSDLFactory.newInstance();
+	                }
+	            }) ;
+	        }
+	        catch (final PrivilegedActionException pae)
+	        {
+	            throw new ConfigurationException("Failed to instantiate the WSDL factory", pae.getCause()) ;
+	        }
+	    }
+	    return wsdlFactory ;
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,97 +0,0 @@
-package org.jboss.internal.soa.esb.webservice;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
-import org.jboss.soa.esb.Service;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-
-public class ESBServiceContractPublisher implements ContractReferencePublisher {
-	private static String address;
-	private final String endpointName;
-	private final Service service ;
-	private final String description ;
-	
-	public ESBServiceContractPublisher(final Service service, final String description, final String jaxwsEndpoint) {
-		this.service = service ;
-		this.description = description ;
-		endpointName = jaxwsEndpoint;
-	}
-	
-    /**
-     * Get the service represented by this contract configuration.
-     * @return The service.
-     */
-    public Service getService() {
-        return service ;
-    }
-    
-    /**
-     * Get the service description represented by this contract configuration.
-     * @return The service description.
-     */
-    public String getDescription() {
-        return description ;
-    }
-    
-    /**
-     * Get the URI of the service.
-     * @return The service URI.
-     */
-    public URI getServiceURI() {
-        final String address = getEndpointAddress() ;
-        if (address != null) {
-            try {
-                return new URI(address) ;
-            } catch (final URISyntaxException urise) {} // fall through
-        }
-        return null ;
-    }
-    
-    /**
-     * Get the URI of the contract.
-     * @return The contract URI.
-     */
-    public URI getServiceContractURI() {
-        final String address = getEndpointAddress() ;
-        if (address != null) {
-            try {
-                return new URI(address+"?wsdl") ;
-            } catch (final URISyntaxException urise) {} // fall through
-        }
-        return null ;
-    }
-
-	private String getEndpointAddress() {
-		if (address != null) {
-			return address;
-		}
-		
-		SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
-		EndpointRegistryFactory factory = spiProv
-				.getSPI(EndpointRegistryFactory.class);
-		EndpointRegistry registry = factory.getEndpointRegistry();
-		Set<ObjectName> objectNames = registry.getEndpoints();
-
-		for (ObjectName objectName : objectNames) {
-			String endpoint = objectName
-					.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
-
-			if (endpoint != null && endpoint.equals(endpointName)) {
-				Endpoint ep = registry.getEndpoint(objectName);
-				address = ep.getAddress();
-				return  address;
-			}
-		}
-
-		return null;
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceContractPublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,97 @@
+package org.jboss.internal.soa.esb.webservice;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.soa.esb.Service;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+
+public class ESBServiceContractPublisher implements ContractReferencePublisher {
+	private static String address;
+	private final String endpointName;
+	private final Service service ;
+	private final String description ;
+	
+	public ESBServiceContractPublisher(final Service service, final String description, final String jaxwsEndpoint) {
+		this.service = service ;
+		this.description = description ;
+		endpointName = jaxwsEndpoint;
+	}
+	
+    /**
+     * Get the service represented by this contract configuration.
+     * @return The service.
+     */
+    public Service getService() {
+        return service ;
+    }
+    
+    /**
+     * Get the service description represented by this contract configuration.
+     * @return The service description.
+     */
+    public String getDescription() {
+        return description ;
+    }
+    
+    /**
+     * Get the URI of the service.
+     * @return The service URI.
+     */
+    public URI getServiceURI() {
+        final String address = getEndpointAddress() ;
+        if (address != null) {
+            try {
+                return new URI(address) ;
+            } catch (final URISyntaxException urise) {} // fall through
+        }
+        return null ;
+    }
+    
+    /**
+     * Get the URI of the contract.
+     * @return The contract URI.
+     */
+    public URI getServiceContractURI() {
+        final String address = getEndpointAddress() ;
+        if (address != null) {
+            try {
+                return new URI(address+"?wsdl") ;
+            } catch (final URISyntaxException urise) {} // fall through
+        }
+        return null ;
+    }
+
+	private String getEndpointAddress() {
+		if (address != null) {
+			return address;
+		}
+		
+		SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
+		EndpointRegistryFactory factory = spiProv
+				.getSPI(EndpointRegistryFactory.class);
+		EndpointRegistry registry = factory.getEndpointRegistry();
+		Set<ObjectName> objectNames = registry.getEndpoints();
+
+		for (ObjectName objectName : objectNames) {
+			String endpoint = objectName
+					.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+
+			if (endpoint != null && endpoint.equals(endpointName)) {
+				Endpoint ep = registry.getEndpoint(objectName);
+				address = ep.getAddress();
+				return  address;
+			}
+		}
+
+		return null;
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,153 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.webservice;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-
-
-public class ESBServiceEndpointInfo {
-	private static final String DEFAULT_ENCODING ;
-	private static final Logger LOGGER = Logger.getLogger(ESBServiceEndpointInfo.class) ;
-
-	private final String requestName ;
-	private final String responseName ;
-	private final String faultName ;
-	private final String bindingName ;
-	private final String serviceName ;
-	private final String portName ;
-	private final String operationName ;
-	private final String servletName ;
-	private final String servletPath ;
-	private final String wsdlFileName ;
-	private final String packageName ;
-	private final String className ;
-	private final String namespace ;
-	private final boolean isOneWay ;
-	
-	public ESBServiceEndpointInfo(final Service service)
-			throws UnsupportedEncodingException {
-		final String name = service.getName() ;
-		requestName = name + "Req" ;
-		responseName = name + "Res" ;
-		faultName = name + "Fault" ;
-		bindingName = name + "Binding" ;
-		serviceName = name + "Service" ;
-		portName = name + "PortType" ;
-		operationName = name + "Op" ;
-		final String serviceCategory = service.getCategory().replace('/', '_') ;
-		final String serviceCategoryLower = serviceCategory.toLowerCase() ;
-		final String serviceName = service.getName().replace('/', '_') ;
-		final String serviceNameLower = serviceName.toLowerCase() ;
-		servletName = serviceCategory + "_" + serviceName ;
-		servletPath = "/" + serviceCategory + "/" + serviceName ;
-		wsdlFileName = "WEB-INF/wsdl/" + serviceCategoryLower + "_" + serviceNameLower + ".wsdl" ;
-		packageName = "org.jboss.internal.soa.esb.webservice.impl." + serviceCategoryLower + "." + serviceNameLower ;
-		className = packageName + ".Implementation" ;
-		namespace = "http://soa.jboss.org/" + URLEncoder.encode(service.getCategory(), DEFAULT_ENCODING) ;
-		
-		final Actions actions = service.getActions() ;
-		if (actions != null)
-		{
-			isOneWay = MepType.ONE_WAY.equals(actions.getMep()) ;
-		}
-		else
-		{
-			isOneWay = false ;
-		}
-		if (isOneWay && (actions.getFaultXsd() != null))
-		{
-			LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
-		}
-	}
-
-	public String getRequestName() {
-		return requestName ;
-	}
-	
-	public String getResponseName() {
-		return responseName ;
-	}
-	
-	public String getFaultName() {
-		return faultName ;
-	}
-	
-	public String getBindingName() {
-		return bindingName ;
-	}
-	
-	public String getServiceName() {
-		return serviceName ;
-	}
-	
-	public String getPortName() {
-		return portName ;
-	}
-	
-	public String getOperationName() {
-		return operationName ;
-	}
-	
-	public String getServletName() {
-		return servletName ;
-	}
-	
-	public String getServletPath() {
-		return servletPath ;
-	}
-	
-	public String getWSDLFileName() {
-		return wsdlFileName ;
-	}
-	
-	public String getPackageName() {
-		return packageName ;
-	}
-	
-	public String getClassName() {
-		return className ;
-	}
-	
-	public String getNamespace() {
-		return namespace ;
-	}
-	
-	public boolean isOneWay() {
-		return isOneWay ;
-	}
-	
-	static
-	{
-		DEFAULT_ENCODING = AccessController.doPrivileged(new PrivilegedAction<String>() {
-			public String run()
-			{
-				return System.getProperty("file.encoding");
-			}
-		}) ;
-	}
-}
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBServiceEndpointInfo.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.webservice;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+
+
+public class ESBServiceEndpointInfo {
+	private static final String DEFAULT_ENCODING ;
+	private static final Logger LOGGER = Logger.getLogger(ESBServiceEndpointInfo.class) ;
+
+	private final String requestName ;
+	private final String responseName ;
+	private final String faultName ;
+	private final String bindingName ;
+	private final String serviceName ;
+	private final String portName ;
+	private final String operationName ;
+	private final String servletName ;
+	private final String servletPath ;
+	private final String wsdlFileName ;
+	private final String packageName ;
+	private final String className ;
+	private final String namespace ;
+	private final boolean isOneWay ;
+	
+	public ESBServiceEndpointInfo(final Service service)
+			throws UnsupportedEncodingException {
+		final String name = service.getName() ;
+		requestName = name + "Req" ;
+		responseName = name + "Res" ;
+		faultName = name + "Fault" ;
+		bindingName = name + "Binding" ;
+		serviceName = name + "Service" ;
+		portName = name + "PortType" ;
+		operationName = name + "Op" ;
+		final String serviceCategory = service.getCategory().replace('/', '_') ;
+		final String serviceCategoryLower = serviceCategory.toLowerCase() ;
+		final String serviceName = service.getName().replace('/', '_') ;
+		final String serviceNameLower = serviceName.toLowerCase() ;
+		servletName = serviceCategory + "_" + serviceName ;
+		servletPath = "/" + serviceCategory + "/" + serviceName ;
+		wsdlFileName = "WEB-INF/wsdl/" + serviceCategoryLower + "_" + serviceNameLower + ".wsdl" ;
+		packageName = "org.jboss.internal.soa.esb.webservice.impl." + serviceCategoryLower + "." + serviceNameLower ;
+		className = packageName + ".Implementation" ;
+		namespace = "http://soa.jboss.org/" + URLEncoder.encode(service.getCategory(), DEFAULT_ENCODING) ;
+		
+		final Actions actions = service.getActions() ;
+		if (actions != null)
+		{
+			isOneWay = MepType.ONE_WAY.equals(actions.getMep()) ;
+		}
+		else
+		{
+			isOneWay = false ;
+		}
+		if (isOneWay && (actions.getFaultXsd() != null))
+		{
+			LOGGER.warn("Fault schemas ignored for OneWay service " + serviceCategory + ":" + serviceName) ;
+		}
+	}
+
+	public String getRequestName() {
+		return requestName ;
+	}
+	
+	public String getResponseName() {
+		return responseName ;
+	}
+	
+	public String getFaultName() {
+		return faultName ;
+	}
+	
+	public String getBindingName() {
+		return bindingName ;
+	}
+	
+	public String getServiceName() {
+		return serviceName ;
+	}
+	
+	public String getPortName() {
+		return portName ;
+	}
+	
+	public String getOperationName() {
+		return operationName ;
+	}
+	
+	public String getServletName() {
+		return servletName ;
+	}
+	
+	public String getServletPath() {
+		return servletPath ;
+	}
+	
+	public String getWSDLFileName() {
+		return wsdlFileName ;
+	}
+	
+	public String getPackageName() {
+		return packageName ;
+	}
+	
+	public String getClassName() {
+		return className ;
+	}
+	
+	public String getNamespace() {
+		return namespace ;
+	}
+	
+	public boolean isOneWay() {
+		return isOneWay ;
+	}
+	
+	static
+	{
+		DEFAULT_ENCODING = AccessController.doPrivileged(new PrivilegedAction<String>() {
+			public String run()
+			{
+				return System.getProperty("file.encoding");
+			}
+		}) ;
+	}
+}
\ No newline at end of file

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.webservice;
-
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.CtConstructor;
-import javassist.LoaderClassPath;
-import javassist.NotFoundException;
-import javassist.bytecode.AnnotationsAttribute;
-import javassist.bytecode.ConstPool;
-import javassist.bytecode.SignatureAttribute;
-import javassist.bytecode.annotation.Annotation;
-import javassist.bytecode.annotation.EnumMemberValue;
-import javassist.bytecode.annotation.StringMemberValue;
-
-public class JAXWSProviderClassGenerator {
-	private final ClassPool pool ;
-	private final CtClass oneWaySuperClass ;
-	private final CtClass requestResponseSuperClass ;
-	
-	public JAXWSProviderClassGenerator()
-			throws WebServicePublishException {
-		pool = new ClassPool() ;
-		final ClassLoader tccl = Thread.currentThread().getContextClassLoader() ;
-		if (tccl != null)
-		{
-			pool.appendClassPath(new LoaderClassPath(tccl)) ;
-		}
-		pool.appendClassPath(new LoaderClassPath(JAXWSProviderClassGenerator.class.getClassLoader())) ;
-		try {
-			oneWaySuperClass = pool.get(OneWayBaseWebService.class.getName());
-			requestResponseSuperClass = pool.get(RequestResponseBaseWebService.class.getName()) ;
-		} catch (final NotFoundException nfe) {
-			throw new WebServicePublishException("Failed to obtain superclasses", nfe) ;
-		}
-	}
-	
-	public byte[] generate(final String category, final String service, final ESBServiceEndpointInfo epInfo)
-			throws WebServicePublishException {
-		try {
-			pool.get(epInfo.getClassName());
-			throw new WebServicePublishException("Duplicate class within context: " + epInfo.getClassName()) ;
-		} catch (final NotFoundException nfe) {} // ignore
-		
-		final CtClass seiClass = pool.makeClass(epInfo.getClassName());
-
-		try {
-			if (epInfo.isOneWay())
-			{
-				seiClass.setSuperclass(oneWaySuperClass) ;
-			}
-			else
-			{
-				seiClass.setSuperclass(requestResponseSuperClass) ;
-			}
-			
-			CtClass providerClass = pool.get("javax.xml.ws.Provider");
-			seiClass.setInterfaces(new CtClass[] { providerClass });
-
-			ConstPool constantPool = seiClass.getClassFile().getConstPool();
-			AnnotationsAttribute attribute = new AnnotationsAttribute(
-					constantPool, AnnotationsAttribute.visibleTag);
-			Annotation annotation = new Annotation(
-					"javax.xml.ws.WebServiceProvider", constantPool);
-			StringMemberValue strValue1 = new StringMemberValue(constantPool);
-			strValue1.setValue(epInfo.getWSDLFileName());
-			annotation.addMemberValue("wsdlLocation", strValue1);
-			StringMemberValue strValue2 = new StringMemberValue(constantPool);
-			strValue2.setValue(epInfo.getServiceName());
-			annotation.addMemberValue("serviceName", strValue2);
-			StringMemberValue strValue3 = new StringMemberValue(constantPool);
-			strValue3.setValue(epInfo.getPortName());
-			annotation.addMemberValue("portName", strValue3);
-
-			StringMemberValue strValue4 = new StringMemberValue(constantPool);
-			strValue4.setValue(epInfo.getNamespace());
-			annotation.addMemberValue("targetNamespace", strValue4);
-
-			attribute.addAnnotation(annotation);
-
-			Annotation annotation2 = new Annotation("javax.xml.ws.ServiceMode",
-					constantPool);
-			EnumMemberValue enumValue = new EnumMemberValue(constantPool);
-			enumValue.setType("javax.xml.ws.Service$Mode");
-			enumValue.setValue("MESSAGE");
-			annotation2.addMemberValue("value", enumValue);
-			attribute.addAnnotation(annotation2);
-			
-			final Annotation handlerChainAnnotation = new Annotation("javax.jws.HandlerChain", constantPool) ;
-			final StringMemberValue handlerValue = new StringMemberValue(constantPool) ;
-			handlerValue.setValue("esb-jaxws-handlers.xml") ;
-			handlerChainAnnotation.addMemberValue("file", handlerValue) ;
-			attribute.addAnnotation(handlerChainAnnotation) ;
-			
-			seiClass.getClassFile().addAttribute(attribute);
-			
-			final String constructorStr = "super(\"" + category + "\"," + "\""  + service + "\");";
-			CtConstructor defaultConstructor = new CtConstructor(null, seiClass) ;
-			defaultConstructor.setBody(constructorStr) ;
-			seiClass.addConstructor(defaultConstructor) ;
-			
-			// add generics for class
-			SignatureAttribute signatureAttribute = new SignatureAttribute(
-					seiClass.getClassFile().getConstPool(),
-					"Ljava/lang/Object;Ljavax/xml/ws/Provider<Ljavax/xml/soap/SOAPMessage;>;");
-			seiClass.getClassFile().addAttribute(signatureAttribute);
-			
-			return seiClass.toBytecode();
-		} catch (Exception e) {
-
-			throw new WebServicePublishException(
-					"Failed to generate jaxws dispatch class for ESB service",
-					e);
-		}
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/JAXWSProviderClassGenerator.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.webservice;
+
+import javassist.ClassPool;
+import javassist.CtClass;
+import javassist.CtConstructor;
+import javassist.LoaderClassPath;
+import javassist.NotFoundException;
+import javassist.bytecode.AnnotationsAttribute;
+import javassist.bytecode.ConstPool;
+import javassist.bytecode.SignatureAttribute;
+import javassist.bytecode.annotation.Annotation;
+import javassist.bytecode.annotation.EnumMemberValue;
+import javassist.bytecode.annotation.StringMemberValue;
+
+public class JAXWSProviderClassGenerator {
+	private final ClassPool pool ;
+	private final CtClass oneWaySuperClass ;
+	private final CtClass requestResponseSuperClass ;
+	
+	public JAXWSProviderClassGenerator()
+			throws WebServicePublishException {
+		pool = new ClassPool() ;
+		final ClassLoader tccl = Thread.currentThread().getContextClassLoader() ;
+		if (tccl != null)
+		{
+			pool.appendClassPath(new LoaderClassPath(tccl)) ;
+		}
+		pool.appendClassPath(new LoaderClassPath(JAXWSProviderClassGenerator.class.getClassLoader())) ;
+		try {
+			oneWaySuperClass = pool.get(OneWayBaseWebService.class.getName());
+			requestResponseSuperClass = pool.get(RequestResponseBaseWebService.class.getName()) ;
+		} catch (final NotFoundException nfe) {
+			throw new WebServicePublishException("Failed to obtain superclasses", nfe) ;
+		}
+	}
+	
+	public byte[] generate(final String category, final String service, final ESBServiceEndpointInfo epInfo, final boolean includeHandlers)
+			throws WebServicePublishException {
+		try {
+			pool.get(epInfo.getClassName());
+			throw new WebServicePublishException("Duplicate class within context: " + epInfo.getClassName()) ;
+		} catch (final NotFoundException nfe) {} // ignore
+		
+		final CtClass seiClass = pool.makeClass(epInfo.getClassName());
+
+		try {
+			if (epInfo.isOneWay())
+			{
+				seiClass.setSuperclass(oneWaySuperClass) ;
+			}
+			else
+			{
+				seiClass.setSuperclass(requestResponseSuperClass) ;
+			}
+			
+			CtClass providerClass = pool.get("javax.xml.ws.Provider");
+			seiClass.setInterfaces(new CtClass[] { providerClass });
+
+			ConstPool constantPool = seiClass.getClassFile().getConstPool();
+			AnnotationsAttribute attribute = new AnnotationsAttribute(
+					constantPool, AnnotationsAttribute.visibleTag);
+			Annotation annotation = new Annotation(
+					"javax.xml.ws.WebServiceProvider", constantPool);
+			StringMemberValue strValue1 = new StringMemberValue(constantPool);
+			strValue1.setValue(epInfo.getWSDLFileName());
+			annotation.addMemberValue("wsdlLocation", strValue1);
+			StringMemberValue strValue2 = new StringMemberValue(constantPool);
+			strValue2.setValue(epInfo.getServiceName());
+			annotation.addMemberValue("serviceName", strValue2);
+			StringMemberValue strValue3 = new StringMemberValue(constantPool);
+			strValue3.setValue(epInfo.getPortName());
+			annotation.addMemberValue("portName", strValue3);
+
+			StringMemberValue strValue4 = new StringMemberValue(constantPool);
+			strValue4.setValue(epInfo.getNamespace());
+			annotation.addMemberValue("targetNamespace", strValue4);
+
+			attribute.addAnnotation(annotation);
+
+			Annotation annotation2 = new Annotation("javax.xml.ws.ServiceMode",
+					constantPool);
+			EnumMemberValue enumValue = new EnumMemberValue(constantPool);
+			enumValue.setType("javax.xml.ws.Service$Mode");
+			enumValue.setValue("MESSAGE");
+			annotation2.addMemberValue("value", enumValue);
+			attribute.addAnnotation(annotation2);
+			
+			if (includeHandlers)
+			{
+				final Annotation handlerChainAnnotation = new Annotation("javax.jws.HandlerChain", constantPool) ;
+				final StringMemberValue handlerValue = new StringMemberValue(constantPool) ;
+				handlerValue.setValue("esb-jaxws-handlers.xml") ;
+				handlerChainAnnotation.addMemberValue("file", handlerValue) ;
+				attribute.addAnnotation(handlerChainAnnotation) ;
+			}
+			
+			seiClass.getClassFile().addAttribute(attribute);
+			
+			final String constructorStr = "super(\"" + category + "\"," + "\""  + service + "\");";
+			CtConstructor defaultConstructor = new CtConstructor(null, seiClass) ;
+			defaultConstructor.setBody(constructorStr) ;
+			seiClass.addConstructor(defaultConstructor) ;
+			
+			// add generics for class
+			SignatureAttribute signatureAttribute = new SignatureAttribute(
+					seiClass.getClassFile().getConstPool(),
+					"Ljava/lang/Object;Ljavax/xml/ws/Provider<Ljavax/xml/soap/SOAPMessage;>;");
+			seiClass.getClassFile().addAttribute(signatureAttribute);
+			
+			return seiClass.toBytecode();
+		} catch (Exception e) {
+
+			throw new WebServicePublishException(
+					"Failed to generate jaxws dispatch class for ESB service",
+					e);
+		}
+	}
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,46 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.internal.soa.esb.webservice;
-
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * This is the base class for a OneWay SOAP message
- * @author kevin
- */
-public class OneWayBaseWebService extends BaseWebService
-{
-    protected OneWayBaseWebService(final String category, final String name)
-        throws MessageDeliverException
-    {
-        super(category, name) ;
-    }
-    
-    @Override
-    protected Message deliverMessage(final Message request)
-        throws Exception
-    {
-        serviceInvoker.deliverAsync(request) ;
-        return null ;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/OneWayBaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.internal.soa.esb.webservice;
+
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * This is the base class for a OneWay SOAP message
+ * @author kevin
+ */
+public class OneWayBaseWebService extends BaseWebService
+{
+    protected OneWayBaseWebService(final String category, final String name)
+        throws MessageDeliverException
+    {
+        super(category, name) ;
+    }
+    
+    @Override
+    protected Message deliverMessage(final Message request)
+        throws Exception
+    {
+        serviceInvoker.deliverAsync(request) ;
+        return null ;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,74 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.internal.soa.esb.webservice;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-import com.arjuna.common.util.propertyservice.PropertyManager;
-
-
-/**
- * This is the base class for a RequestResponse SOAP message
- * @author kevin
- */
-public class RequestResponseBaseWebService extends BaseWebService
-{
-    private static final long DEFAULT_TIMEOUT = 30000L ;
-    private static final long TIMEOUT ;
-    private static final Logger LOGGER = Logger.getLogger(RequestResponseBaseWebService.class) ;
-    
-    protected RequestResponseBaseWebService(final String category, final String name)
-        throws MessageDeliverException
-    {
-        super(category, name) ;
-    }
-    
-    @Override
-    protected Message deliverMessage(final Message request)
-            throws Exception
-    {
-        return serviceInvoker.deliverSync(request, TIMEOUT);
-    }
-    
-    static
-    {
-        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE) ;
-        final String timeoutVal = propertyManager.getProperty(Environment.WS_TIMEOUT);
-        long timeout = DEFAULT_TIMEOUT ;
-        if (timeoutVal != null)
-        {
-            try
-            {
-                timeout = Long.parseLong(timeoutVal) ;
-            }
-            catch (final NumberFormatException nfe)
-            {
-                LOGGER.warn("Failed to parse specified timeout: " + timeoutVal, nfe) ;
-            }
-        }
-        TIMEOUT = timeout ;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/RequestResponseBaseWebService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.internal.soa.esb.webservice;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+
+/**
+ * This is the base class for a RequestResponse SOAP message
+ * @author kevin
+ */
+public class RequestResponseBaseWebService extends BaseWebService
+{
+    private static final long DEFAULT_TIMEOUT = 30000L ;
+    private static final long TIMEOUT ;
+    private static final Logger LOGGER = Logger.getLogger(RequestResponseBaseWebService.class) ;
+    
+    protected RequestResponseBaseWebService(final String category, final String name)
+        throws MessageDeliverException
+    {
+        super(category, name) ;
+    }
+    
+    @Override
+    protected Message deliverMessage(final Message request)
+            throws Exception
+    {
+        return serviceInvoker.deliverSync(request, TIMEOUT);
+    }
+    
+    static
+    {
+        final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE) ;
+        final String timeoutVal = propertyManager.getProperty(Environment.WS_TIMEOUT);
+        long timeout = DEFAULT_TIMEOUT ;
+        if (timeoutVal != null)
+        {
+            try
+            {
+                timeout = Long.parseLong(timeoutVal) ;
+            }
+            catch (final NumberFormatException nfe)
+            {
+                LOGGER.warn("Failed to parse specified timeout: " + timeoutVal, nfe) ;
+            }
+        }
+        TIMEOUT = timeout ;
+    }
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.webservice;
-
-public class WebServicePublishException extends Exception {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * Public constructor.
-     * @param message Exception message.
-     */
-    public WebServicePublishException(String message) {
-        super(message);
-    }
-
-    /**
-     * Public constructor.
-     * @param message Exception message.
-     * @param cause Exception cause.
-     */
-    public WebServicePublishException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Public constructor.
-     * @param cause Exception cause.
-     */
-    public WebServicePublishException(Throwable cause) {
-        super(cause);
-    }
-
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/WebServicePublishException.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.webservice;
+
+public class WebServicePublishException extends Exception {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Public constructor.
+     * @param message Exception message.
+     */
+    public WebServicePublishException(String message) {
+        super(message);
+    }
+
+    /**
+     * Public constructor.
+     * @param message Exception message.
+     * @param cause Exception cause.
+     */
+    public WebServicePublishException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Public constructor.
+     * @param cause Exception cause.
+     */
+    public WebServicePublishException(Throwable cause) {
+        super(cause);
+    }
+
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/ActionProcessingDetailFaultException.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/soa/esb/actions/ActionProcessingDetailFaultException.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/ActionProcessingDetailFaultException.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/actions/ActionProcessingDetailFaultException.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.actions;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.esb.listeners.message.errors.Factory;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Fault;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+
+/**
+ * Exception used to specify SOAP code/reason/detail equivalents in a fault.
+ * 
+ * @author <href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class ActionProcessingDetailFaultException extends ActionProcessingFaultException
+{
+    /**
+     * The serial version UID for this class.
+     */
+    private static final long serialVersionUID = -2402515550073037696L ;
+
+    public ActionProcessingDetailFaultException(final QName code, final String description, final String detail)
+    {
+        this(code, description, detail, null) ;
+    }
+    
+    public ActionProcessingDetailFaultException(final QName code, final String description, final String detail, final Throwable th)
+    {
+        super(getFaultMessage(code, description, detail, th), description) ;
+    }
+    
+    private static Message getFaultMessage(final QName code, final String description, final String detail, final Throwable th)
+    {
+        final Message message = MessageFactory.getInstance().getMessage() ;
+        final Body body = message.getBody() ;
+        final Fault fault = message.getFault() ;
+        if (th != null)
+        {
+            fault.setCause(th);
+            fault.setReason(th.toString()) ;
+        }
+        fault.setCode(URI.create(Factory.PROCESSING_ERROR)) ;
+        
+        body.add(Fault.DETAIL_CODE_CONTENT, code) ;
+        if (description != null)
+        {
+            body.add(Fault.DETAIL_DESCRIPTION_CONTENT, description) ;
+        }
+        if (detail != null)
+        {
+            body.add(Fault.DETAIL_DETAIL_CONTENT, detail) ;
+        }
+        fault.setReason(description) ;
+        
+        return message ;
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -55,6 +55,8 @@
 	public static final String JMS_CONNECTION_POOL_SIZE = "org.jboss.soa.esb.jms.connectionPool";
 	public static final String JMS_SESSION_SLEEP        = "org.jboss.soa.esb.jms.sessionSleep";
 	
+	public static final String WS_RETURN_STACK_TRACE = "org.jboss.soa.esb.ws.returnStackTrace";
+	public static final String WS_TIMEOUT = "org.jboss.soa.esb.ws.timeout" ;
 	/*
 	 * Core properties
 	 */

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -64,7 +64,12 @@
 	public static final String DEPLOYMENT_NAME_TAG 			= "deployment";
 	
 	/** ActionProcessingPipeline */
-    public static final String MEP_ATTRIBUTE_TAG                    = "mep";
+    public static final String MEP_ATTRIBUTE_TAG            = "mep";
+    public static final String IN_XSD_ATTRIBUTE_TAG         = "inXsd";
+    public static final String OUT_XSD_ATTRIBUTE_TAG        = "outXsd";
+    public static final String FAULT_XSD_ATTRIBUTE_TAG      = "faultXsd";
+    public static final String VALIDATE_ATTRIBUTE_TAG       = "validate";
+    public static final String WEBSERVICE_ATTRIBUTE_TAG     = "webservice";
     public static final String ACTION_ELEMENT_TAG		    = "action";
     public static final String ACTION_CLASS_TAG			    = "class";
     public static final String PROCESS_METHOD_TAG		    = "process";

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/Configuration.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -31,6 +31,7 @@
 import javax.management.ObjectName;
 import javax.xml.transform.stream.StreamSource;
 
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.listeners.LifecycleUtil;
@@ -78,6 +79,11 @@
    
    public static ManagedLifecycleController create(String configXml, ObjectName serviceName)
    {
+       return create(configXml, serviceName, null) ;
+   }
+   
+   public static ManagedLifecycleController create(final String configXml, final ObjectName serviceName, final List<ContractReferencePublisher> publishers)
+   {
       InputStream validationInputStream = ClassUtil.getResourceAsStream(JBOSSESB_XSD, Configuration.class);
       //if this fails try using the
       if (validationInputStream == null)
@@ -118,7 +124,7 @@
 
              // In parallel, create a map of the contract publication info...
              ServicePublisher.addServicePublishers(controller, generator.getModel());
-
+             ServicePublisher.addContractReferencePublishers(controller, publishers) ;
             return controller;
          }
          else

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -21,30 +21,38 @@
 */
 package org.jboss.soa.esb.listeners.config;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
 
 import org.jboss.deployment.DeploymentException;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.deployment.SubDeployer;
 import org.jboss.deployment.SubDeployerSupport;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
 import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.jboss.internal.soa.esb.webservice.ESBContractGenerator;
+import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
+import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
+import org.jboss.internal.soa.esb.webservice.JAXWSProviderClassGenerator;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.MetaData;
 import org.jboss.metadata.XmlFileLoader;
@@ -52,14 +60,20 @@
 import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.mx.util.ObjectNameConverter;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.JbossesbDocument;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.WebserviceType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.JbossesbDocument.Jbossesb;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServicesDocument.Services;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.WebserviceType.Enum;
 import org.jboss.soa.esb.util.ClassUtil;
-import org.jboss.soa.esb.util.XPathNamespaceContext;
 import org.jboss.system.ServiceControllerMBean;
+import org.jboss.system.server.ServerConfig;
+import org.jboss.system.server.ServerConfigLocator;
 import org.jboss.web.AbstractWebContainer;
 import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
 
 /**
  * comment
@@ -74,10 +88,27 @@
 
    private ServiceControllerMBean serviceController;
    private Properties actionArtifactProperties;
+   private final File esbWarFiles ;
+   private final Set<String> esbNames = new HashSet<String>() ;
    
    private static final String PREFIX_CANONICAL_NAME = "jboss.esb:deployment=" ;
    private static final String ESB_ARTIFACT_NAME = "jbossesb.esb" ;
    
+   private final String HANDLER_CHAIN_PREFIX = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+       "<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
+       " xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd\">" +
+           "<handler-chain><protocol-bindings>##SOAP11_HTTP</protocol-bindings>" ;
+   private final String HANDLER_CHAIN_POSTFIX = "</handler-chain></handler-chains>" ;
+   private final String HANDLER_PREFIX = "<handler><handler-name>" ;
+   private final String HANDLER_MIDDLE = "</handler-name><handler-class>" ;
+   private final String HANDLER_POSTFIX = "</handler-class></handler>" ;
+   
+   private final String WSADDR_NAME = "WSAddressing Handler" ;
+   private final String WSADDR_HANDLER = "org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler" ;
+   
+   private final String WSSEC_NAME = "WSSecurity Handler" ;
+   private final String WSSEC_HANDLER = "org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer" ;
+   
    /**
     * Default CTOR used to set default values to the Suffixes and RelativeOrder
     * attributes. Those are read at subdeployer registration time by the MainDeployer
@@ -87,8 +118,11 @@
    {
       setSuffixes(new String[]{".esb"});
       setRelativeOrder(1000); // before old EJB 2.1 deployer
+      final ServerConfig config = ServerConfigLocator.locate();
+      esbWarFiles = new File(config.getServerTempDeployDir(), "esbwarfiles") ;
+      esbWarFiles.mkdirs() ;
    }
-
+   
    public static boolean hasFile(DeploymentInfo di, String filePath)
    {
       String urlStr = di.url.getFile();
@@ -223,6 +257,57 @@
                in.close();
             }
          }
+         
+         final URL document = getDocumentUrl(di);
+         
+         if (document == null)
+         {
+            throw new DeploymentException("Unable to find document url of META-INF/jboss-esb.xml in: "
+                    + di.url);
+         }
+         final InputStream inputStream = document.openStream();
+         final String jbossEsbXml ;
+         try
+         {
+             final StringWriter sw = new StringWriter() ;
+             XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(inputStream),
+                 XMLHelper.getXMLStreamWriter(sw)) ;
+             jbossEsbXml = sw.toString();
+         }
+         finally
+         {
+             inputStream.close();
+         }
+         
+         final Set<ObjectName> deps = new HashSet<ObjectName>();
+         final Jbossesb jbossEsb = getJbossEsb(jbossEsbXml) ;
+         addActionDependencies(di.shortName, jbossEsb, deps) ;
+         
+         JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
+         
+         final String deploymentName = getDeploymentName(deployment) ;
+         di.context.put(JBoss4ESBDeploymentMetaData.class, new JBoss4ESBDeploymentMetaData(deployment, deploymentName, deps)) ;
+         // invoke super-class initialization
+         super.init(di);
+         // create webservice WAR
+         final ClassLoader origCL = Thread.currentThread().getContextClassLoader() ;
+         final List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>() ;
+         final File warFile ;
+         try
+         {
+             Thread.currentThread().setContextClassLoader(di.localCl) ;
+             warFile = createWebserviceWars(di.shortName, jbossEsb, deploymentName, publishers) ;
+         }
+         finally
+         {
+             Thread.currentThread().setContextClassLoader(origCL) ;
+         }
+         if (warFile != null)
+         {
+             deployment.setPublishers(publishers) ;
+             final URL warFileURL = warFile.toURL() ;
+             deployUrl(di, warFileURL, warFile.getName()) ;
+         }
       }
       catch (Exception e)
       {
@@ -232,24 +317,15 @@
          }
          throw new DeploymentException("failed to initialize", e);
       }
-
-      // invoke super-class initialization
-      super.init(di);
    }
 
    public synchronized void create(DeploymentInfo di) throws DeploymentException
    {
       log.info("create esb service, " + di.shortName);
-      URL document = getDocumentUrl(di);
-      
-      if (document == null)
-      {
-         throw new DeploymentException("Unable to find document url of META-INF/jboss-esb.xml in: "
-                 + di.url);
-      }
       try
       {
-         Set<ObjectName> deps = new HashSet<ObjectName>();
+         final JBoss4ESBDeploymentMetaData metaData = (JBoss4ESBDeploymentMetaData)di.context.get(JBoss4ESBDeploymentMetaData.class) ;
+         final Set<ObjectName> deps = metaData.getDependencies() ;
          InputStream in = di.localCl.getResourceAsStream("META-INF/deployment.xml");
          if (in != null)
          {
@@ -317,34 +393,16 @@
             }
          }
 
-         final InputStream inputStream = document.openStream();
-         final String jbossEsbXml ;
-         try
-         {
-             final StringWriter sw = new StringWriter() ;
-             XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(inputStream),
-                 XMLHelper.getXMLStreamWriter(sw)) ;
-             jbossEsbXml = sw.toString();
-         }
-         finally
-         {
-             inputStream.close();
-         }
-         
-         addActionDependencies(di.shortName, jbossEsbXml, deps) ;
-         
-         JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
-         deployment.setClassloader(di.ucl);
-         String name = PREFIX_CANONICAL_NAME + di.shortName;
+         String name = PREFIX_CANONICAL_NAME + metaData.getDeploymentName();
          ObjectName on = ObjectNameConverter.convert(name);
          // Check that the name is not registered
          if (server.isRegistered(on) == true)
          {
-            log.debug("The ESBModule name: " + name
-                      + "is already registered, adding uid=" + System.identityHashCode(deployment));
-            name = name + ",uid=" + System.identityHashCode(deployment);
-            on = ObjectNameConverter.convert(name);
+            throw new DeploymentException("Duplicate registration for " + name) ;
          }
+         
+         final JBoss4ESBDeployment deployment = metaData.getDeployment() ;
+         deployment.setClassloader(di.ucl);
          server.registerMBean(deployment, on);
          di.deployedObject = on;
          log.debug("Deploying: " + di.url);
@@ -359,44 +417,42 @@
       super.create(di);
    }
 
+   private Jbossesb getJbossEsb(final String configuration)
+       throws DeploymentException
+   {
+       try
+       {
+           final StringReader sr = new StringReader(configuration) ;
+           return JbossesbDocument.Factory.parse(sr).getJbossesb() ;
+       }
+       catch (final Exception ex)
+       {
+           throw new DeploymentException("Failed to parse jboss-esb.xml", ex) ;
+       }
+   }
+   
    private void addActionDependencies(final String deploymentName,
-      final String configuration, final Set<ObjectName> deps)
-      throws XPathExpressionException, DeploymentException, MalformedObjectNameException
+      final Jbossesb jbossEsb, final Set<ObjectName> deps)
+      throws MalformedObjectNameException
    {
-      final XmlFileLoader xfl = new XmlFileLoader() ;
-      final StringReader sr = new StringReader(configuration) ;
-      final InputSource is = new InputSource(sr) ;
-      final Element rootElement = xfl.getDocument(is, "META-INF/jboss-esb.xml").getDocumentElement() ;
-
       final Set<String> artifacts = new HashSet<String>() ;
       artifacts.add(ESB_ARTIFACT_NAME) ;
 
-      final String namespaceURI = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" ;
-      
-      final XPath xpathEvaluater = XPathFactory.newInstance().newXPath();
-      final XPathNamespaceContext namespaceContext = new XPathNamespaceContext() ;
-      namespaceContext.setMapping("jbesb", namespaceURI) ;
-      xpathEvaluater.setNamespaceContext(namespaceContext) ;
-
-      final NodeList actionList = (NodeList) xpathEvaluater.evaluate("/jbesb:jbossesb/jbesb:services/jbesb:service/jbesb:actions/jbesb:action",
-              rootElement, XPathConstants.NODESET) ; 
-      final int numActions = actionList.getLength() ;
-      if (numActions > 0)
+      final Services services = jbossEsb.getServices() ;
+      if (services != null)
       {
           final Set<String> actionClasses = new HashSet<String>() ;
-          for(int count = 0 ; count < numActions ; count++)
+          
+          for(final Service service : services.getServiceList())
           {
-              final Node actionNode = actionList.item(count) ;
-              if (!(actionNode instanceof Element))
+              final Actions actions = service.getActions() ;
+              if (actions != null)
               {
-                  log.warn("Action node is not an element: " + actionNode) ;
+                  for (final Action action: actions.getActionList())
+                  {
+                      actionClasses.add(action.getClass1()) ;
+                  }
               }
-              else
-              {
-                  final Element actionElement = (Element)actionNode ;
-                  final String actionClass = actionElement.getAttribute("class") ;
-                  actionClasses.add(actionClass) ;
-              }
           }
           
           final int numActionClasses = actionClasses.size() ;
@@ -423,7 +479,120 @@
           }
       }
    }
+   
+   private File createWebserviceWars(final String esbName, final Jbossesb jbossEsb, final String deploymentName,
+       final List<ContractReferencePublisher> publishers)
+       throws DeploymentException
+   {
+       final Services services = jbossEsb.getServices() ;
+       if (services != null)
+       {
+           final List<Service> endpointServices = new ArrayList<Service>() ;
+           for(final Service service : jbossEsb.getServices().getServiceList())
+           {
+               final Actions actions = service.getActions() ;
+               if (actions != null)
+               {
+                   if (!WebserviceType.DISABLED.equals(actions.getWebservice()))
+                   {
+                       final String inXsd = actions.getInXsd() ;
+                       if (inXsd != null)
+                       {
+                           endpointServices.add(service) ;
+                       }
+                   }
+               }
+           }
+           
+           if (endpointServices.size() > 0)
+           {
+               final StringWriter servletDefinition = new StringWriter() ;
+               final StringWriter servletMapping = new StringWriter() ;
+               
+               final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+               final ZipOutputStream zos = new ZipOutputStream(baos) ;
+               zos.setComment("ESB war file for exposing webservices: " + esbName) ;
+               try
+               {
+                   final JAXWSProviderClassGenerator generator = new JAXWSProviderClassGenerator() ;
+                   
+                   for(Service service: endpointServices)
+                   {
+                       final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(service) ;
+                       final String wsdl = ESBContractGenerator.generateWSDL(service, serviceInfo) ;
+                       addFile(zos, serviceInfo.getWSDLFileName(), wsdl) ;
+                       
+                       final String handlers = getHandlers(service.getActions().getWebservice()) ;
+                       final boolean includeHandlers = (handlers != null) ;
+                       if (includeHandlers)
+                       {
+                           final String wsHandlerName = "WEB-INF/classes/" + serviceInfo.getPackageName().replace('.', '/') + "/esb-jaxws-handlers.xml" ;
+                           addFile(zos, wsHandlerName, handlers) ;
+                       }
+                       
+                       final byte[] wsClass = generator.generate(service.getCategory(),
+                           service.getName(), serviceInfo, includeHandlers) ;
+                       final String wsClassName = serviceInfo.getClassName().replace('.', '/') + ".class" ;
+                       addFile(zos, "WEB-INF/classes/" + wsClassName, wsClass) ;
+                       
+                       servletDefinition.append("<servlet><servlet-name>") ;
+                       servletDefinition.append(serviceInfo.getServletName())  ;
+                       servletDefinition.append("</servlet-name><servlet-class>") ;
+                       servletDefinition.append(serviceInfo.getClassName()) ;
+                       servletDefinition.append("</servlet-class></servlet>") ;
+                       
+                       servletMapping.append("<servlet-mapping><servlet-name>") ;
+                       servletMapping.append(serviceInfo.getServletName())  ;
+                       servletMapping.append("</servlet-name><url-pattern>") ;
+                       servletMapping.append(serviceInfo.getServletPath()) ;
+                       servletMapping.append("</url-pattern></servlet-mapping>") ;
+                       
+                       final org.jboss.soa.esb.Service esbService = new org.jboss.soa.esb.Service(service.getCategory(), service.getName()) ;
+                       final ContractReferencePublisher publisher = new ESBServiceContractPublisher(esbService, service.getDescription(), serviceInfo.getServletName()) ;
+                       publishers.add(publisher) ;
+                   }
+                   
+                   final StringWriter webXml = new StringWriter() ;
+                   webXml.append("<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"") ;
+                   webXml.append(" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\" version=\"2.4\">") ;
+                   webXml.append(servletDefinition.getBuffer()) ;
+                   webXml.append(servletMapping.getBuffer()) ;
+                   webXml.append("</web-app>") ;
+                   
+                   addFile(zos, "WEB-INF/web.xml", webXml.toString()) ;
+                   zos.close() ;
+                   
+                   final File warFile = getESBWarFile(deploymentName, esbName, true) ;
+                   
+                   final FileOutputStream fos = new FileOutputStream(warFile) ;
+                   fos.write(baos.toByteArray()) ;
+                   fos.close() ;
+                   return warFile ;
+               }
+               catch (final Exception ex)
+               {
+                   throw new DeploymentException("Failed to create webservice artifact", ex) ;
+               }
+           }
+       }
+       return null ;
+   }
 
+   private void addFile(final ZipOutputStream zos, final String filename, final String contents)
+       throws IOException
+   {
+       addFile(zos, filename, contents.getBytes()) ;
+   }
+   
+   private void addFile(final ZipOutputStream zos, final String filename, final byte[] contents)
+       throws IOException
+   {
+       final ZipEntry entry = new ZipEntry(filename) ;
+       zos.putNextEntry(entry) ;
+       zos.write(contents) ;
+       zos.closeEntry() ;
+   }
+
    public synchronized void start(DeploymentInfo di)
            throws DeploymentException
    {
@@ -469,6 +638,18 @@
    public void destroy(DeploymentInfo di)
            throws DeploymentException
    {
+      final JBoss4ESBDeploymentMetaData metaData = (JBoss4ESBDeploymentMetaData)di.context.get(JBoss4ESBDeploymentMetaData.class) ;
+      if (metaData != null)
+      {
+          final String deploymentName = metaData.getDeploymentName() ;
+          final File warFile = getESBWarFile(deploymentName, di.shortName, false) ;
+          if (warFile != null)
+          {
+             warFile.delete();
+             warFile.getParentFile().delete() ;
+          }
+          removeDeploymentName(deploymentName) ;
+      }
       if (di.deployedObject != null)
       {
          try
@@ -484,4 +665,68 @@
       }
       super.destroy(di);
    }
+   
+    private File getESBWarFile(final String deploymentName, final String esbName, final boolean createDir)
+    {
+        final File esbDir = new File(esbWarFiles, deploymentName) ;
+        if (!esbDir.exists())
+        {
+            if (!createDir)
+            {
+                return null ;
+            }
+            esbDir.mkdir() ;
+        }
+        
+        final int lastSeparator = esbName.lastIndexOf('.') ;
+        final String warFileName = ((lastSeparator >= 0) ? esbName.substring(0, lastSeparator) : esbName) + ".war" ;
+        
+        return new File(esbDir, warFileName) ;
+    }
+    
+    private synchronized String getDeploymentName(final JBoss4ESBDeployment deployment)
+    {
+        final String deploymentName = deployment.getDeploymentName() ;
+        if (esbNames.add(deploymentName))
+        {
+            return deploymentName ;
+        }
+        return deploymentName + ",uid=" + System.identityHashCode(deployment) ;
+    }
+    
+    private synchronized void removeDeploymentName(final String deploymentName)
+    {
+        esbNames.remove(deploymentName) ;
+    }
+    
+    private String getHandlers(final Enum webservice)
+    {
+        final int type = (webservice == null ? WebserviceType.INT_NONE : webservice.intValue()) ;
+        final String result ;
+        
+        if ((type == WebserviceType.INT_DISABLED) || (type == WebserviceType.INT_NONE))
+        {
+            result = null ;
+        }
+        else
+        {
+            final StringBuilder sb = new StringBuilder(HANDLER_CHAIN_PREFIX) ;
+            switch (type)
+            {
+            case WebserviceType.INT_ALL:
+                sb.append(HANDLER_PREFIX).append(WSADDR_NAME).append(HANDLER_MIDDLE).append(WSADDR_HANDLER).append(HANDLER_POSTFIX) ;
+                sb.append(HANDLER_PREFIX).append(WSSEC_NAME).append(HANDLER_MIDDLE).append(WSSEC_HANDLER).append(HANDLER_POSTFIX) ;
+                break ;
+            case WebserviceType.INT_ADDRESSING:
+                sb.append(HANDLER_PREFIX).append(WSADDR_NAME).append(HANDLER_MIDDLE).append(WSADDR_HANDLER).append(HANDLER_POSTFIX) ;
+                break ;
+            case WebserviceType.INT_SECURITY:
+                sb.append(HANDLER_PREFIX).append(WSSEC_NAME).append(HANDLER_MIDDLE).append(WSSEC_HANDLER).append(HANDLER_POSTFIX) ;
+                break ;
+            }
+            sb.append(HANDLER_CHAIN_POSTFIX) ;
+            result = sb.toString() ;
+        }
+        return result ;
+    }
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -21,6 +21,9 @@
 */
 package org.jboss.soa.esb.listeners.config;
 
+import java.util.List;
+
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.system.ServiceMBeanSupport;
@@ -35,10 +38,10 @@
 {
    private final String jbossEsbXml;
    private final String deploymentName ;
+   private List<ContractReferencePublisher> publishers ;
    private ManagedLifecycleController controller;
    private ClassLoader classloader;
 
-
    public JBoss4ESBDeployment(String jbossEsbXml, final String deploymentName)
    {
       this.jbossEsbXml = jbossEsbXml;
@@ -55,16 +58,30 @@
       return jbossEsbXml.replace("<", "&lt;").replace(">", "&gt;");
    }
 
-
    public void setClassloader(ClassLoader classloader)
    {
       this.classloader = classloader;
    }
 
+   public void setPublishers(final List<ContractReferencePublisher> publishers)
+   {
+       this.publishers = publishers ;
+   }
+
    public ManagedLifecycleController getController()
    {
       return controller;
    }
+   
+   public String getDeploymentName()
+   {
+       return deploymentName ;
+   }
+   
+   public List<ContractReferencePublisher> getPublishers()
+   {
+       return publishers ;
+   }
 
    @Override
    public void createService()
@@ -79,7 +96,7 @@
       {
          Thread.currentThread().setContextClassLoader(classloader);
          LifecycleResourceManager.getSingleton().associateDeployment(deploymentName) ;
-         controller = Configuration.create(jbossEsbXml, serviceName);
+         controller = Configuration.create(jbossEsbXml, serviceName, publishers);
          controller.start();
       }
       finally

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMetaData.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMetaData.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMetaData.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeploymentMetaData.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.listeners.config;
+
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+/**
+ * Meta Data used for ESB deployments
+ *
+ * @author <a href="kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class JBoss4ESBDeploymentMetaData
+{
+    private final JBoss4ESBDeployment deployment ;
+    private final String deploymentName ;
+    private final Set<ObjectName> dependencies ;
+
+   public JBoss4ESBDeploymentMetaData(final JBoss4ESBDeployment deployment, final String deploymentName,
+           final Set<ObjectName> dependencies)
+   {
+       this.deployment = deployment ;
+       this.deploymentName = deploymentName ;
+       this.dependencies = dependencies ;
+   }
+   
+   public JBoss4ESBDeployment getDeployment()
+   {
+       return deployment ;
+   }
+   
+   public String getDeploymentName()
+   {
+       return deploymentName ;
+   }
+   
+   public Set<ObjectName> getDependencies()
+   {
+       return dependencies ;
+   }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -3,16 +3,19 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
 import org.jboss.internal.soa.esb.publish.ContractPublisher;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
 import org.jboss.internal.soa.esb.publish.Publish;
+import org.jboss.internal.soa.esb.publish.Publisher;
+import org.jboss.soa.esb.Service;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
 import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.soa.esb.util.ClassUtil;
 
@@ -26,23 +29,23 @@
     private String serviceName;
     private String category;
     private String description;
-    private ContractPublisher contractPublisher;
-    private static Map<ManagedLifecycleController, List<ServicePublisher>> servicePublishers = new LinkedHashMap<ManagedLifecycleController, List<ServicePublisher>>();
+    private Publisher publisher;
+    private static Map<ManagedLifecycleController, Map<Service, List<ServicePublisher>>> SERVICE_PUBLISHERS = new LinkedHashMap<ManagedLifecycleController, Map<Service, List<ServicePublisher>>>();
 
     /**
      * Public constructor.
      *
      * @param name     Service name.
      * @param category Service category.
-     * @param contractPublisher Contract publisher implementation.
+     * @param publisher publisher implementation.
      */
-    protected ServicePublisher(String name, String category, ContractPublisher contractPublisher) {
+    protected ServicePublisher(String name, String category, Publisher publisher) {
         AssertArgument.isNotNullAndNotEmpty(name, "name");
         AssertArgument.isNotNullAndNotEmpty(category, "category");
 
         this.serviceName = name;
         this.category = category;
-        this.contractPublisher = contractPublisher;
+        this.publisher = publisher;
     }
 
     /**
@@ -85,10 +88,19 @@
      * @return The contract publisher.
      */
     public ContractPublisher getContractPublisher() {
-        return contractPublisher;
+        return (publisher instanceof ContractPublisher ? (ContractPublisher)publisher : null);
     }
 
     /**
+     * Get the publisher for the Service associated with this publisher.
+     *
+     * @return The publisher.
+     */
+    public Publisher getPublisher() {
+        return publisher ;
+    }
+
+    /**
      * Add service publication from the suppplied configuration, keying them under the
      * controller that is managing these services.
      * <p/>
@@ -99,19 +111,60 @@
      * @param model The configuration model.
      */
     public static void addServicePublishers(ManagedLifecycleController controller, XMLBeansModel model) {
-        List<Service> serviceConfigs = model.getServices();
-        List<ServicePublisher> publishers = new ArrayList<ServicePublisher>();
+        List<org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service> serviceConfigs = model.getServices();
+        final Map<Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<Service, List<ServicePublisher>>() ;
 
-        publishers.clear();
-        for (Service service : serviceConfigs) {
-            ContractPublisher contractPublisher = getConractPublisher(service);
-            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), contractPublisher);
+        for (org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service docService : serviceConfigs) {
+            ContractPublisher publisher = getConractPublisher(docService);
+            final Service service = new Service(docService.getCategory(), docService.getName()) ;
+            ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher);
 
-            servicePublisher.setDescription(service.getDescription());
-            publishers.add(servicePublisher);
+            servicePublisher.setDescription(docService.getDescription());
+            addPublisher(servicePublishers, service, servicePublisher) ;
         }
+        
+        addServicePublishers(controller, servicePublishers) ;
+    }
+    
+    /**
+     * Add the publisher into map for the specified service.
+     * @param servicePublishers The service publishers
+     * @param service The service name
+     * @param publisher The publisher
+     */
+    private static void addPublisher(final Map<Service, List<ServicePublisher>> servicePublishers,
+            final Service service, final ServicePublisher publisher)
+    {
+        final List<ServicePublisher> publishers = servicePublishers.get(service) ;
+        if (publishers != null) {
+            publishers.add(publisher);
+        } else {
+            final List<ServicePublisher> newPublishers = new ArrayList<ServicePublisher>() ;
+            newPublishers.add(publisher) ;
+            servicePublishers.put(service, newPublishers) ;
+        }
+    }
 
-        servicePublishers.put(controller, publishers);
+    /**
+     * Add the service publishers to the controller map.
+     * @param controller The controller for the services
+     * @param servicePublishers The service publishers
+     */
+    private static synchronized void addServicePublishers(ManagedLifecycleController controller, Map<Service, List<ServicePublisher>> publishers) {
+        final Map<Service, List<ServicePublisher>> currentMap = SERVICE_PUBLISHERS.get(controller) ;
+        if (currentMap != null) {
+            for(Map.Entry<Service, List<ServicePublisher>> entry: publishers.entrySet()) {
+                final Service service = entry.getKey() ;
+                final List<ServicePublisher> currentList = currentMap.get(service) ;
+                if (currentList != null) {
+                    currentList.addAll(entry.getValue()) ;
+                } else {
+                    currentMap.put(service, entry.getValue()) ;
+                }
+            }
+        } else {
+            SERVICE_PUBLISHERS.put(controller, publishers) ;
+        }
     }
 
     /**
@@ -119,12 +172,14 @@
      * instances.
      * @return The full list of publishers.
      */
-    public static List<ServicePublisher> getServicePublishers() {
+    public static synchronized List<ServicePublisher> getServicePublishers() {
         List<ServicePublisher> publishers = new ArrayList<ServicePublisher>();
-        Collection<List<ServicePublisher>> allPublishers = servicePublishers.values();
+        Collection<Map<Service, List<ServicePublisher>>> allPublishers = SERVICE_PUBLISHERS.values();
 
-        for(List<ServicePublisher> curPublisherList : allPublishers) {
-            publishers.addAll(curPublisherList);
+        for(Map<Service, List<ServicePublisher>> servicePublishers: allPublishers) {
+            for(List<ServicePublisher> curPublisherList : servicePublishers.values()) {
+                publishers.addAll(curPublisherList);
+            }
         }
 
         return publishers;
@@ -134,12 +189,12 @@
      * Remove the service publications for the services under the control of the supplied controller.
      * @param controller Controller.
      */
-    public static void removeServicePublishers(ManagedLifecycleController controller) {
-        servicePublishers.remove(controller);
+    public static synchronized void removeServicePublishers(ManagedLifecycleController controller) {
+        SERVICE_PUBLISHERS.remove(controller);
     }
 
     @SuppressWarnings("unchecked")
-    private static ContractPublisher getConractPublisher(Service service) {
+    private static ContractPublisher getConractPublisher(org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service service) {
         if(service.getActions() == null || service.getActions().getActionList() == null) {
             return null;
         }
@@ -174,4 +229,55 @@
         // No publisher configured on any of the actions in the processing chain...
         return null;
     }
+
+    /**
+     * Add external contract reference publishers to the list of publishers
+     * @param controller The controller
+     * @param publishers
+     */
+    public static synchronized void addContractReferencePublishers(final ManagedLifecycleController controller, final List<? extends ContractReferencePublisher> publishers) {
+        if (publishers != null) {
+            final Map<Service, List<ServicePublisher>> servicePublishers = new LinkedHashMap<Service, List<ServicePublisher>>() ;
+            for(ContractReferencePublisher publisher: publishers) {
+                final Service service = publisher.getService() ;
+                final ServicePublisher servicePublisher = new ServicePublisher(service.getName(), service.getCategory(), publisher) ;
+                servicePublisher.setDescription(publisher.getDescription()) ;
+                addPublisher(servicePublishers, service, servicePublisher) ;
+            }
+            addServicePublishers(controller, servicePublishers) ;
+        }
+    }
+
+    /**
+     * Get the list of registered services
+     * @return The list of services.
+     */
+    public static synchronized List<Service> getServices() {
+        LinkedHashSet<Service> services = new LinkedHashSet<Service>();
+        Collection<Map<Service, List<ServicePublisher>>> allPublishers = SERVICE_PUBLISHERS.values();
+
+        for(Map<Service, List<ServicePublisher>> servicePublishers: allPublishers) {
+            services.addAll(servicePublishers.keySet()) ;
+        }
+
+        return new ArrayList<Service>(services);
+    }
+
+    /**
+     * Get the list of publishers registered against the specified {@link Service}
+     * @return The list of publishers.
+     */
+    public static synchronized List<ServicePublisher> getServicePublishers(final Service service) {
+        List<ServicePublisher> publishers = new ArrayList<ServicePublisher>();
+        Collection<Map<Service, List<ServicePublisher>>> allPublishers = SERVICE_PUBLISHERS.values();
+
+        for(Map<Service, List<ServicePublisher>> servicePublishers: allPublishers) {
+            final List<ServicePublisher> curPublisherList = servicePublishers.get(service) ;
+            if (curPublisherList != null) {
+                publishers.addAll(curPublisherList);
+            }
+        }
+
+        return publishers;
+    }
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ActionMapper.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -29,6 +29,7 @@
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.MepType;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.WebserviceType;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument.Action;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionsDocument.Actions;
 import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
@@ -61,6 +62,34 @@
 		        {
 		            listenerConfigTree.setAttribute(ListenerTagNames.MEP_ATTRIBUTE_TAG, mep.toString()) ;
 		        }
+		        final String inxsd = actions.getInXsd();
+		        if (inxsd != null) 
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.IN_XSD_ATTRIBUTE_TAG, inxsd);	
+		        }
+		        final String outxsd = actions.getOutXsd();
+		        if (outxsd != null) 
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.OUT_XSD_ATTRIBUTE_TAG, outxsd);	
+		        }
+		        
+		        final String faultxsd = actions.getFaultXsd();
+		        
+		        if (faultxsd != null)
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.FAULT_XSD_ATTRIBUTE_TAG, faultxsd);
+		        }    
+		        
+		        if (actions.isSetValidate())
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.VALIDATE_ATTRIBUTE_TAG, Boolean.toString(actions.getValidate())) ;
+		        }
+		        final WebserviceType.Enum webservice = actions.getWebservice() ;
+		        if (webservice != null)
+		        {
+		            listenerConfigTree.setAttribute(ListenerTagNames.WEBSERVICE_ATTRIBUTE_TAG, webservice.toString()) ;
+		        }
+                
 		        SecurityMapper.map(listenerConfigTree, listenerService);
 			List<Action> actionList = actions.getActionList();
 			

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -29,6 +29,7 @@
 import javax.security.auth.Subject;
 
 import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionLifecycle;
 import org.jboss.soa.esb.actions.ActionPipelineProcessor;
@@ -59,7 +60,10 @@
 import org.jboss.soa.esb.services.security.SecurityServiceFactory;
 import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
 import org.jboss.soa.esb.util.ClassUtil;
+import org.xml.sax.SAXException;
 
+import javax.xml.validation.Schema;
+
 /**
  * Action Processing Pipeline. <p/> Runs a list of action classes on a message
  * 
@@ -85,6 +89,15 @@
 	 * The active flag.
 	 */
 	private final AtomicBoolean active = new AtomicBoolean(false);
+	
+	/**
+	 * The request XSD.
+	 */
+	private final Schema requestSchema ;
+	/**
+	 * The response XSD.
+	 */
+	private final Schema responseSchema ;
 
 	/**
 	 * 
@@ -146,6 +159,33 @@
 		    throw new ConfigurationException("Unrecognised action MEP: " + mep) ;
 		}
 		
+		final boolean validate = config.getBooleanAttribute(ListenerTagNames.VALIDATE_ATTRIBUTE_TAG, false) ;
+		if (validate)
+		{
+			final String inXsd = config.getAttribute(ListenerTagNames.IN_XSD_ATTRIBUTE_TAG) ;
+			try
+			{
+				requestSchema = (inXsd == null ? null : XMLHelper.getSchema(inXsd)) ;
+			}
+			catch (final SAXException saxe)
+			{
+				throw new ConfigurationException("Failed to parse the request schema: " + inXsd, saxe) ;
+			}
+			final String outXsd = config.getAttribute(ListenerTagNames.OUT_XSD_ATTRIBUTE_TAG) ;
+			try
+			{
+				responseSchema = (outXsd == null ? null : XMLHelper.getSchema(outXsd)) ;
+			}
+			catch (final SAXException saxe)
+			{
+				throw new ConfigurationException("Failed to parse the response schema: " + outXsd, saxe) ;
+			}
+		}
+		else
+		{
+			requestSchema = null ;
+			responseSchema = null ;
+		}
 		if (LOGGER.isDebugEnabled())
 		{
 		    LOGGER.debug("Using mep: " + mep + ", oneWay: " + oneWay + ", defaultProcessing: " + defaultProcessing) ;
@@ -416,93 +456,130 @@
 				LOGGER.debug("pipeline process for message: "+message.getHeader());
 			}
 
-			final int numProcessors = processors.length;
-			final Message[] messages = new Message[numProcessors];
+			boolean result = false ;
+			String validationFailure = null ;
+			if (requestSchema != null)
+			{
+				final Object input = message.getBody().get() ;
+				if ((input == null) || !XMLHelper.validate(requestSchema, input.toString()))
+				{
+					validationFailure = "Request validation failure: " + input ;
+				}
+			}
+			if (validationFailure == null)
+			{
+				final int numProcessors = processors.length;
+				final Message[] messages = new Message[numProcessors];
 
-			Message currentMessage = message;
+				Message currentMessage = message;
 			
-			for (int count = 0; count < numProcessors; count++)
-			{
-				final ActionPipelineProcessor processor = processors[count];
-				messages[count] = currentMessage;
-
-				try
+				for (int count = 0; count < numProcessors; count++)
 				{
-					LOGGER.debug("executing processor " + count+ " "+processor+" "+message.getHeader());
-					
-					currentMessage = processor.process(currentMessage);
+					final ActionPipelineProcessor processor = processors[count];
+					messages[count] = currentMessage;
 
-					if (currentMessage == null)
+					try
 					{
-						break;
+						LOGGER.debug("executing processor " + count+ " "+processor+" "+message.getHeader());
+						
+						currentMessage = processor.process(currentMessage);
+
+						if (currentMessage == null)
+						{
+							break;
+						}
 					}
-				}
-				catch (final Exception ex)
-				{
-					LOGGER
-							.warn(
-									"Unexpected exception caught while processing the action pipeline: "+message.getHeader(),
-									ex);
+					catch (final Exception ex)
+					{
+						if (LOGGER.isDebugEnabled())
+						{
+							LOGGER.debug("Unexpected exception caught while processing the action pipeline: "+message.getHeader(),ex);
+						}
 
-					notifyException(count, ex, messages);
+						notifyException(count, ex, messages);
 
-					/*
-					 * Is this an application specific error? If so, try to return
-					 * the error message to the identified recipient.
-					 */
+						/*
+						 * Is this an application specific error? If so, try to return
+						 * the error message to the identified recipient.
+						 */
+						
+						final boolean throwRuntime = transactional && (ex instanceof RuntimeException) ;
+						
+						if (ex instanceof ActionProcessingFaultException)
+						{
+							ActionProcessingFaultException fault = (ActionProcessingFaultException) ex;
+
+							if (fault.getFaultMessage() == null)
+							{
+								faultTo(callDetails, Factory.createErrorMessage(Factory.PROCESSING_ERROR, message, ex));
+							}
+							else
+								faultTo(callDetails, fault.getFaultMessage());
+						}
+						else if (!throwRuntime)
+						{
+							faultTo(callDetails, Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, ex));
+						}
+
+						long procTime = System.nanoTime() - start;
+						serviceMessageCounter.update(new ActionStatusBean(procTime, count, message,
+							ActionStatusBean.ACTION_FAILED));
+						DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
+							MessageStatusBean.MESSAGE_FAILED));
 					
-					final boolean throwRuntime = transactional && (ex instanceof RuntimeException) ;
-					
-					if (ex instanceof ActionProcessingFaultException)
+						if (throwRuntime)
+						{
+							throw (RuntimeException)ex ;
+						}
+						return false;
+					}
+					serviceMessageCounter.update(new ActionStatusBean((System.nanoTime() - start), count, message,
+						ActionStatusBean.ACTION_SENT));
+				}
+
+				// Reply...
+				if (!oneWay)
+				{
+					if (currentMessage != null)
 					{
-						ActionProcessingFaultException fault = (ActionProcessingFaultException) ex;
-
-						if (fault.getFaultMessage() == null)
+						if (responseSchema != null)
 						{
-							faultTo(callDetails, Factory.createErrorMessage(Factory.PROCESSING_ERROR, message, ex));
+							final Object output = message.getBody().get() ;
+							if ((output == null) || !XMLHelper.validate(responseSchema, output.toString()))
+							{
+								validationFailure = "Response validation failure: " + output ;
+							}
 						}
-						else
-							faultTo(callDetails, fault.getFaultMessage());
+						if (validationFailure == null)
+						{
+							replyTo(callDetails, currentMessage);
+						}
 					}
-					else if (!throwRuntime)
+					else if (!defaultProcessing)
 					{
-						faultTo(callDetails, Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, ex));
+						LOGGER.warn("No response message for RequestResponse mep! " + callDetails);
 					}
+				}
 
+				if (validationFailure == null)
+				{
+					notifySuccess(messages);
 					long procTime = System.nanoTime() - start;
-					serviceMessageCounter.update(new ActionStatusBean(procTime, count, message,
-							ActionStatusBean.ACTION_FAILED));
-		        	DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
-		        			MessageStatusBean.MESSAGE_FAILED));
-					
-		        	        if (throwRuntime)
-		        	        {
-		        	            throw (RuntimeException)ex ;
-		        	        }
-					return false;
+					DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
+						MessageStatusBean.MESSAGE_SENT));
+					result = true;
 				}
-				serviceMessageCounter.update(new ActionStatusBean((System.nanoTime() - start), count, message,
-						ActionStatusBean.ACTION_SENT));
 			}
-
-			// Reply...
-			if (!oneWay)
+			
+			if (validationFailure != null)
 			{
-                            if (currentMessage != null)
-                            {
-                                replyTo(callDetails, currentMessage);
-                            }
-                            else if (!defaultProcessing)
-                            {
-                                LOGGER.warn("No response message for RequestResponse mep! " + callDetails);
-                            }
+				final MessageValidationException mve = new MessageValidationException(validationFailure) ;
+				faultTo(callDetails, Factory.createErrorMessage(Factory.VALIDATION_FAILURE, message, mve));
+				long procTime = System.nanoTime() - start;
+				DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
+					MessageStatusBean.MESSAGE_FAILED));
 			}
-
-			notifySuccess(messages);
-			long procTime = System.nanoTime() - start;
-        	DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
-        			MessageStatusBean.MESSAGE_SENT));
-			return true;
+			return result ;
 	}
 	
 	/**

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageValidationException.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageValidationException.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageValidationException.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageValidationException.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.message;
+
+import org.jboss.soa.esb.BaseException;
+
+/**
+ * Exception sent when pipeline message validation fails.
+ * 
+ * @author <a href="mailto:Kevin.Conner at jboss.com">Kevin Conner</a>
+ */
+public class MessageValidationException extends BaseException
+{
+    /**
+     * The serial version UID for this exception.
+     */
+    private static final long serialVersionUID = 1145249669785492077L ;
+
+    public MessageValidationException()
+    {
+        super() ;
+    }
+
+    public MessageValidationException(final String message)
+    {
+        super(message) ;
+    }
+
+    public MessageValidationException(final Throwable cause)
+    {
+        super(cause) ;
+    }
+
+    public MessageValidationException(final String message, final Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/errors/Factory.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/errors/Factory.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/message/errors/Factory.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -36,6 +36,7 @@
 	public static final String PROCESSING_ERROR = "urn:action/error/actionprocessingerror";
 	public static final String UNEXPECTED_ERROR = "urn:action/error/unexpectederror";
 	public static final String NOT_ENABLED = "urn:action/error/disabled";
+	public static final String VALIDATION_FAILURE = "urn:action/error/validationFailure" ;
 	
 	public static void createExceptionFromFault (Message msg) throws FaultMessageException
 	{

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/message/Fault.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/message/Fault.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/message/Fault.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -32,6 +32,10 @@
 public interface Fault
 {
 	public static final String THROWABLE_CONTENT = "org.jboss.soa.esb.message.fault.throwable";
+	public static final String DETAIL_CODE_CONTENT = "org.jboss.soa.esb.message.fault.detail.code";
+	public static final String DETAIL_DESCRIPTION_CONTENT = "org.jboss.soa.esb.message.fault.detail.description";
+	public static final String DETAIL_DETAIL_CONTENT = "org.jboss.soa.esb.message.fault.detail.detail";
+
 	
 	/**
 	 * @return the unique code representing this fault.

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.internal.soa.esb.webservice;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.net.URL;
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.listeners.config.Generator;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
-import org.jboss.soa.esb.util.FileUtil;
-import org.xml.sax.InputSource;
-
-public class ESBContractGeneratorUnitTest extends TestCase {
-	public void testGenerateWSDL() throws Exception {
-		URL url = getClass().getResource("./jbossesb_config_06.xml");
-		byte[] configBytes = FileUtil.readFile(new File(url.getFile()));
-        ByteArrayOutputStream listenerXml = new ByteArrayOutputStream();
-        ByteArrayOutputStream gatewayXml = new ByteArrayOutputStream();
-        Generator generator = new Generator(new ByteArrayInputStream(configBytes), listenerXml, gatewayXml);
-        generator.generate();
-        List<Service> services = generator.getModel().getServices();
-        final Service service = services.get(0) ;
-        final ESBServiceEndpointInfo endpointInfo = new ESBServiceEndpointInfo(service) ;
-        String wsdl = ESBContractGenerator.generateWSDL(service, endpointInfo);
-        java.io.StringReader strReader = new java.io.StringReader(wsdl);
-        InputSource inputSource = new InputSource(strReader);
-        Definition def = WSDLFactory.newInstance().newWSDLReader().readWSDL("file://tmp.wsdl", inputSource);
-        assertNotNull("Failed to generate wsdl file" , def);
-	}
-
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/ESBContractGeneratorUnitTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.webservice;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.listeners.config.Generator;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
+import org.jboss.soa.esb.util.FileUtil;
+import org.xml.sax.InputSource;
+
+public class ESBContractGeneratorUnitTest extends TestCase {
+	public void testGenerateWSDL() throws Exception {
+		URL url = getClass().getResource("./jbossesb_config_06.xml");
+		byte[] configBytes = FileUtil.readFile(new File(url.getFile()));
+        ByteArrayOutputStream listenerXml = new ByteArrayOutputStream();
+        ByteArrayOutputStream gatewayXml = new ByteArrayOutputStream();
+        Generator generator = new Generator(new ByteArrayInputStream(configBytes), listenerXml, gatewayXml);
+        generator.generate();
+        List<Service> services = generator.getModel().getServices();
+        final Service service = services.get(0) ;
+        final ESBServiceEndpointInfo endpointInfo = new ESBServiceEndpointInfo(service) ;
+        String wsdl = ESBContractGenerator.generateWSDL(service, endpointInfo);
+        java.io.StringReader strReader = new java.io.StringReader(wsdl);
+        InputSource inputSource = new InputSource(strReader);
+        Definition def = WSDLFactory.newInstance().newWSDLReader().readWSDL("file://tmp.wsdl", inputSource);
+        assertNotNull("Failed to generate wsdl file" , def);
+	}
+
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,17 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayFault" type="x1:fault"/>
-  <xs:complexType name="fault">
-    <xs:sequence>
-      <xs:element name="code" type="xs:string"/>
-      <xs:element name="faultString" type="xs:string"/>
-    </xs:sequence>
-  </xs:complexType>
-    <xs:element name="sayFault2" type="x1:fault2"/>
-  <xs:complexType name="fault2">
-    <xs:sequence>
-      <xs:element name="code" type="xs:int"/>
-      <xs:element name="descrption" type="xs:string"/>
-    </xs:sequence>
-  </xs:complexType>
-  
-</xs:schema>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/fault.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,17 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayFault" type="x1:fault"/>
+  <xs:complexType name="fault">
+    <xs:sequence>
+      <xs:element name="code" type="xs:string"/>
+      <xs:element name="faultString" type="xs:string"/>
+    </xs:sequence>
+  </xs:complexType>
+    <xs:element name="sayFault2" type="x1:fault2"/>
+  <xs:complexType name="fault2">
+    <xs:sequence>
+      <xs:element name="code" type="xs:int"/>
+      <xs:element name="descrption" type="xs:string"/>
+    </xs:sequence>
+  </xs:complexType>
+  
+</xs:schema>
\ No newline at end of file

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,18 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb
-	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
-	<services>
-		<service category="FirstServiceESB" name="SimpleListener"
-			description="Hello World" invmScope="GLOBAL">>
-			<actions 
-				inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
-				outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd"
-				faultXsd="/org/jboss/internal/soa/esb/webservice/fault.xsd">
-				<action name="action2"
-					class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="printfull" value="true" />
-				</action>
-			</actions>
-		</service>
-	</services>
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/jbossesb_config_06.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+	<services>
+		<service category="FirstServiceESB" name="SimpleListener"
+			description="Hello World" invmScope="GLOBAL">>
+			<actions 
+				inXsd="/org/jboss/internal/soa/esb/webservice/request.xsd"
+				outXsd="/org/jboss/internal/soa/esb/webservice/response.xsd"
+				faultXsd="/org/jboss/internal/soa/esb/webservice/fault.xsd">
+				<action name="action2"
+					class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="printfull" value="true" />
+				</action>
+			</actions>
+		</service>
+	</services>
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,8 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayHi" type="x1:sayHi"/>
-  <xs:complexType name="sayHi">
-    <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/request.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHi" type="x1:sayHi"/>
+  <xs:complexType name="sayHi">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,8 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayHiReponse" type="x1:sayHiReponse"/>
-  <xs:complexType name="sayHiReponse">
-    <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/internal/soa/esb/webservice/response.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHiReponse" type="x1:sayHiReponse"/>
+  <xs:complexType name="sayHiReponse">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ServicePublisherUnitTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,11 +1,15 @@
 package org.jboss.soa.esb.listeners.config;
 
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.List;
 
 import junit.framework.TestCase;
 
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.Service;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 
 /**
@@ -18,6 +22,8 @@
         ManagedLifecycleController controller1 = new ManagedLifecycleController(null); // TODO: Introduce an interface and Mock for ManagedLifecycleController
         ManagedLifecycleController controller2 = new ManagedLifecycleController(null); // TODO: Introduce an interface and Mock for ManagedLifecycleController
 
+        assertEquals("Service count", 0, ServicePublisher.getServices().size());
+        
         generator = new Generator(getClass().getResourceAsStream("jbossesb_config_04.xml"));
         ServicePublisher.addServicePublishers(controller1, generator.getModel());
         List<ServicePublisher> publishers = ServicePublisher.getServicePublishers();
@@ -27,6 +33,8 @@
         assertEquals("B2", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
         assertEquals(null, publishers.get(1).getContractPublisher());
 
+        assertEquals("Service count", 2, ServicePublisher.getServices().size());
+        
         generator = new Generator(getClass().getResourceAsStream("jbossesb_config_05.xml"));
         ServicePublisher.addServicePublishers(controller2, generator.getModel());
         publishers = ServicePublisher.getServicePublishers();
@@ -39,13 +47,35 @@
         assertEquals(null, publishers.get(2).getContractPublisher());
         assertEquals("D4", publishers.get(3).getCategory() + publishers.get(3).getServiceName());
         assertTrue(publishers.get(3).getContractPublisher() instanceof MockContractPublisher);
+        
+        assertEquals("A1", 1, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
+        assertEquals("B2", 1, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
+        assertEquals("C3", 1, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
+        
+        assertEquals("Service count", 4, ServicePublisher.getServices().size());
 
+        final ESBServiceContractPublisher publisher = new ESBServiceContractPublisher(new Service("C", "3"), "test", "endpoint") ;
+        ServicePublisher.addContractReferencePublishers(controller2, Arrays.asList(publisher)) ;
+        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        
+        assertEquals("Service count", 4, ServicePublisher.getServices().size());
+        
         ServicePublisher.removeServicePublishers(controller1);
         publishers = ServicePublisher.getServicePublishers();
-        assertEquals(2, publishers.size());
+        assertEquals(3, publishers.size());
         assertEquals("C3", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
         assertEquals(null, publishers.get(0).getContractPublisher());
-        assertEquals("D4", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
-        assertTrue(publishers.get(1).getContractPublisher() instanceof MockContractPublisher);
+        assertEquals("C3", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
+        assertTrue("ContractReferencePublisher", publishers.get(1).getPublisher() instanceof ContractReferencePublisher);
+        assertEquals("D4", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
+        assertTrue(publishers.get(2).getContractPublisher() instanceof MockContractPublisher);
+        
+        assertEquals("Service count", 2, ServicePublisher.getServices().size());
+        
+        assertEquals("A1", 0, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
+        assertEquals("B2", 0, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
+        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
+        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
     }
 }

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_06.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,16 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+	<services>
+		<service category="FirstServiceESB" name="SimpleListener"
+			description="Hello World" invmScope="GLOBAL">>
+			<actions mep="OneWay"
+				inXsd="/org/jboss/soa/esb/listeners/config/request.xsd">
+				<action name="action2"
+					class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="printfull" value="true" />
+				</action>
+			</actions>
+		</service>
+	</services>
+</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/request.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/request.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/request.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/request.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHi" type="x1:sayHi"/>
+  <xs:complexType name="sayHi">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/response.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/response.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/response.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/response.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHiReponse" type="x1:sayHiReponse"/>
+  <xs:complexType name="sayHiReponse">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/build.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,45 +0,0 @@
-<project name="Quickstart_publish_as_webservice" default="run" basedir=".">
-	
-	<description> 
-		${ant.project.name}
-		${line.separator}
-	</description>
-	
-	<!-- additional deploys -->
-	<property name="additional.deploys" value="*.xsd"/>
-
-	<!-- Import the base Ant build script... -->
-	<import file="../conf/base-build.xml"/>
-	<target name="runtest" depends="compile"  description="sends soap message to published web service">
-		<echo>Send soap message to published web service and receive reponse</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SOAPTest" failonerror="true">
-		      <arg value="HelloWorld"/>	
-                      <classpath refid="exec-classpath"/>
-		</java>
-                <echo/>
-                <echo/>
-		<echo>Send soap message to published web service and receive soap fault message</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SOAPTest" failonerror="true">
-		      <arg value="Error"/>	
-                      <classpath refid="exec-classpath"/>
-		</java>
-	</target> 
-	
-	<target name="sendesb" depends="compile" description="send esb Message to esb service">
-		<echo>Send esb message to esb service and get response</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SendEsbMessage" failonerror="true">
-			<arg value="ESBServiceSample"/> <!--  service category -->
-			<arg value="HelloWorldPubService"/>  <!--  service name -->
-			<arg value="HelloWorld"/> <!--  Message text -->
-			<classpath refid="exec-classpath"/>
-		</java>
-		<echo>Send esb message to esb service and get error</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SendEsbMessage" failonerror="true">
-			<arg value="ESBServiceSample"/> <!--  service category -->
-			<arg value="HelloWorldPubService"/>  <!--  service name -->
-			<arg value="Error"/> <!--  Message text -->
-			<classpath refid="exec-classpath"/>
-		</java>
-
-	</target>
-</project>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/build.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/build.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,45 @@
+<project name="Quickstart_publish_as_webservice" default="run" basedir=".">
+	
+	<description> 
+		${ant.project.name}
+		${line.separator}
+	</description>
+	
+	<!-- additional deploys -->
+	<property name="additional.deploys" value="*.xsd"/>
+
+	<!-- Import the base Ant build script... -->
+	<import file="../conf/base-build.xml"/>
+	<target name="runtest" depends="compile"  description="sends soap message to published web service">
+		<echo>Send soap message to published web service and receive reponse</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SOAPTest" failonerror="true">
+		      <arg value="HelloWorld"/>	
+                      <classpath refid="exec-classpath"/>
+		</java>
+                <echo/>
+                <echo/>
+		<echo>Send soap message to published web service and receive soap fault message</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SOAPTest" failonerror="true">
+		      <arg value="Error"/>	
+                      <classpath refid="exec-classpath"/>
+		</java>
+	</target> 
+	
+	<target name="sendesb" depends="compile" description="send esb Message to esb service">
+		<echo>Send esb message to esb service and get response</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SendEsbMessage" failonerror="true">
+			<arg value="ESBServiceSample"/> <!--  service category -->
+			<arg value="HelloWorldPubService"/>  <!--  service name -->
+			<arg value="HelloWorld"/> <!--  Message text -->
+			<classpath refid="exec-classpath"/>
+		</java>
+		<echo>Send esb message to esb service and get error</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test.SendEsbMessage" failonerror="true">
+			<arg value="ESBServiceSample"/> <!--  service category -->
+			<arg value="HelloWorldPubService"/>  <!--  service name -->
+			<arg value="Error"/> <!--  Message text -->
+			<classpath refid="exec-classpath"/>
+		</java>
+
+	</target>
+</project>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/deployment.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,5 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb:deployment=soap.esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply</depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/deployment.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/deployment.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,5 @@
+<jbossesb-deployment>
+  <depends>jboss.esb:deployment=soap.esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply</depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/fault.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,9 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayFault" type="x1:fault"/>
-  <xs:complexType name="fault">
-    <xs:sequence>
-      <xs:element name="code" type="xs:string"/>
-      <xs:element name="faultString" type="xs:string"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/fault.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/fault.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,9 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayFault" type="x1:fault"/>
+  <xs:complexType name="fault">
+    <xs:sequence>
+      <xs:element name="code" type="xs:string"/>
+      <xs:element name="faultString" type="xs:string"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>
\ No newline at end of file

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbm-queue-service.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb">
-    <depends optional-attribute-name="DestinationManager">
-      jboss.mq:service=DestinationManager
-    </depends>
-  </mbean>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply">
-    <depends optional-attribute-name="DestinationManager">
-      jboss.mq:service=DestinationManager
-    </depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbmq-queue-service.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb">
+    <depends optional-attribute-name="DestinationManager">
+      jboss.mq:service=DestinationManager
+    </depends>
+  </mbean>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_publish_as_webservice_Request_esb_reply">
+    <depends optional-attribute-name="DestinationManager">
+      jboss.mq:service=DestinationManager
+    </depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,37 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
-    <providers>
-          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_publish_as_webservice_Request_esb"
-                      selector="serviceName='HelloWorldPubService'"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-      
-      <services>
-        <service 
-        	category="ESBServiceSample" 
-        	name="HelloWorldPubService" 
-        	description="Hello world ESB Service">
-            <listeners>
-                <jms-listener name="helloWorld"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"
-                />
-            </listeners>
-            <actions  inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd">
-                   <action name="action" 
-                   	class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.MyJMSListenerAction" 
-                   	process="displayMessage" 
-                   	/>  
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,37 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+    <providers>
+          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_publish_as_webservice_Request_esb"
+                      selector="serviceName='HelloWorldPubService'"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+      
+      <services>
+        <service 
+        	category="ESBServiceSample" 
+        	name="HelloWorldPubService" 
+        	description="Hello world ESB Service">
+            <listeners>
+                <jms-listener name="helloWorld"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions  inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd">
+                   <action name="action" 
+                   	class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.MyJMSListenerAction" 
+                   	process="displayMessage" 
+                   	/>  
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  JBoss, Home of Professional Open Source
-  Copyright 2006, JBoss Inc., and others contributors as indicated 
-  by the @authors tag. All rights reserved. 
-  See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
-  This copyrighted material is made available to anyone wishing to use,
-  modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  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,
-  v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
-  MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
-  These options are described in the JBossESB manual.
-  Defaults are provided here for convenience only.
- 
-  Please read through this file prior to using the system, and consider
-  updating the specified entries.
--->
-<esb
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
-		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-        <property name="jboss.esb.invm.scope.default" value="NONE"/>
-    </properties>
-    <properties name="registry">      
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
-    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
-    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
-    	<property name="org.jboss.soa.esb.registry.implementationClass" 
-    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" 
-    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" 
-    		value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" 
-    	  value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
-    		value="org.apache.ws.scout.transport.RMITransport"/>
-    </properties>
-    <properties name="transports" depends="core">
-    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
-    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
-    </properties>
-    <properties name="connection">
-    	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
-    	<property name="blocking-timeout-millis" value="5000"/>
-    	<property name="abandoned-connection-timeout" value="10000"/>
-    	<property name="abandoned-connection-time-interval" value="30000"/>
-    </properties>
-    <properties name="dbstore">
-		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
-		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
-		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
-		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
-		<!--table managed by pool to test for valid connections - created by pool automatically -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
-		<!-- # of milliseconds to timeout waiting for a connection from pool -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
-    </properties>
-</esb>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jbossesb-properties.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and others contributors as indicated 
+  by the @authors tag. All rights reserved. 
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors. 
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  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,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+        <property name="jboss.esb.invm.scope.default" value="NONE"/>
+    </properties>
+    <properties name="registry">      
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
+    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
+    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+    	<property name="org.jboss.soa.esb.registry.implementationClass" 
+    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" 
+    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" 
+    		value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" 
+    	  value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
+    		value="org.apache.ws.scout.transport.RMITransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+</esb>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jndi.properties	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/jndi.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/jndi.properties	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/juddi.properties	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,69 +0,0 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/juddi.properties)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/juddi.properties	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/lib (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/lib)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/log4j.xml	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-   <!-- ============================== -->
-   <!-- Append messages to the console -->
-   <!-- ============================== -->
-
-   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
-      </layout>
-   </appender>
-
-   <!-- ================================= -->
-   <!-- Preserve messages in a local file -->
-   <!-- ================================= -->
-
-   <!-- A size based file rolling appender -->
-   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
-     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-     <param name="File" value="./listener.log"/>
-     <param name="Append" value="false"/>
-     <param name="MaxFileSize" value="500KB"/>
-     <param name="MaxBackupIndex" value="1"/>
-
-     <layout class="org.apache.log4j.PatternLayout">
-       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
-     </layout>	    
-   </appender>
-
-   <!-- ================ -->
-   <!-- Limit categories -->
-   <!-- ================ -->
-
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="quickstart">
-      <priority value="DEBUG"/>
-   </category>
-   <!-- ======================= -->
-   <!-- Setup the Root category -->
-   <!-- ======================= -->
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-      <appender-ref ref="FILE"/>
-   </root>
-
-</log4j:configuration>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/log4j.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/log4j.xml	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A size based file rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./listener.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="DEBUG"/>
+   </category>
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/readme.txt	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,18 +0,0 @@
-Overview:
-=========
-  The purpose of the publish_as_webservice quickstart sample is to demonstrate how to 
-  publish a esb service as a web service. 
-
-Running this quickstart:
-========================
-  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
-  and a more detailed descripton of the different ways to run the quickstarts.
-
-To Run '.esb' archive mode:
-===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
-  2. Open another command terminal window in this folder ("Window2"), type
-     'ant runtest'.
-  3. Open another command terminal window in this folder ("Window2"), type
-     'ant sendesb'.
-  4. In this folder ("Window1"), type 'ant undeploy'.

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/readme.txt)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/readme.txt	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,18 @@
+Overview:
+=========
+  The purpose of the publish_as_webservice quickstart sample is to demonstrate how to 
+  publish a esb service as a web service. 
+
+Running this quickstart:
+========================
+  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+  and a more detailed descripton of the different ways to run the quickstarts.
+
+To Run '.esb' archive mode:
+===========================
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  2. Open another command terminal window in this folder ("Window2"), type
+     'ant runtest'.
+  3. Open another command terminal window in this folder ("Window2"), type
+     'ant sendesb'.
+  4. In this folder ("Window1"), type 'ant undeploy'.

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/request.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,8 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayHi" type="x1:sayHi"/>
-  <xs:complexType name="sayHi">
-    <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/request.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/request.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHi" type="x1:sayHi"/>
+  <xs:complexType name="sayHi">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/response.xsd	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,8 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayHiResponse" type="x1:sayHiResponse"/>
-  <xs:complexType name="sayHiResponse">
-    <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/response.xsd)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/response.xsd	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHiResponse" type="x1:sayHiResponse"/>
+  <xs:complexType name="sayHiResponse">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/.classpath	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path=""/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path=""/>
-</classpath>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/.classpath)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.classpath	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path=""/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/.project	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>pubservice-sample</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/.project)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/.project	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>pubservice-sample</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.publishAsWebservice;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.actions.ActionProcessingDetailFaultException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-public class MyJMSListenerAction extends AbstractActionLifecycle
-{
-    protected ConfigTree _config;
-    
-    public MyJMSListenerAction(ConfigTree config)
-    {
-        _config = config;
-    }
-    
-    public Message displayMessage(Message message) throws Exception
-    {
-        final String request = (String)message.getBody().get() ;
-        if (request.contains("Error")) {
-            final String detail = "<say:sayFault xmlns:say=\"http://www.jboss.org/sayHi\"><say:code>" +
-                "myErrorCode" + "</say:code><say:faultString>" + "myDescription" +
-                "</say:faultString></say:sayFault>" ;
-            throw new ActionProcessingDetailFaultException(new QName("http://www.jboss.org/sayHi", "myErrorCode"), "myDescription", detail) ;
-        }
-        
-        System.out.println("Received request: " + request) ;
-        final String responseMsg = "<say:sayHiResponse xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" +
-            "Response from ESB Service" + "</say:arg0></say:sayHiResponse>" ;
-        message.getBody().add(responseMsg);
-        return message;
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/MyJMSListenerAction.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.publishAsWebservice;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.actions.ActionProcessingDetailFaultException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction extends AbstractActionLifecycle
+{
+    protected ConfigTree _config;
+    
+    public MyJMSListenerAction(ConfigTree config)
+    {
+        _config = config;
+    }
+    
+    public Message displayMessage(Message message) throws Exception
+    {
+        final String request = (String)message.getBody().get() ;
+        if (request.contains("Error")) {
+            final String detail = "<say:sayFault xmlns:say=\"http://www.jboss.org/sayHi\"><say:code>" +
+                "myErrorCode" + "</say:code><say:faultString>" + "myDescription" +
+                "</say:faultString></say:sayFault>" ;
+            throw new ActionProcessingDetailFaultException(new QName("http://www.jboss.org/sayHi", "myErrorCode"), "myDescription", detail) ;
+        }
+        
+        System.out.println("Received request: " + request) ;
+        final String responseMsg = "<say:sayHiResponse xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" +
+            "Response from ESB Service" + "</say:arg0></say:sayHiResponse>" ;
+        message.getBody().add(responseMsg);
+        return message;
+    }
+}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test)

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test;
-import java.io.IOException;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.StringRequestEntity;
-
-public class SOAPTest  {
-	public static void main(String args[]) {
- 
-		String request = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:say=\"http://www.jboss.org/sayHi\">"
-                                + "<soapenv:Header/> <soapenv:Body> <say:sayHi> <say:arg0>" + args[0] + "</say:arg0></say:sayHi>"
-                                + "</soapenv:Body> </soapenv:Envelope>";
-		HttpClient client = new HttpClient();
-		PostMethod postMethod = new PostMethod(
-				"http://127.0.0.1:8080/Quickstart_publish_as_webservice/ESBServiceSample/HelloWorldPubService?wsdl");
-
-		StringRequestEntity requestEntity = new StringRequestEntity(request);
-		postMethod.setRequestEntity(requestEntity);
-		try {
-			client.executeMethod(postMethod);
-			System.out.println("Response from web service");
-			System.out.println(postMethod.getResponseBodyAsString());
-		} catch (HttpException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		System.exit(0);
-
-	}
-
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test;
+import java.io.IOException;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+
+public class SOAPTest  {
+	public static void main(String args[]) {
+ 
+		String request = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:say=\"http://www.jboss.org/sayHi\">"
+                                + "<soapenv:Header/> <soapenv:Body> <say:sayHi> <say:arg0>" + args[0] + "</say:arg0></say:sayHi>"
+                                + "</soapenv:Body> </soapenv:Envelope>";
+		HttpClient client = new HttpClient();
+		PostMethod postMethod = new PostMethod(
+				"http://127.0.0.1:8080/Quickstart_publish_as_webservice/ESBServiceSample/HelloWorldPubService?wsdl");
+
+		StringRequestEntity requestEntity = new StringRequestEntity(request);
+		postMethod.setRequestEntity(requestEntity);
+		try {
+			client.executeMethod(postMethod);
+			System.out.println("Response from web service");
+			System.out.println(postMethod.getResponseBodyAsString());
+		} catch (HttpException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		System.exit(0);
+
+	}
+
+}

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java	2008-08-18 06:21:53 UTC (rev 21592)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test;
-
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.couriers.FaultMessageException;
-
-/**
- * Standalone class with to send ESB messages to a 'known' [category,name].
- * <p/> arg0 - service category
- * <br/>arg1 - service name
- * <br/>arg2 - Text of message to send
- * 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
- * @since Version 4.0
- *
- */
-public class SendEsbMessage 
-{
-    public static void main(String args[]) throws Exception
-    {
-//      Setting the ConnectionFactory such that it will use scout
-        System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
-        
-        if (args.length < 3)
-        {
-            System.out.println("Usage SendEsbMessage <category> <name> <text to send>");
-        }
-        
-        Message esbMessage = MessageFactory.getInstance().getMessage();
-        final String message = "<say:sayHi xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" + args[2] + "</say:arg0></say:sayHi>" ;
-        esbMessage.getBody().add(message);
-        
-        ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
-        
-        Message response = null;
-        try {
-            response= invoker.deliverSync(esbMessage, 3000);
-            System.out.println(response.getBody().get());
-        } catch (final FaultMessageException fme) {
-            final Message returnedMessage = fme.getReturnedMessage() ;
-            System.out.println("Received a fault message exception") ;
-            System.out.println("\tMessage: " + fme.getMessage()) ;
-            System.out.println("\tCode: " + fme.getCode()) ;
-            System.out.println("\tCause: " + fme.getCause()) ;
-            System.out.println("\tReturned message: " + returnedMessage) ;
-        }catch(Exception ex) {
-           ex.printStackTrace();
-        } 
-        System.exit(0);
-    }
-}

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java (from rev 21592, labs/jbossesb/workspace/jimma/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/publish_as_webservice/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SendEsbMessage.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.couriers.FaultMessageException;
+
+/**
+ * Standalone class with to send ESB messages to a 'known' [category,name].
+ * <p/> arg0 - service category
+ * <br/>arg1 - service name
+ * <br/>arg2 - Text of message to send
+ * 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @since Version 4.0
+ *
+ */
+public class SendEsbMessage 
+{
+    public static void main(String args[]) throws Exception
+    {
+//      Setting the ConnectionFactory such that it will use scout
+        System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
+        
+        if (args.length < 3)
+        {
+            System.out.println("Usage SendEsbMessage <category> <name> <text to send>");
+        }
+        
+        Message esbMessage = MessageFactory.getInstance().getMessage();
+        final String message = "<say:sayHi xmlns:say=\"http://www.jboss.org/sayHi\"><say:arg0>" + args[2] + "</say:arg0></say:sayHi>" ;
+        esbMessage.getBody().add(message);
+        
+        ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
+        
+        Message response = null;
+        try {
+            response= invoker.deliverSync(esbMessage, 3000);
+            System.out.println(response.getBody().get());
+        } catch (final FaultMessageException fme) {
+            final Message returnedMessage = fme.getReturnedMessage() ;
+            System.out.println("Received a fault message exception") ;
+            System.out.println("\tMessage: " + fme.getMessage()) ;
+            System.out.println("\tCode: " + fme.getCode()) ;
+            System.out.println("\tCause: " + fme.getCause()) ;
+            System.out.println("\tReturned message: " + returnedMessage) ;
+        }catch(Exception ex) {
+           ex.printStackTrace();
+        } 
+        System.exit(0);
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/readme.txt	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/samples/quickstarts/readme.txt	2008-08-18 21:59:30 UTC (rev 21608)
@@ -83,4 +83,7 @@
   JBoss ESB.  It uses the Transformation engine as well as the static-routing
   feature.  It also demonstrations the use of multiple JVMs running different
   services.
-  This is a fairly advanced demonstration.
+  This is a fairly advanced demonstration.
+
+* publish_as_webservice - demonstrations how to use SOAPIn and SOAPOut action to publish 
+  a esb service as a web service

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

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/lib/ext/build-time/jboss-saaj.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/MBeanSoapUIInvoker.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/MBeanSoapUIInvoker.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/MBeanSoapUIInvoker.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -35,6 +35,7 @@
 public class MBeanSoapUIInvoker implements SoapUIInvoker {
 
     private static final String[] buildRequestSig = new String[] {String.class.getName(), String.class.getName(), Map.class.getName(), Properties.class.getName(), String.class.getName(), String.class.getName()};
+    private static final String[] buildFaultSig = new String[] {String.class.getName(), String.class.getName(), String.class.getName(), Map.class.getName(), Properties.class.getName(), String.class.getName(), String.class.getName()};
     private static final String[] getEndpointSig = new String[] {String.class.getName(), Properties.class.getName()};
     private MBeanServer mbeanServer;
     private ObjectName serviceName;
@@ -82,6 +83,53 @@
     }
 
     /**
+     * Build a SOAP response for the specified operation on the specified WSDL.
+     *
+     * @param wsdl            WSDL URL.
+     * @param operation       Operation name.
+     * @param params          Message parameter map.
+     * @param httpClientProps {@link org.apache.commons.httpclient.HttpClient} creation properties.
+     * @param smooksResource  {@link org.milyn.Smooks} transformation configuration resource file.
+     *                        Null if no transformations are to be performed on the SOAP message before serializing it
+     *                        for return.
+     *  @param soapNs         the SOAP namespace. If null one of the defaults will be used:
+     *                        http://schemas.xmlsoap.org/soap/envelope/
+     *                        http://www.w3.org/2003/05/soap-envelope 
+     * @return The SOAP Message.
+     * @throws java.io.IOException                   Failed to load WSDL.
+     * @throws UnsupportedOperationException Operation not supported on specified WSDL.
+     * @throws org.xml.sax.SAXException                  Failed to parse the SOAP UI generated request message.
+     */
+    public String buildResponse(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+        try {
+            return (String) mbeanServer.invoke(serviceName, "buildResponse", new Object[] {wsdl, operation, params, httpClientProps, smooksResource, soapNs}, buildRequestSig);
+        } catch (InstanceNotFoundException e) {
+            throw new UnsupportedOperationException("SOAP UI Client Service not found under name '" + serviceName.getCanonicalName() + "'.  This service must be deployed before this action can be used.", e);
+        } catch (MBeanException e) {
+            rethrowException(e);
+        } catch (ReflectionException e) {
+            rethrowException(e);
+        }
+
+        throw new RuntimeException("Unexpected code exit point reached!");
+    }
+
+
+
+    public String buildFault(String wsdl, String operation, String faultName, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+        try {
+            return (String) mbeanServer.invoke(serviceName, "buildFault", new Object[] {wsdl, operation, faultName, params, httpClientProps, smooksResource, soapNs}, buildFaultSig);
+        } catch (InstanceNotFoundException e) {
+            throw new UnsupportedOperationException("SOAP UI Client Service not found under name '" + serviceName.getCanonicalName() + "'.  This service must be deployed before this action can be used.", e);
+        } catch (MBeanException e) {
+            rethrowException(e);
+        } catch (ReflectionException e) {
+            rethrowException(e);
+        } 
+        throw new RuntimeException("Unexpected code exit point reached!");
+    }
+
+    /**
      * Get the 1st endpoint from the specified WSDL.
      *
      * @param wsdl WSDL URL.

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SoapUIInvoker.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -11,6 +11,10 @@
  */
 public interface SoapUIInvoker {
     String buildRequest(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
+    
+    String buildResponse(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
+    
+    String buildFault(String wsdl, String operation, String faultName, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
 
     String getEndpoint(String wsdl, Properties httpClientProps) throws IOException;
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -22,6 +22,7 @@
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
 import org.jboss.internal.soa.esb.publish.ContractInfo;
+import org.jboss.internal.soa.esb.publish.ServletContractPublisher;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.EPR;
@@ -50,7 +51,7 @@
  * Contract publisher for a Webservice endpoint.
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
-public class WebserviceContractPublisher implements ActionContractPublisher {
+public class WebserviceContractPublisher implements ActionContractPublisher, ServletContractPublisher {
 
     private static Logger logger = Logger.getLogger(WebserviceContractPublisher.class);    
     private String endpointName;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/MockSOAPClient.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/MockSOAPClient.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/MockSOAPClient.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -50,6 +50,15 @@
                 public String buildRequest(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
                     return service.buildRequest(wsdl, operation, params, httpClientProps, smooksResource, soapNs);
                 }
+
+                public String buildResponse(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+                    return service.buildResponse(wsdl, operation, params, httpClientProps, smooksResource, soapNs) ;
+                }
+
+                public String buildFault(String wsdl, String operation, String faultName, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+                    return service.buildFault(wsdl, operation, faultName, params, httpClientProps, smooksResource, soapNs) ;
+                }
+
                 public String getEndpoint(String wsdl, Properties httpClientProps) throws IOException {
                     return service.getEndpoint(wsdl, httpClientProps);
                 }

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/lib/soap-xmlbeans-1.2.jar (from rev 21592, labs/jbossesb/workspace/jimma/product/services/soapui-client/src/lib/soap-xmlbeans-1.2.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -27,40 +27,59 @@
 import java.io.InputStream;
 import java.io.StringReader;
 import java.net.URL;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
 
+import javax.wsdl.Part;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.stream.StreamResult;
 
+import org.apache.commons.httpclient.HttpClient;
 import org.apache.log4j.Logger;
-import org.apache.commons.httpclient.HttpClient;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlOptions;
 import org.jboss.internal.soa.esb.soap.OGNLUtils;
+import org.jboss.internal.soa.esb.util.ESBProperties;
 import org.jboss.internal.soa.esb.util.LRUCache;
-import org.jboss.internal.soa.esb.util.ESBProperties;
+import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.soa.esb.dom.YADOMUtil;
 import org.jboss.soa.esb.http.HttpClientFactory;
-import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfig;
 import org.jboss.system.server.ServerConfigLocator;
-import org.milyn.xml.XmlUtil;
 import org.milyn.Smooks;
 import org.milyn.resource.URIResourceLocator;
-import org.w3c.dom.*;
+import org.milyn.xml.XmlUtil;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
-import org.xml.sax.InputSource;
 
 import com.eviware.soapui.SoapUI;
 import com.eviware.soapui.impl.wsdl.WsdlInterface;
+import com.eviware.soapui.impl.wsdl.WsdlOperation;
 import com.eviware.soapui.impl.wsdl.WsdlProject;
+import com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder;
 import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader;
+import com.eviware.soapui.impl.wsdl.support.xsd.SampleXmlUtil;
+import com.eviware.soapui.model.iface.MessagePart;
 import com.eviware.soapui.model.iface.Operation;
+import com.eviware.soapui.settings.WsdlSettings;
 
+
 /**
  * Soap UI Soap Client Service MBean.
  *
@@ -288,8 +307,67 @@
         Operation operationInst = getOperation(wsdl, operation, httpClientProps);
         String requestTemplate = operationInst.getRequestAt(0).getRequestContent();
 
-        return buildRequest(requestTemplate, params, smooksResource, soapNs);
+        return buildSOAPMessage(requestTemplate, params, smooksResource, soapNs);
     }
+    
+    /**
+     * Use soapUI to build a SOAP response for the specified operation on the specified WSDL.
+     *
+     * @param wsdl            WSDL URL 
+     * @param operation       Operation name.
+     * @param params          Message parameter map.
+     * @param httpClientProps {@link org.apache.commons.httpclient.HttpClient} creation properties.
+     * @param smooksResource  {@link org.milyn.Smooks} transformation configuration resource file.
+     *                        Null if no transformations are to be performed on the SOAP message before serializing it
+     *                        for return.
+     * @param soapNs 		  optional SOAP namespace
+     * @return The SOAP Message.
+     * @throws IOException                   Failed to load WSDL.
+     * @throws UnsupportedOperationException Operation not supported on specified WSDL.
+     * @throws SAXException                  Failed to parse the SOAP UI generated request message.
+     */
+    public String buildResponse(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+    	Operation operationInst = getOperation(wsdl, operation, httpClientProps);
+        WsdlOperation wsdlOperation = (WsdlOperation)operationInst;
+        String responseTemplate = wsdlOperation.createResponse(true);
+        return buildSOAPMessage(responseTemplate, params, smooksResource, soapNs);   	
+    }
+    
+    
+    public String buildFault(String wsdl, String operation, String faultName, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException {
+    	String faultDetail = null;
+    	Operation operationInst = getOperation(wsdl, operation, httpClientProps);
+        WsdlOperation wsdlOperation = (WsdlOperation)operationInst;
+        MessagePart[] faultParts = wsdlOperation.getFaultParts();
+        params.put("Fault.faultcode","soapenv:server");
+	    SoapMessageBuilder soapMessageBuilder = wsdlOperation.getInterface().getMessageBuilder();
+	    String faultTemplate = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+	                            + "<soapenv:Body><soapenv:Fault><faultcode>?</faultcode><faultstring>?</faultstring><detail>";
+		XmlObject detail = XmlObject.Factory.newInstance();
+        for (int i = 0 ; i < faultParts.length; i++) {
+        	MessagePart.FaultPart faultPart = (MessagePart.FaultPart)faultParts[i];
+        	if (faultPart.getName().equalsIgnoreCase(faultName)) {
+        		SampleXmlUtil generator = new SampleXmlUtil( false );
+        		generator.setExampleContent( false );
+        		generator.setTypeComment( false );
+        		XmlCursor cursor = detail.newCursor();   			
+    			cursor.toFirstContentToken();
+    			generator.setTypeComment( true );
+    			generator.setIgnoreOptional(wsdlOperation.getInterface().getSettings().getBoolean( WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
+    			for( Part part : faultPart.getWsdlParts() ) {
+    				try {
+						soapMessageBuilder.createElementForPart(part, cursor, generator);
+					} catch (Exception e) {
+						logger.error("Unable to create soap fualt template", e);
+					}
+        		}
+        	}
+        }
+        faultTemplate = faultTemplate + detail.xmlText( new XmlOptions().setSaveAggressiveNamespaces().setSavePrettyPrint())
+                        + "</detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>";
+        faultDetail = buildSOAPMessage(faultTemplate, params, smooksResource, soapNs);        
+        return faultDetail;         	
+    }
 
     /**
      * Get the 1st endpoint from the specified WSDL.
@@ -353,7 +431,7 @@
         return new EsbWsdlLoader(wsdl, httpClient);
     }
 
-    private String buildRequest(String soapMessageTemplate, Map params, String smooksResource, String soapNs) throws IOException, SAXException {
+    private String buildSOAPMessage(String soapMessageTemplate, Map params, String smooksResource, String soapNs) throws IOException, SAXException {
         Document messageDoc = getDocBuilder().parse(new InputSource(new StringReader(soapMessageTemplate)));
 
         Element docRoot = messageDoc.getDocumentElement();

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -55,6 +55,26 @@
     public abstract String buildRequest(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
 
     /**
+     * Use soapUI mockService to Build a SOAP response for the specified operation on the specified WSDL.
+     *
+     * @param wsdl            WSDL URL.
+     * @param operation       Operation name.
+     * @param params          Message parameter map..
+     * @param smooksResource  {@link org.milyn.Smooks} transformation configuration resource file.
+     *                        Null if no transformations are to be performed on the SOAP message before serializing it
+     *                        for return.
+     * @param soapNs 		  optional SOAP namespace
+     * @return The SOAP Message.
+     * @throws IOException                   Failed to load WSDL.
+     * @throws UnsupportedOperationException Operation not supported on specified WSDL.
+     * @throws SAXException                  Failed to parse the SOAP UI generated request message.
+     */
+    public abstract String buildResponse(String wsdl, String operation, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
+
+    
+    public abstract String buildFault(String wsdl, String operation, String faultName, Map params, Properties httpClientProps, String smooksResource, String soapNs) throws IOException, UnsupportedOperationException, SAXException;
+    
+    /**
      * Get the 1st endpoint from the specified WSDL.
      *
      * @param wsdl WSDL URL.

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java	2008-08-18 21:59:30 UTC (rev 21608)
@@ -312,6 +312,26 @@
         assertEquals("http://localhost:18080/active-bpel/services/RetailerCallback", mbean.getEndpoint(wsdlFile.toURI().toString(), properties));
     }
 
+    public void test_BuildResponse() throws Exception {    
+    	File wsdlFile = new File(WSDL_LOCATAION + "/helloworld.wsdl");
+    	properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+    	SoapUIClientService mbean = new SoapUIClientService();
+    	Map<Object, Object> paras = new HashMap<Object, Object>();
+    	paras.put("sayHiReponse.arg0", "response");
+    	String str = mbean.buildResponse(wsdlFile.toURL().toString(), "HelloWorldPubServiceOp", paras, properties, null, null);
+    	assertTrue("Failed to generate correct soap response", str.indexOf("<say:arg0>response</say:arg0>") > -1);
+    }
+    
+    public void test_BuildFault() throws Exception {    
+    	File wsdlFile = new File(WSDL_LOCATAION + "/helloworld.wsdl");
+    	properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+    	SoapUIClientService mbean = new SoapUIClientService();
+    	Map<Object, Object> paras = new HashMap<Object, Object>();
+    	paras.put("Fault.detail.sayFault.code", "test");
+    	String str = mbean.buildFault(wsdlFile.toURL().toString(), "HelloWorldPubServiceOp", "HelloWorldPubServiceFault1", paras, properties, null, null);
+    	assertTrue("Failed to generate correct soap fault message", str.indexOf("<say:code>test</say:code>") > -1);
+    }
+    
     private void addOrderItems(List<OrderItem> items) {
         items.add(new OrderItem(1, "item1", 1, new BigDecimal(1.00), 1));
         items.add(new OrderItem(2, "item2", 2, new BigDecimal(2.00), 2));
@@ -389,5 +409,5 @@
         final InputStream outputIS = SoapUIClientServiceMBeanUnitTest.class.getResourceAsStream("output.xml") ;
         
         System.out.println("compare returns: " + compareCharStreams(expectedIS, outputIS));
-    }
+    }    
 }

Copied: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/helloworld.wsdl (from rev 21592, labs/jbossesb/workspace/jimma/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/helloworld.wsdl)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/helloworld.wsdl	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/helloworld.wsdl	2008-08-18 21:59:30 UTC (rev 21608)
@@ -0,0 +1,71 @@
+<wsdl:definitions targetNamespace='http://soa.jboss.org/ESBServiceSample' xmlns:ns1='http://www.jboss.org/sayHi' xmlns:ns2='http://www.jboss.org/sayHi' xmlns:ns3='http://www.jboss.org/sayHi' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://soa.jboss.org/ESBServiceSample' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'>
+ <wsdl:types>
+  <xs:schema elementFormDefault='qualified' targetNamespace='http://www.jboss.org/sayHi' version='1.0' xmlns:x1='http://www.jboss.org/sayHi' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+   <xs:element name='sayHi' type='x1:sayHi'/>
+   <xs:complexType name='sayHi'>
+    <xs:sequence>
+     <xs:element minOccurs='0' name='arg0' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+
+  </xs:schema>
+  <xs:schema elementFormDefault='qualified' targetNamespace='http://www.jboss.org/sayHi' version='1.0' xmlns:x1='http://www.jboss.org/sayHi' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+   <xs:element name='sayHiReponse' type='x1:sayHiReponse'/>
+   <xs:complexType name='sayHiReponse'>
+    <xs:sequence>
+     <xs:element minOccurs='0' name='arg0' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+
+  <xs:schema elementFormDefault='qualified' targetNamespace='http://www.jboss.org/sayHi' version='1.0' xmlns:x1='http://www.jboss.org/sayHi' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+   <xs:element name='sayFault' type='x1:fault'/>
+   <xs:complexType name='fault'>
+    <xs:sequence>
+     <xs:element name='code' type='xs:string'/>
+     <xs:element name='faultString' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+
+ </wsdl:types>
+ <wsdl:message name='HelloWorldPubServiceReq'>
+  <wsdl:part element='ns1:sayHi' name='in'></wsdl:part>
+ </wsdl:message>
+ <wsdl:message name='HelloWorldPubServiceRes'>
+  <wsdl:part element='ns1:sayHiReponse' name='out'></wsdl:part>
+ </wsdl:message>
+ <wsdl:message name='HelloWorldPubServiceFault1'>
+  <wsdl:part element='ns1:sayFault' name='fault1'></wsdl:part>
+
+ </wsdl:message>
+ <wsdl:portType name='HelloWorldPubServicePortType'>
+  <wsdl:operation name='HelloWorldPubServiceOp'>
+   <wsdl:input message='tns:HelloWorldPubServiceReq' name='HelloWorldPubServiceReq'></wsdl:input>
+   <wsdl:output message='tns:HelloWorldPubServiceRes' name='HelloWorldPubServiceRes'></wsdl:output>
+   <wsdl:fault message='tns:HelloWorldPubServiceFault1' name='HelloWorldPubServiceFault1'></wsdl:fault>
+  </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name='HelloWorldPubServiceBinding' type='tns:HelloWorldPubServicePortType'>
+
+  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <wsdl:operation name='HelloWorldPubServiceOp'>
+   <wsdl:input>
+    <soap:body use='literal'/>
+   </wsdl:input>
+   <wsdl:output>
+    <soap:body use='literal'/>
+   </wsdl:output>
+   <wsdl:fault name='HelloWorldPubServiceFault1'>
+
+    <soap:fault name='HelloWorldPubServiceFault1' use='literal'/>
+   </wsdl:fault>
+  </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name='HelloWorldPubServiceService'>
+  <wsdl:port binding='tns:HelloWorldPubServiceBinding' name='HelloWorldPubServicePortType'>
+   <soap:address location='http://127.0.0.1:8080/Quickstart_helloworld_pub_service/ESBServiceSample/HelloWorldPubService'/>
+  </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/contract.jsp
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/contract.jsp	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/contract.jsp	2008-08-18 21:59:30 UTC (rev 21608)
@@ -1,86 +1,92 @@
-<%@ page import="java.util.List" %>
-<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
-<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
-<%@ page import="org.jboss.soa.esb.services.registry.ServiceNotFoundException" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
-<%@ page import="java.net.URI" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
-<%@ page import="org.jboss.soa.esb.actions.soap.WebserviceContractPublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
-<%
-    List publishers = ServicePublisher.getServicePublishers();
-    Registry registry = RegistryFactory.getRegistry();
-    String targetServiceCat = request.getParameter("serviceCat");
-    String targetServiceName = request.getParameter("serviceName");
-    String targetProtocol = request.getParameter("protocol");
-    ContractInfo contractInfo = null;
-    String contractData = null;
-    List eprs;
-
-    try {
-        List allEprs = (List) registry.findEPRs(targetServiceCat, targetServiceName);
-        eprs = new ArrayList(allEprs.size());
-        
-        for (int i = 0; i < allEprs.size(); i++) {
-        	EPR epr = (EPR) allEprs.get(i);
-            URI eprURI = URI.create(epr.getAddr().getAddress());
-            String protocol = eprURI.getScheme();
-
-        	if (protocol.equalsIgnoreCase(targetProtocol)) {
-        		eprs.add(epr);
-        	}
-        	
-        }
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="org.jboss.soa.esb.services.registry.ServiceNotFoundException" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ServletContractPublisher" %>
+<%@ page import="org.jboss.soa.esb.Service" %>
+<%
+    Registry registry = RegistryFactory.getRegistry();
+    String targetServiceCat = request.getParameter("serviceCat");
+    String targetServiceName = request.getParameter("serviceName");
+    String targetProtocol = request.getParameter("protocol");
+    final Service service = new Service(targetServiceCat, targetServiceName) ;
+    
+    final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
+    ContractInfo contractInfo = null;
+    String contractData = "";
+
+    List eprs;
+    try {
+        eprs = (List) registry.findEPRs(targetServiceCat, targetServiceName);
     } catch (ServiceNotFoundException e) {
         // ignore for now - just return an empty list
         eprs = new ArrayList();
-    } catch (RegistryException e) {
-        // ignore for now - just return an empty list
-        eprs = new ArrayList();
-    }
-
-    // JBESB-1547 - Contract console should generate HTTP 404 when asking for non-deployed service WSDL 
-    if (eprs == null || eprs.isEmpty()) {
+    } catch (RegistryException e) {
+        // ignore for now - just return an empty list
+        eprs = new ArrayList();
+    }
+
+    EPR contractPublisherEPR = null ;
+    for (int ii = 0; ii < eprs.size(); ii++) {
+        EPR epr = (EPR) eprs.get(ii);
+        URI eprURI = URI.create(epr.getAddr().getAddress());
+        String protocol = eprURI.getScheme();
+
+        if (protocol.equalsIgnoreCase(targetProtocol)) {
+            contractPublisherEPR = epr ;
+            break;
+        }
+    }
+    
+    for (ServicePublisher servicePublisher: servicePublishers) {
+
+        if (contractPublisherEPR != null) {
+	        final ContractPublisher contractPublisher = servicePublisher.getContractPublisher() ;
+	        if (contractPublisher == null) {
+	            continue;
+	        }
+
+	        if(contractPublisher instanceof ServletContractPublisher) {
+	            contractInfo = ((ServletContractPublisher)contractPublisher).getContractInfo(contractPublisherEPR, request);
+	        } else {
+	            contractInfo = contractPublisher.getContractInfo(contractPublisherEPR);
+	        }
+	
+	        if (contractInfo != null) {
+	            contractData = contractInfo.getData();
+	            if (contractData != null) {
+		            response.setContentType(contractInfo.getMimeType());
+	            }
+	        }
+	        if (contractData == null) {
+	            contractData = "<Unavailable/>";
+	            response.setContentType("text/xml");
+	        }
+	        break ;
+        } else {
+            final Publisher publisher = servicePublisher.getPublisher() ;
+            if (publisher instanceof ContractReferencePublisher) {
+                final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
+                final URI serviceURI = contractReferencePublisher.getServiceURI() ;
+                if (serviceURI.getScheme().equalsIgnoreCase(targetProtocol)) {
+	                response.sendRedirect(contractReferencePublisher.getServiceContractURI().toString()) ;
+	                return ;
+                }
+            }
+        }
+    }
+    // JBESB-1547 - Contract console should generate HTTP 404 when asking for non-deployed service WSDL 
+    if (contractPublisherEPR == null) {
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
-		return;    	
+        return;
     }
-    
-    for (int i = 0; i < publishers.size() && contractInfo == null; i++) {
-        ServicePublisher publisher = (ServicePublisher) publishers.get(i);
-        String serviceCategory = publisher.getCategory();
-        String serviceName = publisher.getServiceName();
-
-        if (publisher.getContractPublisher() == null) {
-            continue;
-        } else if (!serviceCategory.equalsIgnoreCase(targetServiceCat) ||
-                !serviceName.equalsIgnoreCase(targetServiceName)) {
-            continue;
-        }
-
-        for (int ii = 0; ii < eprs.size(); ii++) {
-            EPR epr = (EPR) eprs.get(ii);
-
-            ContractPublisher contractPublisher = publisher.getContractPublisher();
-
-            if(contractPublisher instanceof WebserviceContractPublisher) {
-                contractInfo = ((WebserviceContractPublisher)contractPublisher).getContractInfo(epr, request);
-            } else {
-                contractInfo = contractPublisher.getContractInfo(epr);
-            }
-            break;
-        }
-
-        if (contractInfo != null && contractInfo.getData() != null) {
-            contractData = contractInfo.getData();
-            response.setContentType(contractInfo.getMimeType());
-        } 
-    }
-    
-    if (contractData == null) {
-        contractData = "<Unavailable/>";
-        response.setContentType("text/xml");
-    }
-%><%= contractData %>
\ No newline at end of file
+%><%=contractData%>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/index.jsp
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/index.jsp	2008-08-18 19:09:45 UTC (rev 21607)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/tools/console/contract-web/src/main/webapp/index.jsp	2008-08-18 21:59:30 UTC (rev 21608)
@@ -5,7 +5,11 @@
 <%@ page import="org.jboss.soa.esb.addressing.EPR" %>
 <%@ page import="java.net.URI" %>
 <%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
-<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
+<%@ page import="org.jboss.soa.esb.Service" %>
 <html>
 <head>
     <title>JBoss ESB - Service List</title>
@@ -19,57 +23,79 @@
 
 <div class="pageSection">
     <%
-        List publishers = ServicePublisher.getServicePublishers();
+        List<Service> services = ServicePublisher.getServices();
         Registry registry = RegistryFactory.getRegistry();
 
-        for (int i = 0; i < publishers.size(); i++) {
-            ServicePublisher publisher = (ServicePublisher) publishers.get(i);
-            String serviceCategory = publisher.getCategory();
-            String serviceName = publisher.getServiceName();
-            List eprs;
+        for (Service service: services) {
+            String serviceCategory = service.getCategory();
+            String serviceName = service.getName();
+            
+            final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
+            if ((servicePublishers != null) && (servicePublishers.size() > 0)) {
+    %>
+    <fieldset>
+        <legend><b><%=service%></b></legend>
+                <%=servicePublishers.get(0).getDescription()%>
+    <%
+                for(ServicePublisher servicePublisher: servicePublishers) {
+                    final Publisher publisher = servicePublisher.getPublisher() ;
+                    if (!(publisher instanceof ContractReferencePublisher)) {
+                        List eprs;
 
-            try {
-                eprs = (List) registry.findEPRs(serviceCategory, serviceName);
-            } catch (Exception e) {
-                // ignore for now - just return an empty list
-                eprs = new ArrayList();
-            }
+                        try {
+                            eprs = (List) registry.findEPRs(serviceCategory, serviceName);
+                        } catch (Exception e) {
+                            // ignore for now - just return an empty list
+                            eprs = new ArrayList();
+                        }
+                        for (int ii = 0; ii < eprs.size(); ii++) {
+                            EPR epr = (EPR) eprs.get(ii);
+                            URI eprURI = URI.create(epr.getAddr().getAddress());
+                            String protocol = eprURI.getScheme();
+                            String relContractURI = "contract.jsp?serviceCat=" + serviceCategory + "&serviceName=" + serviceName + "&protocol=" + protocol;
     %>
-    <fieldset>
-        <legend><b><%=serviceCategory%>:<%=serviceName%></b></legend>
-        <%=publisher.getDescription()%>
-        <%
-            for (int ii = 0; ii < eprs.size(); ii++) {
-                EPR epr = (EPR) eprs.get(ii);
-                URI eprURI = URI.create(epr.getAddr().getAddress());
-                String protocol = eprURI.getScheme();
-                String relContractURI = "contract.jsp?serviceCat=" + serviceCategory + "&serviceName=" + serviceName + "&protocol=" + protocol;
-                URI thisPage = URI.create(request.getRequestURL().toString());
-                URI contractURI = thisPage.resolve(relContractURI);
-        %>
         <fieldset>
             <legend><b><%=protocol.toUpperCase()%></b></legend>
 
             <ul>
                 <li><b>Endpoint</b>: <%=eprURI%></li>
-                <%
-                    if(publisher.getContractPublisher() != null) {
-                %>
+    <%
+                            if(publisher != null) {
+                                URI thisPage = URI.create(request.getRequestURL().toString());
+                                URI contractURI = thisPage.resolve(relContractURI);
+    %>
                 <li><b>Contract</b>: <a href="<%=relContractURI%>"><%=contractURI%></a></li>
-                <%
-                    } else {
-                %>
+    <%
+                            } else {
+    %>
                 <li><b>Contract</b>: Unavailable</li>
-                <%
-                    }
-                %>
+    <%
+                            }
+    %>
             </ul>
-        </fieldset>
+        </fieldset>
+    <%
+                        }
+                    } else {
+                        final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
+                        final URI serviceURI = contractReferencePublisher.getServiceURI() ;
+                        final URI serviceContractURI = contractReferencePublisher.getServiceContractURI() ;
+    %>
+         <fieldset>
+            <legend><b>serviceURI.getScheme()</b></legend>
+
+            <ul>
+                <li><b>Endpoint</b>: <%=serviceURI%></li>
+                <li><b>Contract</b>: <a href="<%=serviceContractURI%>"><%=serviceContractURI%></a></li>
+            </ul>
+        </fieldset>
         <%
-            }
-        %>
+                    }
+                }
+    %>
     </fieldset>
     <%
+            }
         }
     %>
 </div>




More information about the jboss-svn-commits mailing list