Author: objectiser
Date: 2010-11-16 20:14:38 -0500 (Tue, 16 Nov 2010)
New Revision: 1115
Added:
trunk/runtime/si/
trunk/runtime/si/.classpath
trunk/runtime/si/.project
trunk/runtime/si/pom.xml
trunk/runtime/si/src/
trunk/runtime/si/src/main/
trunk/runtime/si/src/main/java/
trunk/runtime/si/src/main/java/org/
trunk/runtime/si/src/main/java/org/jboss/
trunk/runtime/si/src/main/java/org/jboss/soa/
trunk/runtime/si/src/main/java/org/jboss/soa/si/
trunk/runtime/si/src/main/java/org/jboss/soa/si/InvocationAdapter.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/MessageAdapter.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ServiceInvoker.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/BaseWebServiceEndpoint.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/DOMWriter.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/JavaUtils.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/SOAPMessageAdapter.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/TemplateWebServiceEndpoint.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLParser.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLReference.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSInvocationAdapter.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceDetails.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceFactory.java
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceProviderFactory.java
trunk/runtime/si/src/main/resources/
trunk/runtime/si/src/test/
trunk/runtime/si/src/test/java/
trunk/runtime/si/src/test/resources/
Modified:
trunk/pom.xml
trunk/runtime/engine-assembly/pom.xml
trunk/runtime/engine-assembly/src/main/assembly/sar.xml
Log:
Moved ODE independent SI classes to separate module. These are primarily the runtime side
- need to now look more at the deployment side to see if there is anything generic that
can be extracted.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-17 01:13:41 UTC (rev 1114)
+++ trunk/pom.xml 2010-11-17 01:14:38 UTC (rev 1115)
@@ -227,6 +227,11 @@
<artifactId>riftsaw-clustering</artifactId>
<version>${riftsaw.engine.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.soa</groupId>
+ <artifactId>si</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
<!-- ODE1.3.3 dependencies -->
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
Modified: trunk/runtime/engine-assembly/pom.xml
===================================================================
--- trunk/runtime/engine-assembly/pom.xml 2010-11-17 01:13:41 UTC (rev 1114)
+++ trunk/runtime/engine-assembly/pom.xml 2010-11-17 01:14:38 UTC (rev 1115)
@@ -27,6 +27,11 @@
<version>${riftsaw.engine.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.soa</groupId>
+ <artifactId>si</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-bpel-compiler</artifactId>
</dependency>
Modified: trunk/runtime/engine-assembly/src/main/assembly/sar.xml
===================================================================
--- trunk/runtime/engine-assembly/src/main/assembly/sar.xml 2010-11-17 01:13:41 UTC (rev
1114)
+++ trunk/runtime/engine-assembly/src/main/assembly/sar.xml 2010-11-17 01:14:38 UTC (rev
1115)
@@ -57,6 +57,7 @@
<include>org.jboss.soa.bpel:riftsaw-dao-jpa-hibernate</include>
<!--include>org.jboss.soa.bpel:riftsaw-dao-hibernate</include-->
<include>org.jboss.soa.bpel.runtime:riftsaw-engine</include>
+ <include>org.jboss.soa:si</include>
<include>org.jboss.soa.bpel:riftsaw-jacob</include>
<include>org.jboss.soa.bpel:riftsaw-scheduler-simple</include>
<include>org.jboss.soa.bpel.runtime:riftsaw-uddi</include>
Added: trunk/runtime/si/.classpath
===================================================================
--- trunk/runtime/si/.classpath (rev 0)
+++ trunk/runtime/si/.classpath 2010-11-17 01:14:38 UTC (rev 1115)
@@ -0,0 +1,276 @@
+<classpath>
+ <classpathentry kind="src" path="src/test/java"
output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources"
output="target/test-classes" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java"
including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources"
excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/annogen/annogen/0.1.0/annogen-0.1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-api/1.2.7/axiom-api-1.2.7.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-dom/1.2.7/axiom-dom-1.2.7.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/axiom/axiom-impl/1.2.7/axiom-impl-1.2.7.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-adb/1.3/axis2-adb-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-codegen/1.3/axis2-codegen-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-java2wsdl/1.3/axis2-java2wsdl-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-kernel/1.3/axis2-kernel-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-saaj/1.3/axis2-saaj-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/axis2/axis2-saaj-api/1.3/axis2-saaj-api-1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/backport-util-concurrent/backport-util-concurrent/2.2/backport-util-concurrent-2.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/bouncycastle/bcprov-jdk15/1.43/bcprov-jdk15-1.43.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/cglib/cglib/2.1.3/cglib-2.1.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-beanutils/commons-beanutils/1.8.2/commons-beanutils-1.8.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-fileupload/commons-fileupload/1.1.1/commons-fileupload-1.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-api/2.2.6/cxf-api-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-common-schemas/2.2.6/cxf-common-schemas-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-common-utilities/2.2.6/cxf-common-utilities-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-rt-bindings-soap/2.2.6/cxf-rt-bindings-soap-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-rt-core/2.2.6/cxf-rt-core-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-rt-databinding-jaxb/2.2.6/cxf-rt-databinding-jaxb-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-rt-ws-security/2.2.6/cxf-rt-ws-security-2.2.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/cxf/cxf-tools-common/2.2.6/cxf-tools-common-2.2.6.jar"/>
+ <classpathentry kind="src" path="/deployer"/>
+ <classpathentry kind="var"
path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.0.1/geronimo-activation_1.1_spec-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/components/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1.1/geronimo-j2ee-connector_1.5_spec-1.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.2/geronimo-javamail_1.4_spec-1.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0/geronimo-jms_1.1_spec-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/specs/geronimo-stax-api_1.0_spec/1.0.1/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/geronimo/components/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/gnu-getopt/getopt/1.0.12-brew/getopt-1.0.12-brew.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/com/h2database/h2/1.2.124/h2-1.2.124.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore/4.0-alpha5/httpcore-4.0-alpha5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore-nio/4.0-alpha5/httpcore-nio-4.0-alpha5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/httpcomponents/httpcore-niossl/4.0-alpha5/httpcore-niossl-4.0-alpha5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch6-brew/jacorb-2.3.0jboss.patch6-brew.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javassist/javassist/3.11.0.GA/javassist-3.11.0.GA-sources.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javassist/javassist/3.11.0.GA/javassist-3.11.0.GA.jar"
sourcepath="M2_REPO/javassist/javassist/3.11.0.GA/javassist-3.11.0.GA-sources.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/sun-jaxb/jaxb-api/2.1.9-brew/jaxb-api-2.1.9-brew.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/sun-jaxws/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-core/2.1.1.GA/jboss-aop-asintegration-core-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-jmx/2.1.1.GA/jboss-aop-asintegration-jmx-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-mc/2.1.1.GA/jboss-aop-asintegration-mc-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.6.GA/jboss-aop-mc-int-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.1.0.GA/jboss-as-aspects-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA-jboss-ha-legacy-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.1.0.GA/jboss-as-connector-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-deployment/5.1.0.GA/jboss-as-deployment-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-ejb3/5.1.0.GA/jboss-as-ejb3-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA-tests.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.1.0.GA/jboss-as-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-management/5.1.0.GA/jboss-as-management-5.1.0.GA-jsr77-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.1.0.GA/jboss-as-mbeans-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.1.0.GA/jboss-as-profileservice-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.1.0.GA/jboss-as-security-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-jmx-invoker-adaptor-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-3/jboss-bootstrap-1.0.0-Beta-3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.6.GA/jboss-classloader-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.6.GA/jboss-classloading-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.GA/jboss-classloading-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.6.GA/jboss-classloading-vfs-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-corba-ots-spi/5.1.0.GA/jboss-corba-ots-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.CR1/jboss-current-invocation-aspects-1.0.0.CR1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.6.GA/jboss-dependency-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.7.GA/jboss-deployers-client-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.7.GA/jboss-deployers-client-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.7.GA/jboss-deployers-core-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.7.GA/jboss-deployers-core-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.7.GA/jboss-deployers-impl-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.7.GA/jboss-deployers-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.7.GA/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.7.GA/jboss-deployers-vfs-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.7.GA/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.GA/jboss-deployment-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.GA/jboss-ejb-api-3.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-as-int/1.1.5/jboss-ejb3-as-int-1.1.5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/1.0.0/jboss-ejb3-cache-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-deployers/1.0.0/jboss-ejb3-deployers-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-endpoint/0.1.0/jboss-ejb3-endpoint-0.1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/1.0.0/jboss-ejb3-ext-api-impl-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/1.0.2/jboss-ejb3-interceptors-1.0.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-mc-int/1.0.1/jboss-ejb3-mc-int-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/1.0.0/jboss-ejb3-metadata-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0-client.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ejb3/jboss-ejb3-transactions/1.0.0/jboss-ejb3-transactions-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.1.GA/jboss-ha-client-1.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.1.GA/jboss-ha-server-api-1.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-jbc/2.0.0.GA/jboss-ha-server-cache-jbc-2.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-spi/2.0.0.GA/jboss-ha-server-cache-spi-2.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-integration/5.1.0.GA/jboss-integration-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.GA_SP1/jboss-jacc-api-1.1.0.GA_SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-jad-api/1.2.0.GA/jboss-jad-api-1.2.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-jca-spi/5.0.3.GA/jboss-jca-spi-5.0.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0/jboss-jpa-deployers-1.0.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.6.GA/jboss-kernel-2.0.6.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/logbridge/jboss-logbridge/1.0.0.GA/jboss-logbridge-1.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/logging/jboss-logging-jdk/2.1.0.GA/jboss-logging-jdk-2.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.1.0.GA/jboss-logging-log4j-2.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/logmanager/jboss-logmanager/1.0.0.GA/jboss-logmanager-1.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR8/jboss-managed-2.1.0.CR8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jboss/messaging/jboss-messaging/1.4.3.GA/jboss-messaging-1.4.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.1.GA/jboss-metadata-1.0.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.1/jboss-remoting-2.5.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.2/jboss-remoting-aspects-1.0.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0.GA/jboss-security-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.3.SP1/jboss-security-spi-2.0.3.SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossas/jboss-server-manager/1.0.2.GA/jboss-server-manager-1.0.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jboss-vfs/2.1.2.GA/jboss-vfs-2.1.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/security/jbosssx/2.0.3.SP1/jbosssx-2.0.3.SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/security/jbosssx-client/2.0.3.SP1/jbosssx-client-2.0.3.SP1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxrpc/3.0.4.GA/jbossws-native-jaxrpc-3.0.4.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws/3.1.2.GA/jbossws-native-jaxws-3.1.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ws/native/jbossws-native-saaj/3.1.2.GA/jbossws-native-saaj-3.1.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.3.GA/jbossws-spi-1.0.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/security/jbossxacml/2.0.3/jbossxacml-2.0.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jencks/jencks/2.1/jencks-2.1-all.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jgroups/jgroups/2.6.10.GA/jgroups-2.6.10.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/naming/jnp-client/5.0.3.GA/jnp-client-5.0.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/naming/jnpserver/5.0.3.GA/jnpserver-5.0.3.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/sun-jaxws/jsr181-api/2.1.1/jsr181-api-2.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/junit/junit/4.8.1/junit-4.8.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/neethi/neethi/2.0.2/neethi-2.0.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-agents/2.2.0-SNAPSHOT/riftsaw-agents-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-api/2.2.0-SNAPSHOT/riftsaw-bpel-api-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-compiler/2.2.0-SNAPSHOT/riftsaw-bpel-compiler-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-dao/2.2.0-SNAPSHOT/riftsaw-bpel-dao-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-epr/2.2.0-SNAPSHOT/riftsaw-bpel-epr-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-obj/2.2.0-SNAPSHOT/riftsaw-bpel-obj-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-runtime/2.2.0-SNAPSHOT/riftsaw-bpel-runtime-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-schemas/2.2.0-SNAPSHOT/riftsaw-bpel-schemas-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-bpel-store/2.2.0-SNAPSHOT/riftsaw-bpel-store-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-jacob/2.2.0-SNAPSHOT/riftsaw-jacob-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-scheduler-simple/2.2.0-SNAPSHOT/riftsaw-scheduler-simple-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/soa/bpel/riftsaw-utils/2.2.0-SNAPSHOT/riftsaw-utils-2.2.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/net/sf/saxon/saxon/9.1.0.8/saxon-9.1.0.8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/net/sf/saxon/saxon-dom/9.1.0.8/saxon-dom-9.1.0.8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/net/sf/saxon/saxon-xpath/9.1.0.8/saxon-xpath-9.1.0.8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/net/sf/saxon/saxon-xqj/9.1.0.8/saxon-xqj-9.1.0.8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.2.GA/slf4j-jboss-logging-1.0.2.GA.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring/2.5.6/spring-2.5.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-aop/2.0.6/spring-aop-2.0.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-beans/2.5.6/spring-beans-2.5.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-context/2.5.6/spring-context-2.5.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-core/2.0.6/spring-core-2.0.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-jms/2.0.6/spring-jms-2.0.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/woden/woden/1.0-incubating-M7b/woden-1.0-incubating-M7b.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ws/security/wss4j/1.5.8/wss4j-1.5.8.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/jencks/xapool-without-pool/1.4/xapool-without-pool-1.4.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/apache-xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xerces/xercesImpl/2.9.0/xercesImpl-2.9.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/xmlbeans/xmlbeans/2.2.0/xmlbeans-2.2.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/xmlsec/1.4.2/xmlsec-1.4.2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/apache/santuario/xmlsec/1.4.3/xmlsec-1.4.3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xom/xom/1.0/xom-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/com/thoughtworks/xstream/xstream/1.2/xstream-1.2.jar"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: trunk/runtime/si/.project
===================================================================
--- trunk/runtime/si/.project (rev 0)
+++ trunk/runtime/si/.project 2010-11-17 01:14:38 UTC (rev 1115)
@@ -0,0 +1,14 @@
+<projectDescription>
+ <name>soa-si</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: trunk/runtime/si/pom.xml
===================================================================
--- trunk/runtime/si/pom.xml (rev 0)
+++ trunk/runtime/si/pom.xml 2010-11-17 01:14:38 UTC (rev 1115)
@@ -0,0 +1,230 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa</groupId>
+ <artifactId>si</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2.0-SNAPSHOT</version>
+ <name>SOA::SI</name>
+
+ <parent>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>runtime</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-store</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-dao</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-utils</artifactId>
+ </dependency>
+
+ <!-- ODE2 dependencies
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-il-common</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-engine</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+ -->
+
+ <!-- ODE1.3.3 dependencies -->
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-epr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-agents</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-scheduler-simple</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>deployer</artifactId>
+ <version>${pom.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- WS support -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <classifier>sources</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <version>${jboss.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>${jboss.version}</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-compiler</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-core</artifactId>
+ <version>${cxf.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-security</artifactId>
+ <version>${cxf.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- for H2Database -->
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+
+ <build>
+ <!-- This section defines the default plugin settings inherited by child projects.
-->
+ <pluginManagement>
+ <plugins>
+ <!-- Fixes how test resources of a project can be used in projects dependent
on it -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.1.1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <excludes>
+ <exclude>jboss:jboss-common</exclude>
+ <exclude>jboss:jboss-system</exclude>
+ <exclude>jboss:jboss-jmx</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <!-- Specify the compiler options and settings -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>false</showWarnings>
+ </configuration>
+ </plugin>
+
+ <!-- Produce source jars during the 'verify' phase -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+</project>
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/InvocationAdapter.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/InvocationAdapter.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/InvocationAdapter.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Hides the message translation details when invoking ODE from
+ * an external component (i.e. ESB or WS).
+ *
+ * @see org.jboss.soa.bpel.runtime.engine.BPELEngine#invoke(InvocationAdapter)
+ *
+ * @author Heiko Braun <hbraun(a)redhat.com>
+ */
+public interface InvocationAdapter<T> {
+
+ String getOperationName();
+
+ QName getServiceName();
+
+ String getPortName();
+
+ /**
+ * Callback from the Service towards the adapter when
+ * turning an external message representation into a Service request.
+ *
+ * @param mex
+ * @param odeRequest
+ */
+ void initRequest(javax.wsdl.Operation op, MessageAdapter request);
+
+ /**
+ * Callback from the Engine towards the adapter when
+ * turning an ODE response {@link org.apache.ode.bpel.iapi.Message} into an external
format <T>
+ * @param mex
+ */
+ void createResponse(javax.wsdl.Operation wsdl, MessageAdapter resp);
+
+ void createFault(javax.wsdl.Operation op, QName faultName, MessageAdapter fault);
+
+ /**
+ * Access the invocation result (response)
+ * @return T
+ */
+ T getInvocationResult();
+
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/MessageAdapter.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/MessageAdapter.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/MessageAdapter.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.soa.si;
+
+public interface MessageAdapter {
+
+ public org.w3c.dom.Element getMessage();
+
+ public void setPart(String name, org.w3c.dom.Element elem);
+
+ public org.w3c.dom.Element getPart(String name);
+
+ public void setHeaderPart(String name, org.w3c.dom.Element elem);
+
+ public java.util.Map<String, org.w3c.dom.Node> getHeaderParts();
+
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ServiceInvoker.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ServiceInvoker.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ServiceInvoker.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.soa.si;
+
+public interface ServiceInvoker {
+
+ /**
+ * This method initializes the service invoker. This method must
+ * be called before using the invoker.
+ *
+ * @throws Exception Failed to initialize
+ */
+ public void init() throws Exception;
+
+ /**
+ * This method invokes the associated service using the invocation
+ * adapter supplied.
+ *
+ * @param invocationAdapter The invocation adapter
+ * @throws Exception Failed to invoke the service
+ */
+ public void invoke(InvocationAdapter<?> invocationAdapter) throws Exception;
+
+ /**
+ * This method closes the service invoker.
+ *
+ * @throws Exception Failed to close
+ */
+ public void close() throws Exception;
+
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/BaseWebServiceEndpoint.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/BaseWebServiceEndpoint.java
(rev 0)
+++
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/BaseWebServiceEndpoint.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,226 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+import javax.xml.ws.Provider;
+
+/**
+ * Base class for BPEL endpoints that are created through javassist.
+ * Represents a JAX-WS {@link javax.xml.ws.Provider} implementation.
+ *
+ * @see org.jboss.soa.si.ws.WebServiceProviderFactory
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class BaseWebServiceEndpoint implements Provider<SOAPMessage>
+{
+ protected final Log log = LogFactory.getLog(getClass());
+
+ private SOAPMessageAdapter soapAdapter;
+ private QName serviceQName;
+ private Definition wsdlDefinition;
+ private WebServiceFactory serviceFactory;
+
+ private boolean isInitialized;
+
+ private void init()
+ {
+ if(!isInitialized)
+ {
+ try
+ {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ this.wsdlDefinition = wsdlReader.readWSDL(getWsdlLocation());
+ this.serviceQName = QName.valueOf(getServiceName());
+ this.soapAdapter = new SOAPMessageAdapter(wsdlDefinition, serviceQName,
getPortName());
+
+ WebServiceDetails details=getClass().getAnnotation(WebServiceDetails.class);
+
+ if (details != null) {
+ try {
+ Class<?> cls=Class.forName(details.factory());
+
+ serviceFactory = (WebServiceFactory)cls.newInstance();
+
+ } catch(ClassNotFoundException cnfe) {
+ throw new RuntimeException("Unable to find Web Service Factory class
'"+
+ details.factory()+"'", cnfe);
+ } catch(Exception ex) {
+ throw new RuntimeException("Failed to instantiate Web Service Factory
class '"+
+ details.factory()+"'", ex);
+ }
+ } else {
+ throw new RuntimeException("Web service details not defined on Web Service
endpoint");
+ }
+ }
+ catch (WSDLException e)
+ {
+ throw new RuntimeException("Failed to parse WSDL", e);
+ }
+ isInitialized = true;
+ }
+ }
+
+ public SOAPMessage invoke(SOAPMessage soapMessage)
+ {
+ log.debug("Invoking endpoint "+getEndpointId());
+ init();
+
+ try
+ {
+ SOAPPart soapPart = soapMessage.getSOAPPart();
+ SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
+ Element messageElement = getMessagePayload(soapEnvelope);
+
+ if(log.isDebugEnabled())
+ log.debug( "ODE inbound message: \n" +DOMWriter.printNode(soapEnvelope,
true) );
+
+ // Create invocation context
+ final String operationName = resolveOperationName(messageElement);
+
+ WSInvocationAdapter invocationContext =
serviceFactory.getInvocationAdapter(operationName,
+ serviceQName, getPortName(), soapAdapter);
+
+ invocationContext.setSOAPMessage(soapMessage);
+
+ // Invoke ODE
+ serviceFactory.getServiceInvoker().invoke(invocationContext);
+
+ // Handle response
+ SOAPMessage responseMessage = null;
+
+ if (isResponseExpected(messageElement)) {
+ responseMessage = invocationContext.getInvocationResult();
+
+ if(log.isDebugEnabled())
+ log.debug( "ODE outbound message: \n" +
+ DOMWriter.printNode(responseMessage.getSOAPPart().getEnvelope(), true)
+ );
+ } else if (log.isDebugEnabled()) {
+ log.debug( "ODE no outbound message");
+ }
+
+ if (responseMessage == null) {
+ log.debug("No response, probably due to oneway request");
+
+ // Need to create an empty response to avoid npe in jbossws (RIFTSAW-154)
+ responseMessage = MessageFactory.newInstance().createMessage();
+ }
+
+ return responseMessage;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to invoke BPEL process:
"+e.getMessage(), e);
+ }
+ }
+
+ public String resolveOperationName(Element payload)
+ {
+ if(soapAdapter.isRPC())
+ {
+ return payload.getLocalName();
+ }
+ else
+ {
+ QName elementName = new QName(payload.getNamespaceURI(), payload.getLocalName());
+ Operation op = new WSDLParser(wsdlDefinition).getDocLitOperation(
+ this.serviceQName, getPortName(), elementName
+ );
+
+ return op.getName();
+ }
+ }
+
+ public boolean isResponseExpected(Element payload)
+ {
+ Operation op=null;
+
+ if(soapAdapter.isRPC())
+ {
+ QName elementName = new QName(payload.getNamespaceURI(),
payload.getLocalName());
+ op = new WSDLParser(wsdlDefinition).getRPCOperation(
+ this.serviceQName, getPortName(), elementName
+ );
+ }
+ else
+ {
+ QName elementName = new QName(payload.getNamespaceURI(), payload.getLocalName());
+ op = new WSDLParser(wsdlDefinition).getDocLitOperation(
+ this.serviceQName, getPortName(), elementName
+ );
+ }
+
+ if (op == null) {
+ throw new RuntimeException("Failed to locate operation definition for:
"+payload);
+ }
+
+ return op.getOutput() != null;
+ }
+
+ public static Element getMessagePayload(SOAPEnvelope soapEnvelope)
+ throws SOAPException
+ {
+ SOAPBody body = soapEnvelope.getBody();
+ Element messageElement = null; // first child of type Element
+ NodeList children = body.getChildNodes();
+ for(int i=0; i<children.getLength(); i++)
+ {
+ Node tmp = children.item(i);
+ if(Node.ELEMENT_NODE == tmp.getNodeType())
+ {
+ messageElement = (Element)tmp;
+ break;
+ }
+ }
+ return messageElement;
+ }
+
+ public String getEndpointId() {
+ return(null);
+ }
+
+ public String getServiceName() {
+ return(null);
+ }
+
+ public String getWsdlLocation() {
+ return(null);
+ }
+
+ public String getPortName() {
+ return(null);
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/DOMWriter.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/DOMWriter.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/DOMWriter.java 2010-11-17 01:14:38
UTC (rev 1115)
@@ -0,0 +1,656 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Traverse a DOM tree in order to print a document that is parsed.
+ *
+ * @author Andy Clark, IBM
+ * @author Thomas.Diesler(a)jboss.org
+ */
+@SuppressWarnings("unchecked")
+public class DOMWriter
+{
+ // Print writer
+ private PrintWriter out;
+ // True, if canonical output
+ private boolean canonical;
+ // True, if pretty printing should be used
+ private boolean prettyprint;
+ // True, if the XML declaration should be written
+ private boolean writeXMLDeclaration;
+ // True, if whitespace should be ignored
+ private boolean ignoreWhitespace;
+ // Explicit character set encoding
+ private String charsetName;
+ // indent for the pretty printer
+ private int prettyIndent;
+ // True, if the XML declaration has been written
+ private boolean wroteXMLDeclaration;
+ // The node that started the write
+ private Node rootNode;
+ // True if we want namespace completion
+ private boolean completeNamespaces = true;
+ // The current default namespace
+ private String currentDefaultNamespace;
+
+ public DOMWriter(Writer w)
+ {
+ this.out = new PrintWriter(w);
+ }
+
+ public DOMWriter(Writer w, String charsetName)
+ {
+ this.out = new PrintWriter(w);
+ this.charsetName = charsetName;
+ this.writeXMLDeclaration = true;
+ }
+
+ public DOMWriter(OutputStream stream)
+ {
+ try
+ {
+ this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ // ignore, UTF-8 should be available
+ }
+ }
+
+ public DOMWriter(OutputStream stream, String charsetName)
+ {
+ try
+ {
+ this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
+ this.charsetName = charsetName;
+ this.writeXMLDeclaration = true;
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new IllegalArgumentException("Unsupported encoding: " +
charsetName);
+ }
+ }
+
+ /**
+ * Print a node with explicit prettyprinting.
+ * The defaults for all other DOMWriter properties apply.
+ *
+ */
+ public static String printNode(Node node, boolean prettyprint)
+ {
+ StringWriter strw = new StringWriter();
+ new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
+ return strw.toString();
+ }
+
+ public boolean isCanonical()
+ {
+ return canonical;
+ }
+
+ /**
+ * Set wheter entities should appear in their canonical form.
+ * The default is false.
+ */
+ public DOMWriter setCanonical(boolean canonical)
+ {
+ this.canonical = canonical;
+ return this;
+ }
+
+ public boolean isIgnoreWhitespace()
+ {
+ return ignoreWhitespace;
+ }
+
+ /**
+ * Set whether whitespace should be ignored.
+ * The default is false.
+ */
+ public DOMWriter setIgnoreWhitespace(boolean ignoreWhitespace)
+ {
+ this.ignoreWhitespace = ignoreWhitespace;
+ return this;
+ }
+
+ /**
+ * Set wheter subelements should have their namespaces completed.
+ * Setting this to false may lead to invalid XML fragments.
+ * The default is true.
+ */
+ public DOMWriter setCompleteNamespaces(boolean complete)
+ {
+ this.completeNamespaces = complete;
+ return this;
+ }
+
+ public boolean isPrettyprint()
+ {
+ return prettyprint;
+ }
+
+ /**
+ * Set wheter element should be indented.
+ * The default is false.
+ */
+ public DOMWriter setPrettyprint(boolean prettyprint)
+ {
+ this.prettyprint = prettyprint;
+ return this;
+ }
+
+ public boolean isWriteXMLDeclaration()
+ {
+ return writeXMLDeclaration;
+ }
+
+ /**
+ * Set wheter the XML declaration should be written.
+ * The default is false.
+ */
+ public DOMWriter setWriteXMLDeclaration(boolean flag)
+ {
+ this.writeXMLDeclaration = flag;
+ return this;
+ }
+
+ public void print(Node node)
+ {
+ if (prettyprint && ignoreWhitespace)
+ throw new IllegalStateException("Cannot pretty print and ignore
whitespace");
+
+ rootNode = node;
+ printInternal(node, false);
+ }
+
+ private void printInternal(Node node, boolean indentEndMarker)
+ {
+ // is there anything to do?
+ if (node == null)
+ {
+ return;
+ }
+
+ // JBAS-2117 - Don't skip the DOCUMENT_NODE
+ // if (node instanceof Document) node = ((Document)node).getDocumentElement();
+
+ if (wroteXMLDeclaration == false && writeXMLDeclaration == true &&
canonical == false)
+ {
+ out.print("<?xml version='1.0'");
+ if (charsetName != null)
+ out.print(" encoding='" + charsetName + "'");
+
+ out.print("?>");
+ if (prettyprint)
+ out.println();
+
+ wroteXMLDeclaration = true;
+ }
+
+ int type = node.getNodeType();
+ boolean hasChildNodes = node.getChildNodes().getLength() > 0;
+
+ String nodeName = node.getNodeName();
+ switch (type)
+ {
+ // print document
+ case Node.DOCUMENT_NODE:
+ {
+ NodeList children = node.getChildNodes();
+ int len = children.getLength();
+ for (int iChild = 0; iChild < len; iChild++)
+ {
+ printInternal(children.item(iChild), false);
+ }
+ out.flush();
+ break;
+ }
+
+ // print element with attributes
+ case Node.ELEMENT_NODE:
+ {
+ Element element = (Element)node;
+ if (prettyprint)
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+ prettyIndent++;
+ }
+
+ out.print('<');
+ out.print(nodeName);
+
+ Map nsMap = new HashMap();
+ String elPrefix = node.getPrefix();
+ String elNamespaceURI = node.getNamespaceURI();
+ if (elPrefix != null)
+ {
+ String nsURI = getNamespaceURI(elPrefix, element, rootNode);
+ nsMap.put(elPrefix, nsURI);
+ }
+
+ Attr attrs[] = sortAttributes(node.getAttributes());
+ for (int i = 0; i < attrs.length; i++)
+ {
+ Attr attr = attrs[i];
+ String atPrefix = attr.getPrefix();
+ String atName = attr.getNodeName();
+ String atValue = normalize(attr.getNodeValue(), canonical);
+
+ if (atName.equals("xmlns"))
+ currentDefaultNamespace = atValue;
+
+ if (atPrefix != null && !atPrefix.equals("xmlns")
&& !atPrefix.equals("xml"))
+ {
+ String nsURI = getNamespaceURI(atPrefix, element, rootNode);
+ nsMap.put(atPrefix, nsURI);
+ // xsi:type='ns1:SubType', xsi:type='xsd:string'
+ if (atName.equals(atPrefix + ":type") &&
atValue.indexOf(":") > 0)
+ {
+ // xsi defined on the envelope
+ if (nsURI == null)
+ nsURI = getNamespaceURI(atPrefix, element, null);
+
+ if
("http://www.w3.org/2001/XMLSchema-instance".equals(nsURI))
+ {
+ String typePrefix = atValue.substring(0,
atValue.indexOf(":"));
+ String typeURI = getNamespaceURI(typePrefix, element, rootNode);
+ nsMap.put(typePrefix, typeURI);
+ }
+ }
+ }
+
+ out.print(" " + atName + "='" + atValue +
"'");
+ }
+
+ // Add namespace declaration for prefixes
+ // that are defined further up the tree
+ if (completeNamespaces)
+ {
+ Iterator itPrefix = nsMap.keySet().iterator();
+ while (itPrefix.hasNext())
+ {
+ String prefix = (String)itPrefix.next();
+ String nsURI = (String)nsMap.get(prefix);
+ if (nsURI == null)
+ {
+ nsURI = getNamespaceURI(prefix, element, null);
+ out.print(" xmlns:" + prefix + "='" + nsURI
+ "'");
+ }
+ }
+ }
+
+ // The SAX ContentHandler will by default not add the namespace declaration
+ // <Hello xmlns='http://somens'>World</Hello>
+ if (elPrefix == null && elNamespaceURI != null)
+ {
+ String defaultNamespace = element.getAttribute("xmlns");
+ if (defaultNamespace.length() == 0 &&
!elNamespaceURI.equals(currentDefaultNamespace))
+ {
+ out.print(" xmlns='" + elNamespaceURI +
"'");
+ currentDefaultNamespace = elNamespaceURI;
+ }
+ }
+
+ if (hasChildNodes)
+ {
+ out.print('>');
+ }
+
+ // Find out if the end marker is indented
+ indentEndMarker = isEndMarkerIndented(node);
+
+ if (indentEndMarker)
+ {
+ out.print('\n');
+ }
+
+ NodeList childNodes = node.getChildNodes();
+ int len = childNodes.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node childNode = childNodes.item(i);
+ printInternal(childNode, false);
+ }
+ break;
+ }
+
+ // handle entity reference nodes
+ case Node.ENTITY_REFERENCE_NODE:
+ {
+ if (canonical)
+ {
+ NodeList children = node.getChildNodes();
+ if (children != null)
+ {
+ int len = children.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ printInternal(children.item(i), false);
+ }
+ }
+ }
+ else
+ {
+ out.print('&');
+ out.print(nodeName);
+ out.print(';');
+ }
+ break;
+ }
+
+ // print cdata sections
+ case Node.CDATA_SECTION_NODE:
+ {
+ if (canonical)
+ {
+ out.print(normalize(node.getNodeValue(), canonical));
+ }
+ else
+ {
+ out.print("<![CDATA[");
+ out.print(node.getNodeValue());
+ out.print("]]>");
+ }
+ break;
+ }
+
+ // print text
+ case Node.TEXT_NODE:
+ {
+ String text = normalize(node.getNodeValue(), canonical);
+ if (text.trim().length() > 0)
+ {
+ out.print(text);
+ }
+ else if (prettyprint == false && ignoreWhitespace == false)
+ {
+ out.print(text);
+ }
+ break;
+ }
+
+ // print processing instruction
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ {
+ out.print("<?");
+ out.print(nodeName);
+ String data = node.getNodeValue();
+ if (data != null && data.length() > 0)
+ {
+ out.print(' ');
+ out.print(data);
+ }
+ out.print("?>");
+ break;
+ }
+
+ // print comment
+ case Node.COMMENT_NODE:
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+
+ out.print("<!--");
+ String data = node.getNodeValue();
+ if (data != null)
+ {
+ out.print(data);
+ }
+ out.print("-->");
+
+ if (prettyprint)
+ {
+ out.print('\n');
+ }
+
+ break;
+ }
+ }
+
+ if (type == Node.ELEMENT_NODE)
+ {
+ if (prettyprint)
+ prettyIndent--;
+
+ if (hasChildNodes == false)
+ {
+ out.print("/>");
+ }
+ else
+ {
+ if (indentEndMarker)
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+ }
+
+ out.print("</");
+ out.print(nodeName);
+ out.print('>');
+ }
+
+ if (prettyIndent > 0)
+ {
+ out.print('\n');
+ }
+ }
+ out.flush();
+ }
+
+ private String getNamespaceURI(String prefix, Element element, Node stopNode)
+ {
+ Node parent = element.getParentNode();
+ String nsURI = element.getAttribute("xmlns:" + prefix);
+ if (nsURI.length() == 0 && element != stopNode && parent instanceof
Element)
+ return getNamespaceURI(prefix, (Element)parent, stopNode);
+
+ return (nsURI.length() > 0 ? nsURI : null);
+ }
+
+ private boolean isEndMarkerIndented(Node node)
+ {
+ if (prettyprint)
+ {
+ NodeList childNodes = node.getChildNodes();
+ int len = childNodes.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node children = childNodes.item(i);
+ if (children.getNodeType() == Node.ELEMENT_NODE)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /** Returns a sorted list of attributes. */
+ private Attr[] sortAttributes(NamedNodeMap attrs)
+ {
+
+ int len = (attrs != null) ? attrs.getLength() : 0;
+ Attr array[] = new Attr[len];
+ for (int i = 0; i < len; i++)
+ {
+ array[i] = (Attr)attrs.item(i);
+ }
+ for (int i = 0; i < len - 1; i++)
+ {
+ String name = array[i].getNodeName();
+ int index = i;
+ for (int j = i + 1; j < len; j++)
+ {
+ String curName = array[j].getNodeName();
+ if (curName.compareTo(name) < 0)
+ {
+ name = curName;
+ index = j;
+ }
+ }
+ if (index != i)
+ {
+ Attr temp = array[i];
+ array[i] = array[index];
+ array[index] = temp;
+ }
+ }
+ return (array);
+ }
+
+ /** Normalizes the given string. */
+ public static String normalize(String s, boolean canonical)
+ {
+ int len = (s != null) ? s.length() : 0;
+ StringBuilder str = new StringBuilder();
+
+ for (int i = 0; i < len; i++)
+ {
+ char ch = s.charAt(i);
+ switch (ch)
+ {
+ case '<':
+ {
+ str.append("<");
+ break;
+ }
+ case '>':
+ {
+ str.append(">");
+ break;
+ }
+ case '&':
+ {
+ str.append("&");
+ break;
+ }
+ case '"':
+ {
+ str.append(""");
+ break;
+ }
+ case '\'':
+ {
+ str.append("'");
+ break;
+ }
+ case '\r':
+ case '\n':
+ {
+ if (canonical)
+ {
+ str.append("&#");
+ str.append(Integer.toString(ch));
+ str.append(';');
+ break;
+ }
+ // else, default append char
+ }
+ default:
+ {
+ str.append(ch);
+ }
+ }
+ }
+ return (str.toString());
+ }
+}
\ No newline at end of file
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/JavaUtils.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/JavaUtils.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/JavaUtils.java 2010-11-17 01:14:38
UTC (rev 1115)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Method;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @author Jeff Yu <cyu(a)redhat.com>
+ */
+public class JavaUtils
+{
+ protected static final Log log = LogFactory.getLog(JavaUtils.class);
+
+ public static boolean isJBossRepositoryClassLoader(ClassLoader loader)
+ {
+ Class clazz = loader.getClass();
+ while (!clazz.getName().startsWith("java"))
+ {
+ if
("org.jboss.mx.loading.RepositoryClassLoader".equals(clazz.getName()))
+ return true;
+ clazz = clazz.getSuperclass();
+ }
+
+ return false;
+ }
+
+ /**
+ * Clears black lists on a JBoss RepositoryClassLoader. This is somewhat of a hack,
and
+ * could be replaced with an integration module. This is needed when the following
order of
+ * events occur.
+ *
+ * <ol>
+ * <li>loadClass() returns not found</li>
+ * <li>Some call to defineClass()</li>
+ * <ol>
+ *
+ * The CNFE triggers a black list addition, which cause the class never again to be
found.
+ *
+ * @param loader the loader to clear black lists for
+ */
+ public static void clearBlacklists(ClassLoader loader)
+ {
+ if (isJBossRepositoryClassLoader(loader))
+ {
+ for(Method m : loader.getClass().getMethods())
+ {
+ if("clearBlackLists".equalsIgnoreCase(m.getName()))
+ {
+ try
+ {
+ m.invoke(loader);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Convert the SoapMessage object into String.
+ * @param soapMessage
+ * @return
+ */
+ public static String getSoapMessageASString(SOAPMessage soapMessage) {
+ try {
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ soapMessage.writeTo(outputStream);
+ byte[] byteArray = outputStream.toByteArray();
+ String soapMsg = new String( byteArray, "UTF-8");
+ return soapMsg;
+ } catch (Exception e) {
+ log.error("Error in converting SOAPMessage into String");
+ }
+ return null;
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/SOAPMessageAdapter.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/SOAPMessageAdapter.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/SOAPMessageAdapter.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,832 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
+import org.jboss.soa.si.MessageAdapter;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+import javax.wsdl.*;
+import javax.wsdl.extensions.ElementExtensible;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.http.HTTPBinding;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPHeader;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.soap.*;
+
+import java.util.*;
+
+/**
+ * Adopts {@link javax.xml.soap.SOAPMessage}'s to ODE's internal
+ * {@link org.apache.ode.bpel.iapi.Message} representation and vice versa.
+ *
+ * @see org.jboss.soa.bpel.runtime.ws.WebServiceClient
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class SOAPMessageAdapter
+{
+ protected static final Log log = LogFactory.getLog(SOAPMessageAdapter.class);
+
+ private Definition wsdl;
+ private QName serviceName;
+
+ private String portName;
+ private Service serviceDef;
+ private Binding binding;
+
+ private Port port;
+ private boolean isRPC;
+
+ private SOAPBinding soapBinding;
+
+ private SOAPFactory soapFactory;
+
+ public SOAPMessageAdapter(Definition wsdl, QName serviceName, String portName)
+ {
+ this.wsdl = wsdl;
+ this.serviceName = serviceName;
+ this.portName = portName;
+
+ serviceDef = wsdl.getService(serviceName);
+ if (serviceDef == null)
+ throw new RuntimeException("Service not found "+serviceName);
+
+ port = serviceDef.getPort(portName);
+ if (port == null)
+ throw new RuntimeException("Port '"+portName+"' not found on
service: "+serviceName);
+
+ binding = port.getBinding();
+ if (binding == null)
+ throw new RuntimeException("No binding for port "+portName);
+
+ if (!useSOAPBinding(port)) {
+ throw new RuntimeException("No SOAP binding for port"+portName);
+ }
+ soapBinding = (SOAPBinding)getBindingExtension(port);
+
+
+ String style = soapBinding.getStyle();
+ isRPC = style != null && style.equals("rpc");
+
+ try
+ {
+ this.soapFactory = SOAPFactory.newInstance();
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * This method creates the SOAP request and returns the SOAPAction field.
+ *
+ * @param soapMessage
+ * @param odeRequestMessage
+ * @param wsdlOperation
+ * @return The SOAP action
+ */
+ public String createSoapRequest(SOAPMessage soapMessage, MessageAdapter
odeRequestMessage, Operation wsdlOperation)
+ {
+ String ret=null;
+
+ BindingOperation bop = binding.getBindingOperation(wsdlOperation.getName(), null,
null);
+ if (bop == null)
+ throw new RuntimeException("Operation "+wsdlOperation.getName()+"not
found on "+serviceName+"/"+portName);
+
+ BindingInput bi = bop.getBindingInput();
+ if (bi == null)
+ throw new RuntimeException("Binding input not found on
"+serviceName+"/"+portName);
+
+ // Headers
+ createSoapHeaders(
+ soapMessage,
+ getSOAPHeaders(bi),
+ wsdlOperation.getInput().getMessage(),
+ odeRequestMessage.getHeaderParts(),
+ odeRequestMessage.getMessage()
+ );
+
+
+ // SOAP Body
+ javax.wsdl.extensions.soap.SOAPBody wsdlSoapBody = getSOAPBody(bi);
+
+ createSoapBody(
+ soapMessage,
+ wsdlSoapBody,
+ wsdlOperation.getInput().getMessage(),
+ odeRequestMessage.getMessage(),
+ wsdlOperation.getName()
+ );
+
+ // Discover SOAPAction
+ for (Object extension : bop.getExtensibilityElements()) {
+ if (extension instanceof javax.wsdl.extensions.soap.SOAPOperation) {
+ javax.wsdl.extensions.soap.SOAPOperation soapop=
+ (javax.wsdl.extensions.soap.SOAPOperation)extension;
+
+ if (soapop.getSoapActionURI() != null) {
+ ret = soapop.getSoapActionURI();
+ break;
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ public boolean isRPC()
+ {
+ return isRPC;
+ }
+
+ public void createSoapResponse(SOAPMessage soapMessage, MessageAdapter
odeResponseMessage, Operation wsdlOperation)
+ {
+
+ BindingOperation bop =
binding.getBindingOperation(wsdlOperation.getName(),null,null);
+ if (bop == null)
+ throw new RuntimeException("Operation "+wsdlOperation.getName()+"not
found on "+serviceName+"/"+portName);
+
+ BindingOutput bo = bop.getBindingOutput();
+ if (bo == null)
+ throw new RuntimeException("Binding output not found on
"+serviceName+"/"+portName);
+
+ // Headers
+ if (odeResponseMessage.getHeaderParts().size() > 0 || getSOAPHeaders(bo).size()
> 0)
+ createSoapHeaders(
+ soapMessage,
+ getSOAPHeaders(bo),
+ wsdlOperation.getOutput().getMessage(),
+ odeResponseMessage.getHeaderParts(),
+ odeResponseMessage.getMessage()
+ );
+
+
+ // SOAP Body
+ javax.wsdl.extensions.soap.SOAPBody wsdlSOAPBody = getSOAPBody(bo);
+ createSoapBody(
+ soapMessage,
+ wsdlSOAPBody,
+ wsdlOperation.getOutput().getMessage(),
+ odeResponseMessage.getMessage(),
+ wsdlOperation.getName() + "Response"
+ );
+
+ }
+
+ private void createSoapBody(SOAPMessage soapMessage,
+ javax.wsdl.extensions.soap.SOAPBody wsdlSoapBody,
javax.wsdl.Message wsdlMessageDef,
+ Element message, String operationName)
+ {
+ try
+ {
+ SOAPBody soapBody = soapMessage.getSOAPBody();
+
+ SOAPElement partHolder = null;
+ if(isRPC)
+ {
+ partHolder = soapFactory.createElement(new QName(wsdlSoapBody.getNamespaceURI(),
operationName, "odens"));
+ }
+ else
+ {
+ partHolder = soapBody;
+ }
+
+ List<Part> parts = wsdlMessageDef.getOrderedParts(wsdlSoapBody.getParts());
+ for(Part part : parts)
+ {
+ Element srcPartEl = findChildByName(message, new QName(null, part.getName()));
+ if (srcPartEl == null)
+ throw new RuntimeException("Part is missing: " +part.getName());
+
+ SOAPElement partElement = soapFactory.createElement(srcPartEl);
+ if (isRPC)
+ {
+ partHolder.addChildElement(partElement);
+ }
+ else
+ {
+ for (Iterator<SOAPElement> i = partElement.getChildElements();
i.hasNext();) partHolder.addChildElement(i.next());
+ }
+ }
+
+ // late bind
+ if(isRPC)
+ soapBody.addChildElement(partHolder);
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to create soap body",e);
+ }
+ }
+
+ private void createSoapHeaders(SOAPMessage soapMessage, List<SOAPHeader>
headers,
+ javax.wsdl.Message wsdlMessageDef,
+ Map<String, Node> headerParts, Element message)
+ {
+ try {
+ javax.xml.soap.SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ if (soapHeader==null) soapHeader =
soapMessage.getSOAPPart().getEnvelope().addHeader();
+ for (Node headerNode : headerParts.values()) {
+ //like we may have password header with null value.
+ if(headerNode == null){
+ continue;
+ }
+ if (Node.ELEMENT_NODE == headerNode.getNodeType()) {
+ if (getFirstChildWithName(new QName(headerNode.getNamespaceURI(),
headerNode.getLocalName()),soapHeader) == null) {
+ SOAPElement partElement = soapFactory.createElement((Element) headerNode);
+ soapHeader.addChildElement(partElement);
+ }
+ } else {
+ throw new RuntimeException("SOAP header must be a node_element " +
headerNode);
+ }
+ }
+
+ //Add soap header according to binding.
+ for (SOAPHeader header : headers) {
+ Element headerEl = findChildByName(message, new QName(null, header.getPart()));
+ if (headerEl != null) {
+
+ // RIFTSAW-305 - don't think the part name should be added to the SOAP header
+ //SOAPElement soapHeaderEl = soapFactory.createElement(new
QName(header.getMessage().getNamespaceURI(), header.getPart(),"odens"));
+ NodeList list = headerEl.getChildNodes();
+ for(int i=0; i< list.getLength(); i++) {
+ SOAPElement partElement = soapFactory.createElement((Element)list.item(i));
+ soapHeader.addChildElement(partElement);
+ }
+ //soapHeader.addChildElement(soapHeaderEl);
+ }
+ }
+ } catch (SOAPException e) {
+ throw new RuntimeException("Failed to create soap header",e);
+ }
+ }
+
+ public void parseSoapResponse(MessageAdapter odeMessage,
+ SOAPMessage soapMessage, javax.wsdl.Operation
odeOperation) {
+ BindingOperation bop = binding.getBindingOperation(odeOperation.getName(), null,
null);
+ if (bop == null)
+ throw new RuntimeException("Operation "+odeOperation.getName()+"not
found on "+serviceName+"/"+portName);
+
+ BindingOutput bo = bop.getBindingOutput();
+ if (bo == null)
+ throw new RuntimeException("Binding output not found on
"+serviceName+"/"+portName);
+
+ extractSoapBodyParts(odeMessage, soapMessage, getSOAPBody(bo),
odeOperation.getOutput().getMessage(), odeOperation.getName() + "Response");
+ extractSoapHeaderParts(odeMessage, soapMessage, getSOAPHeaders(bo),
odeOperation.getOutput().getMessage());
+ }
+
+ public void parseSoapRequest(MessageAdapter odeMessage,
+ SOAPMessage soapMessage,
+ Operation op)
+ {
+
+ BindingOperation bop = binding.getBindingOperation(op.getName(), null, null);
+
+ if (bop == null)
+ throw new RuntimeException("Binding operation not found
("+serviceName+"/"+portName);
+
+ BindingInput bi = bop.getBindingInput();
+ if (bi == null)
+ throw new RuntimeException("Binding input not
found"+serviceName+"/"+portName);
+
+ extractSoapBodyParts(odeMessage, soapMessage, getSOAPBody(bi),
op.getInput().getMessage(), op.getName());
+ extractSoapHeaderParts(odeMessage, soapMessage, getSOAPHeaders(bi),
op.getInput().getMessage());
+ }
+
+ public void createSoapFault(SOAPMessage soapMessage, Element message, QName faultName,
Operation op)
+ {
+ try
+ {
+ Element detail = buildSoapDetail(message, faultName, op);
+ SOAPFault fault = soapMessage.getSOAPBody().addFault();
+ fault.setFaultCode(faultName);
+ if(detail!=null)
+ fault.addDetail().addChildElement(soapFactory.createElement(detail));
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to create fault", e);
+ }
+ }
+
+ private Element buildSoapDetail(Element message, QName faultName, Operation op)
+ {
+ if (faultName.getNamespaceURI() == null)
+ return toFaultDetail(faultName, message);
+ if (op == null) {
+ return toFaultDetail(faultName, message);
+ }
+ Fault f = op.getFault(faultName.getLocalPart());
+ if (f == null)
+ return toFaultDetail(faultName, message);
+
+ // For faults, there will be exactly one part.
+ Part p = (Part)f.getMessage().getParts().values().iterator().next();
+ if (p == null)
+ return toFaultDetail(faultName, message);
+ Element partEl= findChildByName(message,new QName(null,p.getName()));
+ if (partEl == null)
+ return toFaultDetail(faultName, message);
+ Element detail = findChildByName(partEl, p.getElementName());
+ if (detail == null)
+ return toFaultDetail(faultName, message);
+
+ return detail;
+ }
+
+ private Element toFaultDetail(QName fault, Element message) {
+ if (message == null) return null;
+ Element firstPart = getFirstChildElement(message);
+ if (firstPart == null) return null;
+ Element detail = getFirstChildElement(firstPart);
+ if (detail == null) return firstPart;
+ return detail;
+ }
+
+ private void extractSoapHeaderParts(MessageAdapter odeMessage, SOAPMessage soapMessage,
List<SOAPHeader> headerDefs,javax.wsdl.Message wsdlMessageDef)
+ {
+ try {
+ javax.xml.soap.SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+ // Checking that the definitions we have are at least there
+ for (SOAPHeader headerDef : headerDefs)
+ handleSoapHeaderPartDef(odeMessage, soapHeader, headerDef, wsdlMessageDef);
+
+ // Extracting whatever header elements we find in the message, binding and
abstract parts
+ // aren't reliable enough given what people do out there.
+ if (soapHeader != null) {
+ Iterator headersIter = soapHeader.getChildElements();
+ while (headersIter.hasNext()) {
+ Object obj=headersIter.next();
+
+ // Should be SOAPHeaderElement, but CXF also returns javax.xml.soap.Text
+ // objects aswell
+ if (obj instanceof javax.xml.soap.SOAPHeaderElement) {
+ javax.xml.soap.SOAPHeaderElement headerElem =
(javax.xml.soap.SOAPHeaderElement) obj;
+ String partName = findHeaderPartName(headerDefs,
headerElem.getElementQName());
+ Document doc = newDocument();
+
+ // RIFTSAW-74 - slight modification to avoid jbossws exception when
reconstructing the
+ // SOAP message.
+
+ //Element destPart = doc.createElementNS(null, partName);
+ //destPart.appendChild(doc.importNode(headerElem, true));
+ //odeMessage.setHeaderPart(partName, destPart);
+ odeMessage.setHeaderPart(partName, (Element)doc.importNode(headerElem, true));
+ }
+ }
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to extracts header parts",e);
+ }
+ }
+
+ private String findHeaderPartName(List<SOAPHeader> headerDefs, QName elmtName) {
+ for (SOAPHeader headerDef : headerDefs) {
+ javax.wsdl.Message hdrMsg = wsdl.getMessage(headerDef.getMessage());
+ for (Object o : hdrMsg.getParts().values()) {
+ Part p = (Part) o;
+ if (p.getElementName() != null &&
+ p.getElementName().equals(elmtName)) return p.getName();
+ }
+ }
+ return elmtName.getLocalPart();
+ }
+
+ private void handleSoapHeaderPartDef(Object odeMessage, javax.xml.soap.SOAPHeader
header, SOAPHeader headerdef,
+ javax.wsdl.Message msgType) {
+ // Is this header part of the "payload" messsage?
+ boolean payloadMessageHeader = headerdef.getMessage() == null ||
headerdef.getMessage().equals(msgType.getQName());
+ boolean requiredHeader = payloadMessageHeader ||
Boolean.TRUE.equals(headerdef.getRequired());
+
+ if (header == null) {
+ if (requiredHeader)
+ throw new RuntimeException("Soap Header is missing a required field " +
headerdef.getElementType());
+
+ return;
+ }
+
+ javax.wsdl.Message hdrMsg = wsdl.getMessage(headerdef.getMessage());
+ if (hdrMsg == null)
+ return;
+ Part p = hdrMsg.getPart(headerdef.getPart());
+ if (p == null || p.getElementName() == null)
+ return;
+
+ SOAPElement headerEl = getFirstChildWithName(p.getElementName(), header);
+ if (requiredHeader && headerEl == null)
+ throw new RuntimeException("Soap Header is missing a required field "
+ headerdef.getElementType());
+
+ if (headerEl == null) return;
+
+ /* RIFTSAW-127 - this was duplicating the header part in the consolidated (merged)
message stored in the
+ * BPEL process - but this code actually causes two levels of 'part' to be
defined - e.g.
+ * <conversionId><conversationId><details ....
/></conversatioId></conversationId>
+ Document doc = DOMUtils.newDocument();
+ Element destPart = doc.createElementNS(null, p.getName());
+ destPart.appendChild(doc.importNode(headerEl, true));
+ odeMessage.setHeaderPart(p.getName(), destPart);
+ */
+ }
+
+ private void extractSoapBodyParts(
+ MessageAdapter odeMessage,
+ SOAPMessage soapMessage,
+ javax.wsdl.extensions.soap.SOAPBody wsdlSOAPBody,
+ javax.wsdl.Message wsdlMessageDef, String operationName)
+ {
+ try
+ {
+ SOAPBody soapBody = soapMessage.getSOAPBody();
+ List<Part> parts = wsdlMessageDef.getOrderedParts(wsdlSOAPBody.getParts());
+
+ if(isRPC)
+ {
+ // In RPC the body element is the operation name, wrapping parts. Order
doesn't really matter as far as
+ // we're concerned. All we need to do is copy the soap:body children, since
doc-lit rpc looks the same
+ // in ode and soap.
+
+ QName rpcWrapQName = new QName(wsdlSOAPBody.getNamespaceURI(), operationName);
+ SOAPElement partWrapper = getFirstChildWithName(rpcWrapQName, soapBody);
+
+ if (partWrapper == null)
+ throw new RuntimeException("Expected part wrapper
'"+rpcWrapQName+"'missing on
service:"+serviceName+"/"+portName);
+
+ for(Part part : parts)
+ {
+ Element srcPart = getFirstChildWithName(new QName(null, part.getName()),
partWrapper);
+ if (srcPart == null)
+ throw new RuntimeException("Soap body does not contain required part
+"+part.getName());
+
+ odeMessage.setPart(srcPart.getLocalName(), srcPart);
+ }
+ }
+ else
+ {
+ // In doc-literal style, we expect the elements in the body to correspond (in
order)
+ // to the parts defined in the binding.
+ // All the parts should be element-typed, otherwise it is a mess.
+ List<SOAPElement> childElements = new ArrayList<SOAPElement>();
+ final Iterator children = soapBody.getChildElements() ;
+ while(children.hasNext())
+ {
+ final Node node = (Node)children.next() ;
+ if (node instanceof SOAPElement)
+ childElements.add((SOAPElement)node);
+ }
+
+ Iterator<SOAPElement> srcParts = childElements.iterator();
+ for(Part part : parts)
+ {
+ SOAPElement srcPart = srcParts.next();
+ Document doc = newDocument();
+ Element destPart = doc.createElementNS(null, part.getName());
+ destPart.appendChild(doc.importNode(srcPart, true));
+ odeMessage.setPart(part.getName(), destPart);
+ }
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to extract soap body parts", e);
+ }
+ }
+
+ private static SOAPElement getFirstChildWithName(QName name, SOAPElement parent)
+ {
+ SOAPElement match = null;
+ Iterator iterator = parent.getChildElements(name);
+ while(iterator.hasNext())
+ {
+ match= (SOAPElement)iterator.next();
+ }
+ return match;
+ }
+
+ /*private static Element cloneElement(Element source)
+ {
+ // TODO:
https://jira.jboss.org/jira/browse/RIFTSAW-38
+ // For now create a deep copy (performance hit)
+ try
+ {
+ DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document doc = builder.newDocument();
+ return (Element)doc.importNode(source, true);
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ } */
+
+ public static <T> T getFirstExtensibilityElement(ElementExtensible parent,
Class<T> cls) {
+ Collection<T> ee = filter(parent.getExtensibilityElements(), cls);
+
+ return ee.isEmpty() ? null : ee.iterator().next();
+
+ }
+
+ public static javax.wsdl.extensions.soap.SOAPBody getSOAPBody(ElementExtensible ee) {
+ return getFirstExtensibilityElement(ee, javax.wsdl.extensions.soap.SOAPBody.class);
+ }
+
+ public static List<SOAPHeader> getSOAPHeaders(ElementExtensible eee) {
+ return filter(new ArrayList<SOAPHeader>(), (Collection<Object>)
eee.getExtensibilityElements(),
+ SOAPHeader.class);
+ }
+
+ public static Fault parseSoapFault(
+ Element odeMessage,
+ SOAPMessage soapMessage,
+ javax.wsdl.Operation operation)
+ {
+ Fault fdef = null;
+ try
+ {
+ SOAPFault flt = soapMessage.getSOAPBody().getFault();
+ Detail detail = flt.getDetail();
+ fdef = inferFault(operation, flt);
+ if(fdef!=null)
+ {
+ Part pdef = (Part)fdef.getMessage().getParts().values().iterator().next();
+ Element partel =
odeMessage.getOwnerDocument().createElementNS(null,pdef.getName());
+ odeMessage.appendChild(partel);
+
+ Element childByName = findChildByName(detail, pdef.getElementName());
+ if (childByName != null)
+ {
+ partel.appendChild(odeMessage.getOwnerDocument().importNode(childByName,
true));
+ }
+ else
+ {
+ partel.appendChild(odeMessage.getOwnerDocument().importNode(detail,true));
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to parse SOAP Fault",e);
+ }
+
+ return fdef;
+ }
+
+ public static Fault parseSoapFault(
+ Element odeMessage,
+ SOAPFault flt,
+ javax.wsdl.Operation operation)
+ {
+ Fault fault=inferFault(operation, flt);
+
+ if(fault!=null)
+ {
+ Detail detail = flt.getDetail();
+ Part pdef = (Part)fault.getMessage().getParts().values().iterator().next();
+ Element partel =
odeMessage.getOwnerDocument().createElementNS(null,pdef.getName());
+ odeMessage.appendChild(partel);
+
+ Element childByName = findChildByName(detail, pdef.getElementName());
+ if (childByName != null)
+ {
+ partel.appendChild(odeMessage.getOwnerDocument().importNode(childByName,
true));
+ }
+ else
+ {
+ partel.appendChild(odeMessage.getOwnerDocument().importNode(detail,true));
+ }
+ }
+
+ return fault;
+ }
+
+ private static Fault inferFault(Operation operation, SOAPFault flt) {
+ if (!flt.hasDetail())
+ return null;
+ // The detail is a dummy <detail> node containing the interesting fault
element
+ Element element = getFirstChildElement(flt.getDetail());
+
+ if (element == null) {
+ return(null);
+ }
+
+ QName elName=new QName(element.getNamespaceURI(), element.getLocalName());
+ return inferFault(operation, elName);
+ }
+
+
+ // Code taken from Apache ODE util module
+
+ private static ThreadLocal<DocumentBuilder> __builders = new ThreadLocal();
+
+ private static DocumentBuilderFactory __documentBuilderFactory ;
+
+ static {
+ initDocumentBuilderFactory();
+ }
+
+ /**
+ * Initialize the document-builder factory.
+ */
+ private static void initDocumentBuilderFactory() {
+ DocumentBuilderFactory f = new DocumentBuilderFactoryImpl();
+ f.setNamespaceAware(true);
+ __documentBuilderFactory = f;
+ }
+
+ private static DocumentBuilder getBuilder() {
+ DocumentBuilder builder = __builders.get();
+ if (builder == null) {
+ synchronized (__documentBuilderFactory) {
+ try {
+ builder = __documentBuilderFactory.newDocumentBuilder();
+ builder.setErrorHandler(new org.xml.sax.ErrorHandler() {
+
+ public void error(SAXParseException arg0)
+ throws SAXException {
+ log.error("Parser error", arg0);
+ }
+
+ public void fatalError(SAXParseException arg0)
+ throws SAXException {
+ log.error("Parser fatal error", arg0);
+ }
+
+ public void warning(SAXParseException arg0)
+ throws SAXException {
+ log.warn("Parser warning", arg0);
+ }
+
+ });
+ } catch (ParserConfigurationException e) {
+ log.error(e);
+ throw new RuntimeException(e);
+ }
+ }
+ __builders.set(builder);
+ }
+ return builder;
+ }
+
+ public static Document newDocument() {
+ DocumentBuilder db = getBuilder();
+ return db.newDocument();
+ }
+
+ /**
+ * Return the first child element of the given element. Null if no children
+ * are found.
+ *
+ * @param elem Element whose child is to be returned
+ *
+ * @return the first child element.
+ */
+ public static Element getFirstChildElement(Element elem) {
+ return (Element) findChildByType(elem, Node.ELEMENT_NODE);
+ }
+
+ public static Element findChildByName(Element parent, QName name) {
+ return findChildByName(parent, name, false);
+ }
+
+ public static Element findChildByName(Element parent, QName name, boolean recurse) {
+ if (parent == null)
+ throw new IllegalArgumentException("null parent");
+ if (name == null)
+ throw new IllegalArgumentException("null name");
+
+ NodeList nl = parent.getChildNodes();
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node c = nl.item(i);
+ if(c.getNodeType() != Node.ELEMENT_NODE)
+ continue;
+ // For a reason that I can't fathom, when using in-mem DAO we actually get
elements with
+ // no localname.
+ String nodeName = c.getLocalName() != null ? c.getLocalName() :
c.getNodeName();
+ if (new QName(c.getNamespaceURI(),nodeName).equals(name))
+ return (Element) c;
+ }
+
+ if(recurse){
+ NodeList cnl = parent.getChildNodes();
+ for (int i = 0; i < cnl.getLength(); ++i) {
+ Node c = cnl.item(i);
+ if(c.getNodeType() != Node.ELEMENT_NODE)
+ continue;
+ Element result = findChildByName((Element)c, name, recurse);
+ if(result != null)
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public static Node findChildByType(Element elem, int type) {
+ if (elem == null)
+ throw new NullPointerException("elem parameter must not be null!");
+
+ for (Node n = elem.getFirstChild(); n != null; n = n.getNextSibling()) {
+ if (n.getNodeType() == type) {
+ return n;
+ }
+ }
+ return null;
+ }
+
+ public static <C extends Collection<T>, S, T extends S> C filter(C newList,
Iterator<S> iterator, Class<T> t) {
+ while (iterator.hasNext()) {
+ S next = iterator.next();
+ if (t.isAssignableFrom(next.getClass())) {
+ newList.add((T) next);
+ }
+ }
+ return newList;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> Collection<T> filter(Collection src, final Class<T>
aClass) {
+ return filter(new ArrayList<T>(src.size()), src.iterator(), aClass);
+ }
+
+ public static <C extends Collection<T>, S, T extends S> C filter(C dest,
Collection<S> src, Class<T> t) {
+ return filter(dest, src.iterator(), t);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Fault inferFault(Operation operation, QName elName) {
+ for (Fault f : (Collection<Fault>) operation.getFaults().values()) {
+ if (f.getMessage() == null) continue;
+ Collection<Part> parts = f.getMessage().getParts().values();
+ if (parts.isEmpty()) continue;
+ Part p = parts.iterator().next();
+ if (p.getElementName() == null) continue;
+ if (p.getElementName().equals(elName)) return f;
+ }
+ return null;
+ }
+
+ public static ExtensibilityElement getBindingExtension(Binding binding) {
+ Collection bindings = new ArrayList();
+ filter(bindings, binding.getExtensibilityElements(), HTTPBinding.class);
+ filter(bindings, binding.getExtensibilityElements(), SOAPBinding.class);
+ if (bindings.size() == 0) {
+ return null;
+ } else if (bindings.size() > 1) {
+ // exception if multiple bindings found
+ throw new IllegalArgumentException("Binding
"+binding.getQName()+" has multiple binding elements");
+ } else {
+ // retrieve the single element
+ ExtensibilityElement result = (ExtensibilityElement)
bindings.iterator().next();
+ return result;
+ }
+ }
+
+ public static ExtensibilityElement getBindingExtension(Port port) {
+ Binding binding = port.getBinding();
+ if (binding == null) {
+ throw new IllegalArgumentException("Binding not found: port
"+port.getName()+".");
+ }
+ return getBindingExtension(binding);
+ }
+
+ public static boolean useSOAPBinding(Binding binding) {
+ ExtensibilityElement element = getBindingExtension(binding);
+ return SOAPBinding.class.isAssignableFrom(element.getClass());
+ }
+
+ public static boolean useSOAPBinding(Port port) {
+ return useSOAPBinding(port.getBinding());
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/TemplateWebServiceEndpoint.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/TemplateWebServiceEndpoint.java
(rev 0)
+++
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/TemplateWebServiceEndpoint.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+
+import javax.xml.soap.*;
+import javax.xml.ws.Provider;
+
+
+/**
+ * CXF requires the JAX-WS implementation class to directly implement the
+ * Provider<SOAPMessage>, rather than be derived from a superclass that
+ * implements it. Therefore this 'template' web service endpoint class
+ * has been created, which will be loaded by javassist and renamed to
+ * be the specific endpoint implementation. This is necessary as
+ * javassist does not provide a way to set a interface that uses generics.
+ *
+ * @see org.jboss.soa.si.ws.WebServiceProviderFactory
+ *
+ */
+public class TemplateWebServiceEndpoint extends BaseWebServiceEndpoint implements
Provider<SOAPMessage>
+{
+ // See RIFTSAW-123 for description of issue related to CXF
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLParser.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLParser.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLParser.java 2010-11-17 01:14:38
UTC (rev 1115)
@@ -0,0 +1,223 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import javax.wsdl.*;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.xml.namespace.QName;
+import java.net.URL;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * WSDL helper class
+ */
+public final class WSDLParser
+{
+
+ private Definition wsdlDefinition;
+ private int dfsDepth = 0;
+
+ public WSDLParser(Definition wsdlDefinition)
+ {
+ this.wsdlDefinition = wsdlDefinition;
+ }
+
+ public void reset()
+ {
+ dfsDepth = 0;
+ }
+
+ public Operation getRPCOperation(QName service, String port, QName payloadName)
+ {
+ reset();
+ Operation result = _getRPCOperation(this.wsdlDefinition, service, port,
payloadName);
+ if (result == null)
+ throw new IllegalArgumentException("Unable to find operation for element
"+payloadName);
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Operation _getRPCOperation(Definition wsdl, QName serviceName, String portName,
QName payloadName)
+ {
+ if(++dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached
limit");
+
+ // namespace / java.util.List of imports
+ Collection<List<Import>> imports = wsdl.getImports().values();
+ for(List<Import> importNS : imports)
+ {
+ for(Import wsdlImport : importNS)
+ {
+ Operation result = _getRPCOperation(wsdlImport.getDefinition(), serviceName,
portName, payloadName);
+ if(result!=null)
+ return result;
+ }
+ }
+
+ // resolve the port & operation
+ Service service = wsdl.getService(serviceName);
+ if (service == null)
+ return null; // service might be defined elsewhere
+
+ Port port = service.getPort(portName);
+ if (port == null)
+ throw new IllegalArgumentException("service "+serviceName+" contains
no such port "+portName);
+
+ Binding binding = port.getBinding();
+ PortType portType = binding.getPortType();
+ List<Operation> operations = portType.getOperations();
+ for(Operation op : operations)
+ {
+ if(op.getName().equals(payloadName.getLocalPart()))
+ return op;
+ }
+
+ return null;
+ }
+
+ public Operation getDocLitOperation(QName service, String port, QName payloadName)
+ {
+ reset();
+ Operation result = _getDocLitOperation(this.wsdlDefinition, service, port,
payloadName);
+ if (result == null)
+ throw new IllegalArgumentException("Unable to find operation for element
"+payloadName);
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Operation _getDocLitOperation(Definition wsdl, QName serviceName, String
portName, QName payloadName)
+ {
+ if(++dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached
limit");
+
+ // namespace / java.util.List of imports
+ Collection<List<Import>> imports = wsdl.getImports().values();
+ for(List<Import> importNS : imports)
+ {
+ for(Import wsdlImport : importNS)
+ {
+ Operation result = _getDocLitOperation(wsdlImport.getDefinition(), serviceName,
portName, payloadName);
+ if(result!=null)
+ return result;
+ }
+ }
+
+ // resolve the port & operation
+ Service service = wsdl.getService(serviceName);
+ if (service == null)
+ return null; // service might be defined elsewhere
+
+ Port port = service.getPort(portName);
+ if (port == null)
+ throw new IllegalArgumentException("service "+serviceName+" contains
no such port "+portName);
+
+ Binding binding = port.getBinding();
+ PortType portType = binding.getPortType();
+ List<Operation> operations = portType.getOperations();
+ for(Operation op : operations)
+ {
+ Message message = op.getInput().getMessage();
+ Collection<Part> parts = message.getParts().values();
+ for(Part part : parts)
+ {
+ if(part.getElementName().equals(payloadName))
+ return op;
+ }
+ }
+
+ return null;
+ }
+
+ public URL getServiceLocationURL(QName serviceQName, String portName)
+ {
+ reset();
+ return _getServiceLocationURL(this.wsdlDefinition, serviceQName, portName);
+ }
+
+ public URL _getServiceLocationURL(Definition wsdl, QName serviceQName, String
portName)
+ {
+ URL match = null;
+ dfsDepth++;
+
+ if(dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached
limit");
+
+ // namespace / java.util.List of imports
+ Map<String, List<Import>> imports = wsdl.getImports();
+ for(String ns : imports.keySet())
+ {
+ List<Import> importNS = imports.get(ns);
+ for(Import wsdlImport : importNS)
+ {
+ URL result = _getServiceLocationURL(wsdlImport.getDefinition(), serviceQName,
portName);
+ if(result!=null)
+ {
+ match = result;
+ break;
+ }
+ }
+
+ if(match!=null) break;
+ }
+
+ if(match!=null) // DFS results
+ return match;
+
+ try
+ {
+ Service service = wsdl.getService(serviceQName);
+ Port port = null;
+ SOAPAddress soapAddress = null;
+
+ // --
+
+ if(service!=null)
+ {
+ port = service.getPort(portName);
+ if(port!=null)
+ {
+ for(Object obj : port.getExtensibilityElements())
+ {
+ if(obj instanceof SOAPAddress)
+ {
+ soapAddress = (SOAPAddress)obj;
+ }
+ }
+
+ }
+ }
+
+ // --
+
+ if(soapAddress!=null)
+ match = new URL(soapAddress.getLocationURI());
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to parse " + wsdl, e);
+ }
+
+ return match;
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLReference.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLReference.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSDLReference.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import javax.wsdl.Definition;
+
+import java.net.URI;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+/**
+ * Used to pass along both parsed and raw WSDL references.
+ *
+ * @see org.jboss.soa.bpel.runtime.engine.ode.JAXWSBindingContext
+ * @see org.jboss.soa.bpel.runtime.ws.EndpointManager
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @author Kurt.Stam <kurt.stam(a)jboss.com>
+ *
+ */
+public final class WSDLReference
+{
+ private Definition definition;
+ private URI wsdlURI;
+
+ public WSDLReference(Definition definition, URI wsdlURI)
+ {
+ this.definition = definition;
+ this.wsdlURI = wsdlURI;
+ }
+
+ public Definition getDefinition()
+ {
+ return definition;
+ }
+
+ public URL getWsdlURL()
+ {
+ try
+ {
+ return wsdlURI.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSInvocationAdapter.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSInvocationAdapter.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WSInvocationAdapter.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import org.jboss.soa.si.InvocationAdapter;
+import org.jboss.soa.si.MessageAdapter;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+/**
+ * @author Heiko Braun <hbraun(a)redhat.com>
+ */
+public final class WSInvocationAdapter implements InvocationAdapter<SOAPMessage>
+{
+ private final String operationName;
+ private final QName serviceName;
+ private final String portName;
+
+ private SOAPMessage soapRequestMessage;
+ private SOAPMessage soapResponseMessage;
+
+ private final SOAPMessageAdapter soapAdapter;
+
+ public WSInvocationAdapter(String operationName,
+ QName serviceName, String portName, SOAPMessageAdapter soapAdapter)
+ {
+ this.operationName = operationName;
+ this.serviceName = serviceName;
+ this.portName = portName;
+ this.soapAdapter = soapAdapter;
+ }
+
+ public String getOperationName()
+ {
+ return operationName;
+ }
+
+ public QName getServiceName()
+ {
+ return serviceName;
+ }
+
+ public String getPortName()
+ {
+ return portName;
+ }
+
+ public void initRequest(javax.wsdl.Operation op, MessageAdapter request)
+ {
+ if(null==soapRequestMessage)
+ throw new IllegalArgumentException("No request SOAPMessage set");
+
+ soapAdapter.parseSoapRequest(request, soapRequestMessage, op);
+ }
+
+ public void createResponse(javax.wsdl.Operation op, MessageAdapter resp)
+ {
+ try
+ {
+ // create SOAPEnvelope
+ soapResponseMessage = MessageFactory.newInstance().createMessage();
+ soapAdapter.createSoapResponse(soapResponseMessage,resp, op);
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to create SOAP response", e);
+ }
+ }
+
+ public void createFault(javax.wsdl.Operation op, QName faultName, MessageAdapter
fault)
+ {
+ try
+ {
+ soapResponseMessage = MessageFactory.newInstance().createMessage();
+ soapAdapter.createSoapFault(soapResponseMessage, fault.getMessage(), faultName,
op);
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException("Failed to create SOAP fault", e);
+ }
+ }
+
+ public SOAPMessage getInvocationResult()
+ {
+ if(null==soapResponseMessage)
+ throw new IllegalArgumentException("No response SOAPMessage set");
+
+ return soapResponseMessage;
+ }
+
+ public void setSOAPMessage(SOAPMessage soapMessage)
+ {
+ this.soapRequestMessage = soapMessage;
+ }
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceDetails.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceDetails.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceDetails.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.soa.si.ws;
+
+import java.lang.annotation.*;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface WebServiceDetails {
+ String factory();
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceFactory.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceFactory.java
(rev 0)
+++ trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceFactory.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.soa.si.ws;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.soa.si.ServiceInvoker;
+
+public interface WebServiceFactory {
+
+ public ServiceInvoker getServiceInvoker();
+
+ public WSInvocationAdapter getInvocationAdapter(String operationName,
+ QName serviceName, String portName, SOAPMessageAdapter soapAdapter);
+
+}
Added: trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceProviderFactory.java
===================================================================
--- trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceProviderFactory.java
(rev 0)
+++
trunk/runtime/si/src/main/java/org/jboss/soa/si/ws/WebServiceProviderFactory.java 2010-11-17
01:14:38 UTC (rev 1115)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.si.ws;
+
+import javassist.*;
+import javassist.bytecode.AnnotationsAttribute;
+import javassist.bytecode.ClassFile;
+import javassist.bytecode.ConstPool;
+import javassist.bytecode.annotation.Annotation;
+import javassist.bytecode.annotation.EnumMemberValue;
+import javassist.bytecode.annotation.StringMemberValue;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * Creates JAX-WS Provider classes using javassist.
+ * These provider classes can then be deployed to JBossWS in memory.<p>
+ * The javassist generated class basically just carries the meta data,
+ * while the actual implementation resides in {@link
org.jboss.soa.si.ws.BaseWebServiceEndpoint}
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class WebServiceProviderFactory
+{
+ private final static String PKG_PREFIX =
WebServiceProviderFactory.class.getPackage().getName()+".generated.";
+
+ public BaseWebServiceEndpoint createProvider(
+ QName service, String port,
+ String endpointId,
+ WSDLReference wsdlRef,
+ ClassLoader loader,
+ java.io.File handlerFile,
+ Class<? extends WebServiceFactory> providerFactory
+ )
+ throws Exception
+ {
+ ClassPool pool = new ClassPool(true);
+ pool.appendClassPath(new LoaderClassPath(loader));
+
+ // Imports
+ pool.importPackage("java.lang");
+ pool.importPackage("javax.xml.ws");
+ pool.importPackage("javax.jws");
+
+ CtClass stringType = pool.get("java.lang.String");
+
+ String implClassName = PKG_PREFIX+"WebServiceEndpoint_"+endpointId;
+ //CtClass impl = pool.makeClass(implClassName);
+
+ // Load an existing class representing the template for a Web Service provider
+ // This was necessary, as javassist does not provide a way to set an implemented
+ // interface that supports generics. Although the super class
(AbstractWebServiceEndpoint)
+ // implements this Provider<SOAPMessage> interface, CXF requires the actual web
service
+ // implementation class to directly define this interface. (RIFTSAW-123)
+ CtClass impl =
pool.get(org.jboss.soa.si.ws.TemplateWebServiceEndpoint.class.getName());
+ impl.setName(implClassName);
+
+ // AbstractWebServiceEndpoint.endpointId property
+ CtField idField = new CtField(stringType, "endpointId", impl);
+ idField.setModifiers(Modifier.PUBLIC);
+ impl.addField(idField, "\""+endpointId+"\"");
+
+ // AbstractWebServiceEndpoint.serviceName property
+ CtField serviceField = new CtField(stringType, "serviceName", impl);
+ serviceField.setModifiers(Modifier.PUBLIC);
+ impl.addField(serviceField,
"\""+service.toString()+"\"");
+
+ // AbstractWebServiceEndpoint.wsdlLocation property
+ CtField wsdlLocationField = new CtField(stringType, "wsdlLocation", impl);
+ wsdlLocationField.setModifiers(Modifier.PUBLIC);
+ impl.addField(wsdlLocationField,
"\""+wsdlRef.getWsdlURL().toExternalForm()+"\"");
+
+ // AbstractWebServiceEndpoint.portName property
+ CtField portNameField = new CtField(stringType, "portName", impl);
+ portNameField.setModifiers(Modifier.PUBLIC);
+ impl.addField(portNameField, "\""+port+"\"");
+
+ // Annotations
+ ClassFile classFile = impl.getClassFile();
+ classFile.setVersionToJava5();
+ ConstPool constantPool = classFile.getConstPool();
+
+ /*
+ @WebServiceProvider(
+ portName="HelloPort",
+ serviceName="HelloService",
+
targetNamespace="http://helloservice.org/wsdl",
+ wsdlLocation="WEB-INF/wsdl/HelloService.wsdl"
+ )
+ @ServiceMode(value=Service.Mode.MESSAGE)
+ */
+ AnnotationsAttribute attr = new
+ AnnotationsAttribute(constantPool, AnnotationsAttribute.visibleTag);
+
+ // --
+ Annotation providerAnnotation = new Annotation(
+ "javax.xml.ws.WebServiceProvider", constantPool);
+
+ providerAnnotation.addMemberValue(
+ "serviceName",
+ new StringMemberValue(service.getLocalPart(), constantPool)
+ );
+ providerAnnotation.addMemberValue(
+ "portName",
+ new StringMemberValue(port, constantPool)
+ );
+ providerAnnotation.addMemberValue(
+ "targetNamespace",
+ new StringMemberValue(service.getNamespaceURI(), constantPool)
+ );
+ providerAnnotation.addMemberValue(
+ "wsdlLocation",
+ new StringMemberValue(wsdlRef.getWsdlURL().toExternalForm(), constantPool)
+ );
+ attr.addAnnotation(providerAnnotation);
+
+ // --
+ 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);
+
+ attr.addAnnotation(annotation2);
+
+ // Specify the web service providerdetails
+ Annotation detailsAnnotation = new Annotation(
+ org.jboss.soa.si.ws.WebServiceDetails.class.getName(), constantPool);
+
+ detailsAnnotation.addMemberValue("factory",
+ new StringMemberValue(providerFactory.getName(), constantPool));
+
+ attr.addAnnotation(detailsAnnotation);
+
+
+ classFile.addAttribute(attr);
+
+
+ // Check if handler chain should be established
+ if (handlerFile != null) {
+ Annotation handlerChain = new Annotation("javax.jws.HandlerChain",
constantPool);
+
+ handlerChain.addMemberValue("file",
+ new StringMemberValue("/"+handlerFile.getName(), constantPool));
+
+ attr.addAnnotation(handlerChain);
+ }
+
+
+ createStringGetter(impl, stringType, "endpointId",
"getEndpointId");
+ createStringGetter(impl, stringType, "serviceName",
"getServiceName");
+ createStringGetter(impl, stringType, "wsdlLocation",
"getWsdlLocation");
+ createStringGetter(impl, stringType, "portName", "getPortName");
+
+ // ------------
+
+ // freeze
+ impl.stopPruning(false);
+ impl.toClass(loader);
+ JavaUtils.clearBlacklists(loader);
+
+ // test it
+ Class clazz = loader.loadClass(implClassName);
+
+ BaseWebServiceEndpoint obj = (BaseWebServiceEndpoint)clazz.newInstance();
+
+ return obj;
+ }
+
+ private void createStringGetter(CtClass impl, CtClass stringType, String property,
String methodName)
+ throws Exception
+ {
+ CtMethod method = new CtMethod(
+ stringType, methodName,
+ new CtClass[]{},
+ impl
+ );
+
+ // Method body
+ StringBuffer body = new StringBuffer();
+ body.append("{");
+ body.append("return this."+property+";");
+ body.append("}");
+
+ method.setBody(body.toString());
+
+ impl.addMethod(method);
+
+ }
+}