[jboss-svn-commits] JBL Code SVN: r35248 - in labs/jbossesb/branches/JBESB_4_9_CP/product: services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 23 10:34:31 EDT 2010


Author: tfennelly
Date: 2010-09-23 10:34:30 -0400 (Thu, 23 Sep 2010)
New Revision: 35248

Added:
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.1.xml
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_01.xml
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_02.xml
Removed:
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml
Modified:
   labs/jbossesb/branches/JBESB_4_9_CP/product/.classpath
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
   labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
Log:
https://jira.jboss.org/browse/JBESB-3391
SoapUIClientService transforms targeted at #document fragment are lost because SoapUIClientServicealready holds a ref to the old DOM Document root element

Modified: labs/jbossesb/branches/JBESB_4_9_CP/product/.classpath
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/.classpath	2010-09-23 14:05:47 UTC (rev 35247)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/.classpath	2010-09-23 14:34:30 UTC (rev 35248)
@@ -97,7 +97,7 @@
 	<classpathentry kind="lib" path="build/lib/milyn-scribe-ibatis-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-scribe-jpa-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-calc-1.2.5.jar"/>
-	<classpathentry kind="lib" path="build/lib/milyn-smooks-core-1.2.5.jar"/>
+	<classpathentry kind="lib" path="build/lib/milyn-smooks-core-1.2.5.jar" sourcepath="/Users/tfennelly/milyn/branches/Smooks_V1.2.maint/smooks-core/src/main/java"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-css-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-csv-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-edi-1.2.5.jar"/>
@@ -110,7 +110,7 @@
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-rules-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-scripting-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-servlet-1.2.5.jar"/>
-	<classpathentry kind="lib" path="build/lib/milyn-smooks-templating-1.2.5.jar"/>
+	<classpathentry kind="lib" path="build/lib/milyn-smooks-templating-1.2.5.jar" sourcepath="/Users/tfennelly/milyn/trunk/smooks-cartridges/templating/src/main/java"/>
 	<classpathentry kind="lib" path="build/lib/milyn-smooks-validation-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/milyn-tinak-1.2.5.jar"/>
 	<classpathentry kind="lib" path="build/lib/mina-core-1.1.7.jar"/>
@@ -183,7 +183,6 @@
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.asm-3.0.2.RELEASE.jar"/>
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.aspects-3.0.2.RELEASE.jar"/>
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.beans-3.0.2.RELEASE.jar"/>
-	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.context-3.0.2.RELEASE.jar"/>
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.context.support-3.0.2.RELEASE.jar"/>
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.core-3.0.2.RELEASE.jar"/>
 	<classpathentry kind="lib" path="services/spring/lib/ext/org.springframework.expression-3.0.2.RELEASE.jar"/>
@@ -198,5 +197,7 @@
 	<classpathentry kind="var" path="ESB_ROOT/testlib/junit-4.1.jar"/>
 	<classpathentry kind="var" path="ESB_ROOT/testlib/mockejb.jar"/>
 	<classpathentry kind="var" path="ESB_ROOT/testlib/mockito-all-1.8.0.jar"/>
