[jboss-svn-commits] JBL Code SVN: r37960 - in labs/jbossesb/trunk/product: docs/Programmers_Guide/en-US/extras/OOB-Actions and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Mar 28 08:46:52 EDT 2012
Author: mageshbk at jboss.com
Date: 2012-03-28 08:46:50 -0400 (Wed, 28 Mar 2012)
New Revision: 37960
Added:
labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-impl.jar
labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-xjc.jar
labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/serialize.xjb
Modified:
labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/OOB-Actions/OOB_Actions_webservices_SOAP.xml
labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/extras/OOB-Actions/webservices_SOAP-wiseclientservice-config.xmlt
labs/jbossesb/trunk/product/services/soap/
labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/SOAPClientAspectUnitTest.java
Log:
[JBESB-3755] - Added JAXB binding file support in Wise SOAPClient
Modified: labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/OOB-Actions/OOB_Actions_webservices_SOAP.xml
===================================================================
--- labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/OOB-Actions/OOB_Actions_webservices_SOAP.xml 2012-03-28 07:52:47 UTC (rev 37959)
+++ labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/OOB-Actions/OOB_Actions_webservices_SOAP.xml 2012-03-28 12:46:50 UTC (rev 37960)
@@ -256,6 +256,18 @@
</para>
</entry>
</row>
+ <row>
+ <entry><property>wise-config</property></entry>
+ <entry>
+ <para>
+ A list of wise-property elements that can be used to configure Wise
+ client. The wise-property element consits of name and value attributes.
+ A special ESB property wise.jaxb.bindings can be used to specify JAXB
+ customizations. It accepts a comma seperated list of resource names
+ included in the ESB archive.
+ </para>
+ </entry>
+ </row>
</tbody></tgroup></table>
<section id="sect-webservicessoap-operation-parameters">
Modified: labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/extras/OOB-Actions/webservices_SOAP-wiseclientservice-config.xmlt
===================================================================
--- labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/extras/OOB-Actions/webservices_SOAP-wiseclientservice-config.xmlt 2012-03-28 07:52:47 UTC (rev 37959)
+++ labs/jbossesb/trunk/product/docs/Programmers_Guide/en-US/extras/OOB-Actions/webservices_SOAP-wiseclientservice-config.xmlt 2012-03-28 12:46:50 UTC (rev 37960)
@@ -1,4 +1,8 @@
<action name="soap-wise-client-action" class="org.jboss.soa.esb.actions.soap.wise.SOAPClient">
<property name="wsdl" value="http://host:8080/OrderManagement?wsdl"/>
<property name="SOAPAction" value="http://host/OrderMgmt/SalesOrder"/>
+ <property name="wise-config"/>
+ <wise-property name="wise.tmpDir" value="/tmp">
+ <wise-property name="wise.jaxb.bindings" value="some.xjb,additional.xml">
+ </property>
</action>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-impl.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-impl.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-xjc.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/trunk/product/lib/ext/endorsed/jaxb-xjc.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: labs/jbossesb/trunk/product/services/soap
___________________________________________________________________
Modified: svn:ignore
- build
+ TESTS-TestSuites.xml
build
Modified: labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml 2012-03-28 07:52:47 UTC (rev 37959)
+++ labs/jbossesb/trunk/product/services/soap/aop/resources/META-INF/jboss-aop.xml 2012-03-28 12:46:50 UTC (rev 37960)
@@ -6,6 +6,7 @@
<aspect class="org.jboss.internal.soa.esb.soap.ws.CompilerAspect" scope="PER_VM"/>
<aspect class="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientEndpointsAspect" scope="PER_VM"/>
<aspect class="org.jboss.internal.soa.esb.soap.wise.WSMethodInvokeAspect" scope="PER_VM"/>
+ <aspect class="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientJaxbAspect" scope="PER_VM"/>
<bind pointcut="execution(* it.javalinux.wise.core.client.WSMethod->getParmeterInRightPositionArray(..))">
<advice name="getParameterInRightPositionArray" aspect="org.jboss.internal.soa.esb.soap.wise.WSMethodParameterMappingAspect"/>
@@ -22,6 +23,10 @@
<bind pointcut="execution(* it.javalinux.wise.core.client.WSDynamicClient->defineAdditionalCompilerClassPath(..))">
<advice name="defineAdditionalCompilerClassPath" aspect="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientClasspathAspect"/>
</bind>
+
+ <bind pointcut="execution(* it.javalinux.wise.core.client.WSDynamicClient->importObjectFromWsdl(..))">
+ <advice name="importObjectFromWsdl" aspect="org.jboss.internal.soa.esb.soap.wise.WSDynamicClientJaxbAspect"/>
+ </bind>
<bind pointcut="execution(* it.javalinux.wise.core.client.WSMethod->isOneWay(..))">
<advice name="isOneWay" aspect="org.jboss.internal.soa.esb.soap.wise.WSMethodIsOneWayAspect"/>
Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/SOAPClientAspectUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/SOAPClientAspectUnitTest.java 2012-03-28 07:52:47 UTC (rev 37959)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/SOAPClientAspectUnitTest.java 2012-03-28 12:46:50 UTC (rev 37960)
@@ -22,12 +22,14 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import it.javalinux.wise.core.client.WSDynamicClient;
import it.javalinux.wise.core.client.WSEndpoint;
import it.javalinux.wise.core.client.WSMethod;
import it.javalinux.wise.core.utils.WiseProperties;
import java.io.File;
+import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -46,10 +48,26 @@
*/
public class SOAPClientAspectUnitTest
{
+ private static final String workingDir = "working";
+ private static File workingDirFile;
+
+ @BeforeClass
+ public static void setup()
+ {
+ workingDirFile = new File(workingDir);
+ workingDirFile.mkdir();
+ }
+
+ @AfterClass
+ public static void teardown()
+ {
+ workingDirFile.delete();
+ }
+
@Test
public void wrappedService() throws Throwable
{
- WiseProperties props = WiseProperties.newInstance("build/working");
+ WiseProperties props = WiseProperties.newInstance(workingDir);
props.setProperty("wise.forceImportObject", "true");
props.setProperty("wise.targetPackage", "org.jboss.soa.esb.actions.soap.wise");
props.setProperty("wise.keepGeneratedSources", "true");
@@ -91,6 +109,47 @@
}
+ @Test
+ public void jaxbBindingsFile() throws Throwable
+ {
+ WiseProperties props = WiseProperties.newInstance(workingDir);
+ props.setProperty("wise.forceImportObject", "true");
+ props.setProperty("wise.targetPackage", "org.jboss.soa.esb.actions.soap.wise.generated");
+ props.setProperty("wise.keepGeneratedSources", "true");
+ props.setProperty("wise.wsImporter.verbose", "true");
+
+ // Test with no bindings file
+ WSDynamicClient client = new WSDynamicClient(props);
+ assertNotNull(client);
+ client.init(getClass().getResource("wrappedservice.wsdl").toExternalForm(), "wrappedservice", null, null);
+ Class complexObject = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.ComplexObject");
+ Class pingComplexObject = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.PingComplexObject");
+ Class pingComplexObjectResponse = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.PingComplexObjectResponse");
+ assertNotNull(complexObject);
+ assertNotNull(pingComplexObject);
+ assertNotNull(pingComplexObjectResponse);
+ // Strange Junit returns null if it is not Serializable :(
+ assertTrue((complexObject instanceof Serializable? true: false));
+ assertTrue((pingComplexObject instanceof Serializable? true: false));
+ assertTrue((pingComplexObjectResponse instanceof Serializable? true: false));
+
+ // Test with serializable bindings file
+ props.setProperty("wise.jaxb.bindings", "org/jboss/soa/esb/actions/soap/wise/serialize.xjb");
+ client = new WSDynamicClient(props);
+ assertNotNull(client);
+ client.init(getClass().getResource("wrappedservice.wsdl").toExternalForm(), "wrappedservice", null, null);
+ complexObject = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.ComplexObject");
+ pingComplexObject = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.PingComplexObject");
+ pingComplexObjectResponse = client.getClassLoader().loadClass("org.jboss.soa.esb.actions.soap.wise.generated.PingComplexObjectResponse");
+ assertNotNull(complexObject);
+ assertNotNull(pingComplexObject);
+ assertNotNull(pingComplexObjectResponse);
+ assertTrue(complexObject instanceof Serializable);
+ assertTrue(pingComplexObject instanceof Serializable);
+ assertTrue(pingComplexObjectResponse instanceof Serializable);
+
+ }
+
public static junit.framework.Test suite()
{
return new JUnit4TestAdapter(SOAPClientAspectUnitTest.class);
Added: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/serialize.xjb
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/serialize.xjb (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wise/serialize.xjb 2012-03-28 12:46:50 UTC (rev 37960)
@@ -0,0 +1,6 @@
+<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <jxb:globalBindings>
+ <jxb:serializable/>
+ </jxb:globalBindings>
+</jxb:bindings>
More information about the jboss-svn-commits
mailing list