+	<classpathentry kind="lib" path="/Users/tfennelly/jboss/esb/4_9_CP/product/bin"/>
+	<classpathentry kind="lib" path="services/soapui-client/src/main/resources"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2010-09-23 14:05:47 UTC (rev 35247)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2010-09-23 14:34:30 UTC (rev 35248)
@@ -698,6 +698,8 @@
 
         if(smooksResource != null) {
             applySmooksTransform(smooksResource, messageDoc);
+            // reassign the docRoot variable after transform... in case it was replaced by a #document transform...
+            docRoot = messageDoc.getDocumentElement(); 
         }
 
         if(dumpSOAP) {

Modified: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java	2010-09-23 14:05:47 UTC (rev 35247)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBeanUnitTest.java	2010-09-23 14:34:30 UTC (rev 35248)
@@ -59,6 +59,9 @@
 
     public void test_no_collections() throws IOException, SAXException, ConfigurationException {
         File wsdlFile = new File(WSDL_LOCATAION + "/RetailerCallback.wsdl");
+        
+        System.out.println(wsdlFile.getAbsolutePath());
+        
         SoapUIClientService mbean = new SoapUIClientService();
         Map params = new HashMap();
 
@@ -361,18 +364,30 @@
         assertTrue("Generated SOAP message not as expected. See orderprocessing/expected_02.xml.  Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("orderprocessing/expected_02.xml"), new ByteArrayInputStream(message.getBytes())));
     }
 
-    public void test_smooks_transform() throws IOException, SAXException, ConfigurationException {
+    public void test_smooks_transform_01() throws IOException, SAXException, ConfigurationException {
         File wsdlFile = new File(WSDL_LOCATAION + "/RetailerCallback.wsdl");
         SoapUIClientService mbean = new SoapUIClientService();
         Map params = new HashMap();
 
         properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
         params.put("salesOrderNotification", new OrderNotification());
-        String message = mbean.buildRequest(wsdlFile.toURI().toString(), "SendSalesOrderNotification", null, params, properties, StreamUtils.readStreamString(getClass().getResourceAsStream("sendNotificationTransform.xml"), "UTF-8"), null);
+        String message = mbean.buildRequest(wsdlFile.toURI().toString(), "SendSalesOrderNotification", null, params, properties, StreamUtils.readStreamString(getClass().getResourceAsStream("sendNotificationTransform_01.xml"), "UTF-8"), null);
         assertTrue("Generated SOAP message not as expected. See expected_04.xml.  Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("expected_04.xml"), new ByteArrayInputStream(message.getBytes())));
         assertEquals("http://localhost:18080/active-bpel/services/RetailerCallback", mbean.getEndpoint(wsdlFile.toURI().toString(), null, properties));
     }
 
+    public void test_smooks_transform_02() throws IOException, SAXException, ConfigurationException {
+        File wsdlFile = new File(WSDL_LOCATAION + "/RetailerCallback.wsdl");
+        SoapUIClientService mbean = new SoapUIClientService();
+        Map params = new HashMap();
+
+        properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());
+        params.put("salesOrderNotification", new OrderNotification());
+        String message = mbean.buildRequest(wsdlFile.toURI().toString(), "SendSalesOrderNotification", null, params, properties, StreamUtils.readStreamString(getClass().getResourceAsStream("sendNotificationTransform_02.xml"), "UTF-8"), null);
+        assertTrue("Generated SOAP message not as expected. See expected_04.1.xml.  Generated message: \n" + message, compareCharStreams(getClass().getResourceAsStream("expected_04.1.xml"), new ByteArrayInputStream(message.getBytes())));
+        assertEquals("http://localhost:18080/active-bpel/services/RetailerCallback", mbean.getEndpoint(wsdlFile.toURI().toString(), null, properties));
+    }
+
     public void test_BuildResponse() throws Exception {    
     	File wsdlFile = new File(WSDL_LOCATAION + "/helloworld.wsdl");
     	properties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlFile.toURI().toString());

Added: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.1.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.1.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.1.xml	2010-09-23 14:34:30 UTC (rev 35248)
@@ -0,0 +1 @@
+<something replacing="Envelope"/>
\ No newline at end of file


Property changes on: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/expected_04.1.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml	2010-09-23 14:05:47 UTC (rev 35247)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml	2010-09-23 14:34:30 UTC (rev 35248)
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
-    <resource-config selector="header">
-	    <resource type="xsl">
-            <!--
-            <something addedto="header" />
-            -->
-        </resource>
-        <param name="is-xslt-templatelet">true</param>
-        <param name="action">addto</param>
-    </resource-config>
-    
-</smooks-resource-list>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_01.xml (from rev 35244, labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_01.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_01.xml	2010-09-23 14:34:30 UTC (rev 35248)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+
+    <resource-config selector="header">
+	    <resource type="xsl">
+            <!--
+            <something addedto="header" />
+            -->
+        </resource>
+        <param name="is-xslt-templatelet">true</param>
+        <param name="action">addto</param>
+    </resource-config>
+    
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_02.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_02.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_02.xml	2010-09-23 14:34:30 UTC (rev 35248)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+
+    <resource-config selector="Envelope">
+	    <resource type="xsl">
+            <!--
+            <something replacing="Envelope" />
+            -->
+        </resource>
+        <param name="is-xslt-templatelet">true</param>
+    </resource-config>
+    
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/branches/JBESB_4_9_CP/product/services/soapui-client/src/test/java/org/jboss/soa/esb/services/soapui/sendNotificationTransform_02.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF



More information about the jboss-svn-commits mailing list