You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
| 2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
| 2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
| 2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
| 2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Author: tho...@jb...
Date: 2006-07-04 06:59:16 -0400 (Tue, 04 Jul 2006)
New Revision: 549
Added:
trunk/.settings/org.eclipse.core.resources.prefs
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl
trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/
trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl
Removed:
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_ResponseStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_addItemResponse_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_ResponseStruct.java
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/application-client.xml
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/config.xml
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jboss-client.xml
trunk/src/test/resources/addressing/replyto/Initial-META-INF/application-client.xml
trunk/src/test/resources/addressing/replyto/Initial-META-INF/config.xml
trunk/src/test/resources/addressing/replyto/Initial-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/replyto/Initial-META-INF/jboss-client.xml
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/application-client.xml
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/config.xml
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jboss-client.xml
Modified:
trunk/src/test/ant/build-jars.xml
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/FaultToEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpointImpl.java
Log:
Fix wsa replyto testcase
Added: trunk/.settings/org.eclipse.core.resources.prefs
===================================================================
--- trunk/.settings/org.eclipse.core.resources.prefs 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/.settings/org.eclipse.core.resources.prefs 2006-07-04 10:59:16 UTC (rev 549)
@@ -0,0 +1,8 @@
+#Tue Jul 04 11:35:41 CEST 2006
+eclipse.preferences.version=1
+encoding//src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl=UTF-8
+encoding//src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl=UTF-8
+encoding//src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl=UTF-8
+encoding//src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl=UTF-8
+encoding//src/test/resources/benchmark/rpclit/META-INF/wsdl/BenchmarkWebService.wsdl=UTF-8
+encoding//src/test/resources/jbws434/WEB-INF/wsdl/TestService.wsdl=UTF-8
Modified: trunk/src/test/ant/build-jars.xml
===================================================================
--- trunk/src/test/ant/build-jars.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/ant/build-jars.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -75,19 +75,6 @@
<include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint_*_ResponseStruct.class"/>
</classes>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-addressing-initial-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint.class"/>
- <include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint_*_RequestStruct.class"/>
- <include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint_*_ResponseStruct.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/addressing/replyto/Initial-META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jbossws-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- </metainf>
- </jar>
<war warfile="${build.test.dir}/libs/jbossws-addressing-replyto.war" webxml="${build.test.dir}/resources/addressing/replyto/ReplyTo-WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/addressing/replyto/ReplyToEndpointImpl.class"/>
@@ -96,36 +83,12 @@
<include name="org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_*_ResponseStruct.class"/>
</classes>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-addressing-replyto-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/addressing/replyto/ReplyToEndpoint.class"/>
- <include name="org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_*_RequestStruct.class"/>
- <include name="org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_*_ResponseStruct.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/addressing/replyto/ReplyTo-META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jbossws-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- </metainf>
- </jar>
<war warfile="${build.test.dir}/libs/jbossws-addressing-faultto.war" webxml="${build.test.dir}/resources/addressing/replyto/FaultTo-WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/addressing/replyto/FaultToEndpointImpl.class"/>
<include name="org/jboss/test/ws/addressing/replyto/FaultToEndpoint.class"/>
</classes>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-addressing-faultto-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/addressing/replyto/FaultToEndpoint.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/addressing/replyto/FaultTo-META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jbossws-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- </metainf>
- </jar>
<!-- jbossws-anonymous -->
<war warfile="${build.test.dir}/libs/jbossws-anonymous.war" webxml="${build.test.dir}/resources/anonymous/WEB-INF/web.xml">
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -22,9 +22,16 @@
package org.jboss.test.ws.addressing.replyto;
import java.io.ByteArrayInputStream;
+import java.io.File;
import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
@@ -34,6 +41,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.addressing.soap.SOAPClientHandler;
+import org.jboss.ws.jaxrpc.ServiceImpl;
+import org.jboss.ws.wsse.WSSecurityHandlerOutbound;
/**
* Test endpoint using ws-addressing
@@ -43,6 +53,8 @@
*/
public class AddressingReplyToTestCase extends JBossWSTest
{
+ private static String nsURI = "http://org.jboss.ws/addressing/replyto";
+
private static InitialEndpoint initial;
private static ReplyToEndpoint replyto;
private static FaultToEndpoint faultto;
@@ -50,9 +62,7 @@
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(AddressingReplyToTestCase.class,
- "jbossws-addressing-initial.war,jbossws-addressing-initial-client.jar," +
- "jbossws-addressing-replyto.war,jbossws-addressing-replyto-client.jar," +
- "jbossws-addressing-faultto.war,jbossws-addressing-faultto-client.jar");
+ "jbossws-addressing-initial.war, jbossws-addressing-replyto.war, jbossws-addressing-faultto.war");
}
protected void setUp() throws Exception
@@ -61,12 +71,40 @@
if (initial == null)
{
- Service initialService = (Service)getInitialContext("initial-client").lookup("java:comp/env/service/InitialService");
+ ServiceFactory factory = ServiceFactory.newInstance();
+
+ URL initURL = new File("resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl").toURL();
+ ServiceImpl initialService = (ServiceImpl)factory.createService(initURL, new QName(nsURI, "InitialEndpointImplService"));
initial = (InitialEndpoint)initialService.getPort(InitialEndpoint.class);
- Service replytoService = (Service)getInitialContext("replyto-client").lookup("java:comp/env/service/ReplyToService");
- replyto = (ReplyToEndpoint)replytoService.getPort(ReplyToEndpoint.class);
- Service faulttoService = (Service)getInitialContext("faultto-client").lookup("java:comp/env/service/FaultToService");
- faultto = (FaultToEndpoint)faulttoService.getPort(FaultToEndpoint.class);
+
+ HandlerRegistry registry = initialService.getDynamicHandlerRegistry();
+ QName portName = new QName(nsURI, "InitialEndpointPort");
+ List infos = registry.getHandlerChain(portName);
+ infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
+ infos.add(new HandlerInfo(SOAPClientHandler.class, new HashMap(), new QName[]{}));
+ registry.setHandlerChain(portName, infos);
+
+ URL replyToURL = new File("resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl").toURL();
+ ServiceImpl replyToService = (ServiceImpl)factory.createService(replyToURL, new QName(nsURI, "ReplyToEndpointImplService"));
+ replyto = (ReplyToEndpoint)replyToService.getPort(ReplyToEndpoint.class);
+
+ registry = replyToService.getDynamicHandlerRegistry();
+ portName = new QName(nsURI, "ReplyToEndpointPort");
+ infos = registry.getHandlerChain(portName);
+ infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
+ infos.add(new HandlerInfo(SOAPClientHandler.class, new HashMap(), new QName[]{}));
+ registry.setHandlerChain(portName, infos);
+
+ URL faultToURL = new File("resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl").toURL();
+ ServiceImpl faultToService = (ServiceImpl)factory.createService(faultToURL, new QName(nsURI, "FaultToEndpointImplService"));
+ faultto = (FaultToEndpoint)faultToService.getPort(FaultToEndpoint.class);
+
+ registry = faultToService.getDynamicHandlerRegistry();
+ portName = new QName(nsURI, "FaultToEndpointPort");
+ infos = registry.getHandlerChain(portName);
+ infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
+ infos.add(new HandlerInfo(SOAPClientHandler.class, new HashMap(), new QName[]{}));
+ registry.setHandlerChain(portName, infos);
}
}
@@ -74,14 +112,14 @@
*/
public void testReplyToMessage() throws Exception
{
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
- " <ns1:result>Mars Bar</ns1:result>" +
- " </ns1:addItemResponse>" +
- " </env:Body>" +
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
"</env:Envelope>";
MessageFactory msgFactory = MessageFactory.newInstance();
@@ -98,15 +136,15 @@
*/
public void testFaultToMessage() throws Exception
{
- String reqEnv =
- "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <env:Fault>" +
- " <faultcode>env:Client</faultcode>" +
- " <faultstring>java.lang.IllegalArgumentException: Mars Bar</faultstring>" +
- " </env:Fault>" +
- " </env:Body>" +
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <env:Fault>" +
+ " <faultcode>env:Client</faultcode>" +
+ " <faultstring>java.lang.IllegalArgumentException: Mars Bar</faultstring>" +
+ " </env:Fault>" +
+ " </env:Body>" +
"</env:Envelope>";
MessageFactory msgFactory = MessageFactory.newInstance();
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/FaultToEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/FaultToEndpointImpl.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/FaultToEndpointImpl.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -29,8 +29,6 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPMessageHandler;
-import javax.jws.soap.SOAPMessageHandlers;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPFault;
@@ -41,7 +39,6 @@
* WS-Addressing service endpoint
*
* @author Tho...@jb...
- *
* @since 24-Nov-2005
*/
@SOAPBinding(style = SOAPBinding.Style.RPC)
@@ -52,7 +49,7 @@
private static Logger log = Logger.getLogger(FaultToEndpointImpl.class);
public static String lastFault;
-
+
@Oneway
@WebMethod
public void onFault(SOAPElement soapElement) throws RemoteException
@@ -64,7 +61,7 @@
lastFault = soapFault.getFaultString();
}
}
-
+
@WebMethod
public String getLastFault() throws RemoteException
{
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -24,11 +24,11 @@
//$Id$
import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPMessageHandler;
import javax.jws.soap.SOAPMessageHandlers;
+import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
@@ -36,13 +36,11 @@
* WS-Addressing service endpoint
*
* @author Tho...@jb...
- *
* @since 24-Nov-2005
*/
+@SOAPBinding(style = Style.RPC)
@WebService(name = "InitialEndpoint", targetNamespace = "http://org.jboss.ws/addressing/replyto")
-@SOAPMessageHandlers( {
- @SOAPMessageHandler(className = "org.jboss.ws.addressing.soap.SOAPServerHandler")
- })
+@SOAPMessageHandlers( { @SOAPMessageHandler(className = "org.jboss.ws.addressing.soap.SOAPServerHandler") })
public class InitialEndpointImpl implements InitialEndpoint
{
// provide logging
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_RequestStruct.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_RequestStruct.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,26 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.addressing.replyto;
-
-
-public class InitialEndpoint_addItem_RequestStruct {
- protected java.lang.String String_1;
-
- public InitialEndpoint_addItem_RequestStruct() {
- }
-
- public InitialEndpoint_addItem_RequestStruct(java.lang.String String_1) {
- this.String_1 = String_1;
- }
-
- public java.lang.String getString_1() {
- return String_1;
- }
-
- public void setString_1(java.lang.String String_1) {
- this.String_1 = String_1;
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_ResponseStruct.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpoint_addItem_ResponseStruct.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,26 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.addressing.replyto;
-
-
-public class InitialEndpoint_addItem_ResponseStruct {
- protected java.lang.String result;
-
- public InitialEndpoint_addItem_ResponseStruct() {
- }
-
- public InitialEndpoint_addItem_ResponseStruct(java.lang.String result) {
- this.result = result;
- }
-
- public java.lang.String getResult() {
- return result;
- }
-
- public void setResult(java.lang.String result) {
- this.result = result;
- }
-}
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpointImpl.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpointImpl.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -28,10 +28,9 @@
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
-import javax.jws.WebResult;
import javax.jws.WebService;
-import javax.jws.soap.SOAPMessageHandler;
-import javax.jws.soap.SOAPMessageHandlers;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
@@ -39,9 +38,9 @@
* WS-Addressing service endpoint
*
* @author Tho...@jb...
- *
* @since 24-Nov-2005
*/
+@SOAPBinding(style = Style.RPC)
@WebService(name = "ReplyToEndpoint", targetNamespace = "http://org.jboss.ws/addressing/replyto")
public class ReplyToEndpointImpl implements ReplyToEndpoint
{
@@ -52,7 +51,8 @@
@Oneway
@WebMethod
- public void addItemResponse(@WebParam(name = "result") String item) throws RemoteException
+ public void addItemResponse(@WebParam(name = "result")
+ String item) throws RemoteException
{
log.info("addItemResponse: " + item);
lastItem = item;
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_addItemResponse_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_addItemResponse_RequestStruct.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_addItemResponse_RequestStruct.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,26 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.addressing.replyto;
-
-
-public class ReplyToEndpoint_addItemResponse_RequestStruct {
- protected java.lang.String result;
-
- public ReplyToEndpoint_addItemResponse_RequestStruct() {
- }
-
- public ReplyToEndpoint_addItemResponse_RequestStruct(java.lang.String result) {
- this.result = result;
- }
-
- public java.lang.String getResult() {
- return result;
- }
-
- public void setResult(java.lang.String result) {
- this.result = result;
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_RequestStruct.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_RequestStruct.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,13 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.addressing.replyto;
-
-
-public class ReplyToEndpoint_getLastItem_RequestStruct {
-
- public ReplyToEndpoint_getLastItem_RequestStruct() {
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_ResponseStruct.java 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ReplyToEndpoint_getLastItem_ResponseStruct.java 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,26 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.addressing.replyto;
-
-
-public class ReplyToEndpoint_getLastItem_ResponseStruct {
- protected java.lang.String result;
-
- public ReplyToEndpoint_getLastItem_ResponseStruct() {
- }
-
- public ReplyToEndpoint_getLastItem_ResponseStruct(java.lang.String result) {
- this.result = result;
- }
-
- public java.lang.String getResult() {
- return result;
- }
-
- public void setResult(java.lang.String result) {
- this.result = result;
- }
-}
Deleted: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/application-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/application-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/FaultToService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.addressing.replyto.FaultToEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.addressing.replyto.ClientHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/config.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/config.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/config.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-NOTE: manual editing must be done because of the naming convention differences for wrapper beansbetween wscompile and JSR-181
-
-wscompile -import -f:wsi -f:unwrap -mapping jaxrpc-mapping.xml config.xml
-
--->
-
-<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-<!--
-<wsdl location="http://@jbosstest.host.name@:8080/jbossws-addressing-faultto/FaultToEndpoint?wsdl" packageName="org.jboss.test.ws.addressing.replyto"/>
--->
-
-<wsdl location="wsdl/FaultToService.wsdl" packageName="org.jboss.test.ws.addressing.replyto"/>
-</configuration>
Deleted: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jaxrpc-mapping.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jaxrpc-mapping.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
-<package-mapping>
-<package-type>org.jboss.test.ws.addressing.replyto</package-type>
-<namespaceURI>http://org.jboss.ws/addressing/replyto</namespaceURI>
-</package-mapping>
-<service-interface-mapping>
-<service-interface>org.jboss.test.ws.addressing.replyto.FaultToEndpointImplService</service-interface>
-<wsdl-service-name xmlns:serviceNS="http://org.jboss.ws/addressing/replyto">serviceNS:FaultToEndpointImplService</wsdl-service-name>
-<port-mapping>
-<port-name>FaultToEndpointPort</port-name>
-<java-port-name>FaultToEndpointPort</java-port-name>
-</port-mapping>
-</service-interface-mapping>
-<service-endpoint-interface-mapping>
-<service-endpoint-interface>org.jboss.test.ws.addressing.replyto.FaultToEndpoint</service-endpoint-interface>
-<wsdl-port-type xmlns:portTypeNS="http://org.jboss.ws/addressing/replyto">portTypeNS:FaultToEndpoint</wsdl-port-type>
-<wsdl-binding xmlns:bindingNS="http://org.jboss.ws/addressing/replyto">bindingNS:FaultToEndpointBinding</wsdl-binding>
-<service-endpoint-method-mapping>
-<java-method-name>getLastFault</java-method-name>
-<wsdl-operation>getLastFault</wsdl-operation>
-<wsdl-return-value-mapping>
-<method-return-value>java.lang.String</method-return-value>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:FaultToEndpoint_getLastFaultResponse</wsdl-message>
-<wsdl-message-part-name>result</wsdl-message-part-name>
-</wsdl-return-value-mapping>
-</service-endpoint-method-mapping>
-<service-endpoint-method-mapping>
-<java-method-name>onFault</java-method-name>
-<wsdl-operation>onFault</wsdl-operation>
-<method-param-parts-mapping>
-<param-position>0</param-position>
-<param-type>javax.xml.soap.SOAPElement</param-type>
-<wsdl-message-mapping>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:FaultToEndpoint_onFault</wsdl-message>
-<wsdl-message-part-name>SOAPElement_1</wsdl-message-part-name>
-<parameter-mode>IN</parameter-mode>
-</wsdl-message-mapping>
-</method-param-parts-mapping>
-</service-endpoint-method-mapping>
-</service-endpoint-interface-mapping>
-</java-wsdl-mapping>
Deleted: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jboss-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/jboss-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>faultto-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/FaultToService</service-ref-name>
- <config-name>Standard Addressing Client</config-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-addressing-faultto/FaultToService?wsdl</wsdl-override>
- </service-ref>
-</jboss-client>
Added: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl 2006-07-04 10:59:16 UTC (rev 549)
@@ -0,0 +1,43 @@
+<definitions name='FaultToEndpointImplService' targetNamespace='http://org.jboss.ws/addressing/replyto' xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/addressing/replyto' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='FaultToEndpoint_getLastFaultResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='FaultToEndpoint_onFault'>
+ <part name='SOAPElement_1' type='xsd:anyType'/>
+ </message>
+ <message name='FaultToEndpoint_getLastFault'></message>
+ <portType name='FaultToEndpoint'>
+ <operation name='getLastFault'>
+ <input message='tns:FaultToEndpoint_getLastFault'/>
+ <output message='tns:FaultToEndpoint_getLastFaultResponse'/>
+ </operation>
+ <operation name='onFault' parameterOrder='SOAPElement_1'>
+ <input message='tns:FaultToEndpoint_onFault'/>
+ </operation>
+ </portType>
+ <binding name='FaultToEndpointBinding' type='tns:FaultToEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='getLastFault'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </output>
+ </operation>
+ <operation name='onFault'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </input>
+ </operation>
+ </binding>
+ <service name='FaultToEndpointImplService'>
+ <port binding='tns:FaultToEndpointBinding' name='FaultToEndpointPort'>
+ <soap:address location='http://@jbosstest.host.name@:8080/jbossws-addressing-faultto/FaultToService'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/src/test/resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/src/test/resources/addressing/replyto/Initial-META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/Initial-META-INF/application-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/Initial-META-INF/application-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/InitialService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.addressing.replyto.InitialEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.addressing.replyto.ClientHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/addressing/replyto/Initial-META-INF/config.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/Initial-META-INF/config.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/Initial-META-INF/config.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-NOTE: manual editing must be done because of the naming convention differences for wrapper beansbetween wscompile and JSR-181
-
-wscompile -import -f:wsi -f:unwrap -mapping jaxrpc-mapping.xml config.xml
-
--->
-
-<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-<wsdl location="http://@jbosstest.host.name@:8080/jbossws-addressing-initial/InitialService?wsdl" packageName="org.jboss.test.ws.addressing.replyto"/>
-</configuration>
Deleted: trunk/src/test/resources/addressing/replyto/Initial-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/Initial-META-INF/jaxrpc-mapping.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/Initial-META-INF/jaxrpc-mapping.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
-<package-mapping>
-<package-type>org.jboss.test.ws.addressing.replyto</package-type>
-<namespaceURI>http://org.jboss.ws/addressing/replyto</namespaceURI>
-</package-mapping>
-<java-xml-type-mapping>
-<java-type>org.jboss.test.ws.addressing.replyto.InitialEndpoint_addItem_ResponseStruct</java-type>
-<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/replyto">typeNS:addItemResponse</root-type-qname>
-<qname-scope>complexType</qname-scope>
-<variable-mapping>
-<java-variable-name>result</java-variable-name>
-<xml-element-name>result</xml-element-name>
-</variable-mapping>
-</java-xml-type-mapping>
-<java-xml-type-mapping>
-<java-type>org.jboss.test.ws.addressing.replyto.InitialEndpoint_addItem_RequestStruct</java-type>
-<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/replyto">typeNS:addItem</root-type-qname>
-<qname-scope>complexType</qname-scope>
-<variable-mapping>
-<java-variable-name>string_1</java-variable-name>
-<xml-element-name>String_1</xml-element-name>
-</variable-mapping>
-</java-xml-type-mapping>
-<service-interface-mapping>
-<service-interface>org.jboss.test.ws.addressing.replyto.InitialEndpointImplService</service-interface>
-<wsdl-service-name xmlns:serviceNS="http://org.jboss.ws/addressing/replyto">serviceNS:InitialEndpointImplService</wsdl-service-name>
-<port-mapping>
-<port-name>InitialEndpointPort</port-name>
-<java-port-name>InitialEndpointPort</java-port-name>
-</port-mapping>
-</service-interface-mapping>
-<service-endpoint-interface-mapping>
-<service-endpoint-interface>org.jboss.test.ws.addressing.replyto.InitialEndpoint</service-endpoint-interface>
-<wsdl-port-type xmlns:portTypeNS="http://org.jboss.ws/addressing/replyto">portTypeNS:InitialEndpoint</wsdl-port-type>
-<wsdl-binding xmlns:bindingNS="http://org.jboss.ws/addressing/replyto">bindingNS:InitialEndpointBinding</wsdl-binding>
-<service-endpoint-method-mapping>
-<java-method-name>addItem</java-method-name>
-<wsdl-operation>addItem</wsdl-operation>
-<wrapped-element/>
-<method-param-parts-mapping>
-<param-position>0</param-position>
-<param-type>java.lang.String</param-type>
-<wsdl-message-mapping>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:InitialEndpoint_addItem</wsdl-message>
-<wsdl-message-part-name>String_1</wsdl-message-part-name>
-<parameter-mode>IN</parameter-mode>
-</wsdl-message-mapping>
-</method-param-parts-mapping>
-<wsdl-return-value-mapping>
-<method-return-value>java.lang.String</method-return-value>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:InitialEndpoint_addItemResponse</wsdl-message>
-<wsdl-message-part-name>result</wsdl-message-part-name>
-</wsdl-return-value-mapping>
-</service-endpoint-method-mapping>
-</service-endpoint-interface-mapping>
-</java-wsdl-mapping>
Deleted: trunk/src/test/resources/addressing/replyto/Initial-META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/Initial-META-INF/jboss-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/Initial-META-INF/jboss-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>initial-client</jndi-name>
- <service-ref>
- <service-ref-name>service/InitialService</service-ref-name>
- <config-name>Standard Addressing Client</config-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-addressing-initial/InitialService?wsdl</wsdl-override>
- </service-ref>
-</jboss-client>
Added: trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl 2006-07-04 10:59:16 UTC (rev 549)
@@ -0,0 +1,33 @@
+<definitions name='InitialEndpointImplService' targetNamespace='http://org.jboss.ws/addressing/replyto' xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/addressing/replyto' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='InitialEndpoint_addItemResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='InitialEndpoint_addItem'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <portType name='InitialEndpoint'>
+ <operation name='addItem' parameterOrder='String_1'>
+ <input message='tns:InitialEndpoint_addItem'/>
+ <output message='tns:InitialEndpoint_addItemResponse'/>
+ </operation>
+ </portType>
+ <binding name='InitialEndpointBinding' type='tns:InitialEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='addItem'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='InitialEndpointImplService'>
+ <port binding='tns:InitialEndpointBinding' name='InitialEndpointPort'>
+ <soap:address location='http://@jbosstest.host.name@:8080/jbossws-addressing-initial/InitialService'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/src/test/resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/application-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/application-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/ReplyToService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.addressing.replyto.ReplyToEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.addressing.replyto.ClientHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/config.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/config.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/config.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-NOTE: manual editing must be done because of the naming convention differences for wrapper beansbetween wscompile and JSR-181
-
-wscompile -import -f:wsi -f:unwrap -mapping jaxrpc-mapping.xml config.xml
-
--->
-
-<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-<wsdl location="http://@jbosstest.host.name@:8080/jbossws-addressing-replyto/ReplyToService?wsdl" packageName="org.jboss.test.ws.addressing.replyto"/>
-</configuration>
Deleted: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jaxrpc-mapping.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jaxrpc-mapping.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
-<package-mapping>
-<package-type>org.jboss.test.ws.addressing.replyto</package-type>
-<namespaceURI>http://org.jboss.ws/addressing/replyto</namespaceURI>
-</package-mapping>
-<java-xml-type-mapping>
-<java-type>org.jboss.test.ws.addressing.replyto.ReplyToEndpoint_getLastItem_RequestStruct</java-type>
-<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/replyto">typeNS:getLastItem</root-type-qname>
-<qname-scope>complexType</qname-scope>
-</java-xml-type-mapping>
-<java-xml-type-mapping>
-<java-type>org.jboss.test.ws.addressing.replyto.ReplyToEndpoint_addItemResponse_RequestStruct</java-type>
-<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/replyto">typeNS:addItemResponse</root-type-qname>
-<qname-scope>complexType</qname-scope>
-<variable-mapping>
-<java-variable-name>result</java-variable-name>
-<xml-element-name>result</xml-element-name>
-</variable-mapping>
-</java-xml-type-mapping>
-<java-xml-type-mapping>
-<java-type>org.jboss.test.ws.addressing.replyto.ReplyToEndpoint_getLastItem_ResponseStruct</java-type>
-<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/replyto">typeNS:getLastItemResponse</root-type-qname>
-<qname-scope>complexType</qname-scope>
-<variable-mapping>
-<java-variable-name>result</java-variable-name>
-<xml-element-name>result</xml-element-name>
-</variable-mapping>
-</java-xml-type-mapping>
-<service-interface-mapping>
-<service-interface>org.jboss.test.ws.addressing.replyto.ReplyToEndpointImplService</service-interface>
-<wsdl-service-name xmlns:serviceNS="http://org.jboss.ws/addressing/replyto">serviceNS:ReplyToEndpointImplService</wsdl-service-name>
-<port-mapping>
-<port-name>ReplyToEndpointPort</port-name>
-<java-port-name>ReplyToEndpointPort</java-port-name>
-</port-mapping>
-</service-interface-mapping>
-<service-endpoint-interface-mapping>
-<service-endpoint-interface>org.jboss.test.ws.addressing.replyto.ReplyToEndpoint</service-endpoint-interface>
-<wsdl-port-type xmlns:portTypeNS="http://org.jboss.ws/addressing/replyto">portTypeNS:ReplyToEndpoint</wsdl-port-type>
-<wsdl-binding xmlns:bindingNS="http://org.jboss.ws/addressing/replyto">bindingNS:ReplyToEndpointBinding</wsdl-binding>
-<service-endpoint-method-mapping>
-<java-method-name>addItemResponse</java-method-name>
-<wsdl-operation>addItemResponse</wsdl-operation>
-<wrapped-element/>
-<method-param-parts-mapping>
-<param-position>0</param-position>
-<param-type>java.lang.String</param-type>
-<wsdl-message-mapping>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:ReplyToEndpoint_addItemResponse</wsdl-message>
-<wsdl-message-part-name>result</wsdl-message-part-name>
-<parameter-mode>IN</parameter-mode>
-</wsdl-message-mapping>
-</method-param-parts-mapping>
-</service-endpoint-method-mapping>
-<service-endpoint-method-mapping>
-<java-method-name>getLastItem</java-method-name>
-<wsdl-operation>getLastItem</wsdl-operation>
-<wrapped-element/>
-<wsdl-return-value-mapping>
-<method-return-value>java.lang.String</method-return-value>
-<wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/replyto">wsdlMsgNS:ReplyToEndpoint_getLastItemResponse</wsdl-message>
-<wsdl-message-part-name>result</wsdl-message-part-name>
-</wsdl-return-value-mapping>
-</service-endpoint-method-mapping>
-</service-endpoint-interface-mapping>
-</java-wsdl-mapping>
Deleted: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jboss-client.xml 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/jboss-client.xml 2006-07-04 10:59:16 UTC (rev 549)
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>replyto-client</jndi-name>
- <service-ref>
- <service-ref-name>service/ReplyToService</service-ref-name>
- <config-name>Standard Addressing Client</config-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-addressing-replyto/ReplyToService?wsdl</wsdl-override>
- </service-ref>
-</jboss-client>
Added: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl 2006-07-04 10:54:07 UTC (rev 548)
+++ trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl 2006-07-04 10:59:16 UTC (rev 549)
@@ -0,0 +1,43 @@
+<definitions name='ReplyToEndpointImplService' targetNamespace='http://org.jboss.ws/addressing/replyto' xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/addressing/replyto' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='ReplyToEndpoint_getLastItemResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='ReplyToEndpoint_getLastItem'></message>
+ <message name='ReplyToEndpoint_addItemResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='ReplyToEndpoint'>
+ <operation name='addItemResponse' parameterOrder='result'>
+ <input message='tns:ReplyToEndpoint_addItemResponse'/>
+ </operation>
+ <operation name='getLastItem'>
+ <input message='tns:ReplyToEndpoint_getLastItem'/>
+ <output message='tns:ReplyToEndpoint_getLastItemResponse'/>
+ </operation>
+ </portType>
+ <binding name='ReplyToEndpointBinding' type='tns:ReplyToEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='addItemResponse'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </input>
+ </operation>
+ <operation name='getLastItem'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/addressing/replyto' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ReplyToEndpointImplService'>
+ <port binding='tns:ReplyToEndpointBinding' name='ReplyToEndpointPort'>
+ <soap:address location='http://@jbosstest.host.name@:8080/jbossws-addressing-replyto/ReplyToService'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/src/test/resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
|
|
From: <jbo...@li...> - 2006-07-04 10:54:13
|
Author: tho...@jb...
Date: 2006-07-04 06:54:07 -0400 (Tue, 04 Jul 2006)
New Revision: 548
Modified:
trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
Log:
fix unsynchronized method due to type registration ordering
Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-07-04 09:54:05 UTC (rev 547)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-07-04 10:54:07 UTC (rev 548)
@@ -35,6 +35,7 @@
import org.jboss.ws.jaxrpc.ParameterStyle;
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxrpc.Style;
+import org.jboss.ws.jaxrpc.TypeMappingImpl;
import org.jboss.ws.jaxrpc.Use;
import org.jboss.ws.utils.HolderUtils;
import org.jboss.ws.utils.JavaUtils;
@@ -247,9 +248,11 @@
if (pass == false)
log.trace("Unmatched parameter count: " + parameters.size() + "!=" + methodTypes.length);
+ TypeMappingImpl typeMapping = epMetaData.getServiceMetaData().getTypeMapping();
for (int i = 0; pass && i < methodTypes.length; i++)
{
ParameterMetaData paramMetaData = parameters.get(i);
+ QName xmlType = paramMetaData.getXmlType();
Class methodType = methodTypes[i];
if (paramMetaData.getMode() != ParameterMode.IN)
@@ -273,8 +276,15 @@
}
else
{
+ String javaTypeName = methodType.getName();
Class paramType = paramMetaData.getJavaType();
pass = JavaUtils.isAssignableFrom(methodType, paramType);
+ if (pass == false && typeMapping.isRegistered(methodType, xmlType))
+ {
+ log.debug("Adjust parameter type from " + paramType.getName() + " to " + javaTypeName);
+ paramMetaData.setJavaTypeName(javaTypeName);
+ pass = true;
+ }
}
String name = (matchByTypeName) ? paramMetaData.getJavaTypeName() : paramMetaData.getJavaType().getName();
|
|
From: <jbo...@li...> - 2006-07-04 09:54:09
|
Author: hei...@jb...
Date: 2006-07-04 05:54:05 -0400 (Tue, 04 Jul 2006)
New Revision: 547
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
Log:
clear thread locals on client side
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-07-04 09:50:00 UTC (rev 546)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-07-04 09:54:05 UTC (rev 547)
@@ -76,6 +76,7 @@
import org.jboss.ws.soap.SOAPMessageContextImpl;
import org.jboss.ws.utils.HolderUtils;
import org.jboss.ws.utils.JavaUtils;
+import org.jboss.ws.utils.ThreadLocalAssociation;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
@@ -116,7 +117,7 @@
standardProperties.add(Call.SOAPACTION_USE_PROPERTY);
standardProperties.add(Call.USERNAME_PROPERTY);
standardProperties.add(Call.PASSWORD_PROPERTY);
-
+
standardProperties.add(Stub.ENDPOINT_ADDRESS_PROPERTY);
standardProperties.add(Stub.SESSION_MAINTAIN_PROPERTY);
standardProperties.add(Stub.USERNAME_PROPERTY);
@@ -716,6 +717,8 @@
// Reset the message context association
MessageContextAssociation.popMessageContext();
+
+ ThreadLocalAssociation.clear();
}
}
|
|
From: <jbo...@li...> - 2006-07-04 09:50:04
|
Author: hei...@jb...
Date: 2006-07-04 05:50:00 -0400 (Tue, 04 Jul 2006)
New Revision: 546
Modified:
branches/jbossws-1.0/src/test/build.xml
Log:
disable debugger
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-07-03 17:31:58 UTC (rev 545)
+++ branches/jbossws-1.0/src/test/build.xml 2006-07-04 09:50:00 UTC (rev 546)
@@ -9,15 +9,15 @@
<!-- $Id$ -->
<project name="JBossWS-Tests" default="main" basedir="../..">
-
+
<import file="${basedir}/build-thirdparty.xml"/>
-
+
<!-- ================================================================== -->
<!-- Setup -->
<!-- ================================================================== -->
-
+
<property file="${basedir}/ant.properties"/>
-
+
<property name="build.dir" value="${basedir}/output"/>
<property name="build.lib.dir" value="${build.dir}/lib"/>
<property name="build.test.dir" value="${build.dir}/tests"/>
@@ -26,12 +26,12 @@
<property name="test.java.dir" value="${test.dir}/java"/>
<property name="test.resources.dir" value="${test.dir}/resources"/>
<property name="thirdparty.dir" value="${basedir}/thirdparty"/>
-
+
<!-- JDK Detection -->
<available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
<available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
- <!-- JBoss Home -->
+
+ <!-- JBoss Home -->
<condition property="jboss.home" value="${jboss.jdk14.home}">
<not>
<isset property="HAVE_JDK_1.5"/>
@@ -40,13 +40,13 @@
<condition property="jboss.home" value="${jboss.jdk15.home}">
<isset property="HAVE_JDK_1.5"/>
</condition>
-
+
<property name="jboss.client" value="${jboss.home}/client"/>
<property name="jboss.lib" value="${jboss.home}/lib"/>
<property name="jboss.server" value="${jboss.home}/server/${jboss.server.instance}"/>
<property name="jboss.server.lib" value="${jboss.server}/lib"/>
<property name="jboss.server.deploy" value="${jboss.server}/deploy"/>
-
+
<!-- Set a hostname property based on COMPUTERNAME for win32, HOSTNAME
otherwise and initialize the node0/node1 cluster hostnames to localhost
and ${hostname} by default. If you cannot route multicast traffic between
@@ -63,44 +63,44 @@
<os family="windows"/>
</not>
</condition>
-
+
<!-- node0 defaults -->
<property name="node0" value="localhost"/>
<property name="node0.http.url" value="http://${node0}:8080"/>
<property name="node0.jndi.url" value="jnp://${node0}:1099"/>
<property name="node0.hajndi.url" value="jnp://${node0}:1100"/>
-
+
<!-- ================================================================== -->
<!-- Initialization -->
<!-- ================================================================== -->
-
+
<target name="prepare">
-
+
<echo message="-----------------------------------------------"/>
<echo message="jboss.home = ${jboss.home}"/>
<echo message="tomcat.home = ${tomcat.home}"/>
<echo message="java.home = ${java.home}"/>
<echo message="-----------------------------------------------"/>
-
+
<available property="jbossws.available" file="${jboss.home}/client/jbossall-client.jar"/>
<available property="installer.setup" file="jboss-ejb3-client.jar"/>
-
+
<fail message="Not available: ${jboss.home}/client/jbossall-client.jar" unless="jbossws.available"/>
-
+
<mkdir dir="${build.test.dir}/log"/>
<touch file="${build.test.dir}/log/test.log"/>
-
+
<tstamp>
<format property="build.id" pattern="yyyyMMddHHmm"/>
</tstamp>
-
+
</target>
-
+
<!--
Init the various classpaths
-->
<target name="init" depends="prepare,thirdparty">
-
+
<condition property="jbossws.client.jar" value="jbossws14-client.jar">
<not>
<isset property="HAVE_JDK_1.5"/>
@@ -109,7 +109,7 @@
<condition property="jbossws.client.jar" value="jbossws-client.jar">
<isset property="HAVE_JDK_1.5"/>
</condition>
-
+
<property name="jbossws.target.server.${jbossws.target.server}" value="true"/>
<property name="tests.noexcludes.file" value="${test.resources.dir}/tests-no-excludes.txt"/>
<condition property="tests.excludesfile" value="${tests.noexcludes.file}">
@@ -385,7 +385,7 @@
-->
<target name="one-test" depends="init" if="test" description="Run a single unit test">
<junit printsummary="yes" showoutput="yes" dir="${build.test.dir}">
- <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006"/>
+ <!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006"/-->
<jvmarg value="-Djava.security.manager"/>
<sysproperty key="java.security.policy" value="${test.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
|
|
From: <jbo...@li...> - 2006-07-03 20:47:37
|
Author: estebanschifman
Date: 2006-07-03 16:47:34 -0400 (Mon, 03 Jul 2006)
New Revision: 4904
Added:
labs/jbossesb/trunk/ESBCore/Tests/build.xml
Log:
Simple build script for ant
Added: labs/jbossesb/trunk/ESBCore/Tests/build.xml
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/build.xml 2006-07-03 20:15:11 UTC (rev 4903)
+++ labs/jbossesb/trunk/ESBCore/Tests/build.xml 2006-07-03 20:47:34 UTC (rev 4904)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<project name="BuildTestClasses" default="compile" basedir=".">
+
+ <property name="jar.name" value="jboss_esb_tests"/>
+ <property name="distrib.dir" value="../dist"/>
+ <property name="bin.dir" value="${basedir}/bin"/>
+ <property name="src.dir" value="${basedir}/src"/>
+ <property environment="env"/>
+
+ <path id="base.class.path">
+ <fileset dir="${env.JBOSS_HOME}/client" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ </path>
+
+ <path id="default.class.path">
+ <path refid="base.class.path"/>
+ <pathelement location="../EsbCommon/bin"/>
+ <pathelement location="../EsbServices/bin"/>
+ </path>
+
+ <target name="init">
+ <tstamp>
+ <format property="TODAY" pattern="d-MM-yy"/>
+ </tstamp>
+ </target>
+
+ <target name="prepare" depends="init">
+ <mkdir dir="${bin.dir}"/>
+ <mkdir dir="${distrib.dir}"/>
+ </target>
+
+ <target name="clean" description="Remove bin directory">
+ <delete dir="${bin.dir}"/>
+ </target>
+
+ <target name="compile" depends="prepare"
+ description="Compile all classes">
+
+ <javac
+ destdir="${bin.dir}"
+ classpathref="default.class.path"
+ debug="on"
+ optimize="off"
+ >
+ <src path="${src.dir}"/>
+ </javac>
+
+ </target>
+
+ <target name="recompile" depends="clean,compile"
+ description="Clean and compile"/>
+
+ <target name="jar" depends="compile" description="Assemble jar files">
+ <delete file="${distrib.dir}/${jar.name}.jar" />
+ <jar destfile="${distrib.dir}/${jar.name}.jar"
+ basedir="${bin.dir}"
+ includes="**/*.class"
+ excludes="test/**"
+ />
+ </target>
+
+ <target name="all" depends="recompile,jar" />
+
+</project>
|
|
From: <jbo...@li...> - 2006-07-03 20:15:19
|
Author: estebanschifman
Date: 2006-07-03 16:15:11 -0400 (Mon, 03 Jul 2006)
New Revision: 4903
Added:
labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OldDirListener.java
Removed:
labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java
labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OneChildProcess.java
Modified:
labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java
labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java
Log:
Renamed old 'DirListener' to 'OldDirListener'
Got rid of the stand alone OneChildProcess class. It's now an inner class
Moved some methods/variables from BetterListener to AbstractPoller
Modified: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java 2006-07-03 16:58:38 UTC (rev 4902)
+++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/AbstractPoller.java 2006-07-03 20:15:11 UTC (rev 4903)
@@ -23,6 +23,7 @@
package org.jboss.soa.esb.listeners;
+import java.lang.reflect.Constructor;
import java.util.*;
import org.apache.log4j.*;
@@ -34,13 +35,23 @@
import org.jboss.soa.esb.common.*;
import org.jboss.soa.esb.helpers.*;
import org.jboss.soa.esb.parameters.*;
+import org.jboss.soa.esb.processors.EsbFileProcessor;
public abstract class AbstractPoller
{
- protected abstract void executeOneCycle()throws Exception;
protected abstract GroupOfChilds newChildGroup(ThreadGroup pThG) throws Exception;
+ // You can override these three values at constructor time of your
+ // derived class after calling super(String)
+ protected int m_iMinPollMillis = 3000 // minimum polling interval
+ ,m_iDfltPollMillis = 20000 // default polling interval
+ ,m_iDfltReloadMillis= 180000 // default interval between
+ // parameter reloading
+ ;
+
+ public static final String PARM_ACTION_CLASS = "actionClass";
+
public static final String PARM_POLL_LTCY = "pollLatency";
public static final String PARM_RELOAD_LTCY = "reloadLatency";
@@ -63,6 +74,7 @@
protected TopicSession m_oSession;
protected Topic m_oTopic;
protected TopicSubscriber m_oTopicSubs;
+
protected AbstractPoller(String p_sParamsUid) throws Exception
@@ -97,6 +109,45 @@
}
} //__________________________________
+ private void executeOneCycle() throws Exception
+ {
+ String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY);
+ long lNewLoad = System.currentTimeMillis()
+ + ( (null != sAtt)
+ ? (1000 * Integer.parseInt(sAtt))
+ : m_iDfltReloadMillis
+ );
+
+ DomElement[] oaParms = m_oParms.getAllElemChildren();
+
+ sAtt = m_oParms.getAttr(PARM_POLL_LTCY);
+ long lPollLtcy = (null != sAtt)
+ ? (1000 * Integer.parseInt(sAtt))
+ : m_iDfltPollMillis;
+
+ if (lPollLtcy < m_iMinPollMillis)
+ lPollLtcy = m_iMinPollMillis;
+
+ boolean bFirst = true;
+ while (System.currentTimeMillis() <= lNewLoad)
+ {
+ for (DomElement oCurr : oaParms)
+ {
+ oneScan(oCurr, bFirst);
+ }
+ long lSlack = lNewLoad - System.currentTimeMillis();
+ if (lSlack < 0)
+ {
+ break;
+ }
+ if (waitForQuiesce(Math.min(lSlack, lPollLtcy)))
+ { m_bEndRequested = true;
+ return;
+ }
+ bFirst = false;
+ }
+ } //_________________________________________
+
protected String formatLogMsg(String p_s)
{ return new StringBuilder("Processor '")
.append(EsbUtil.classSuffix(this.getClass())).append("' <")
@@ -220,14 +271,14 @@
public static final String PARM_MAX_THREADS = "maxThreads";
- protected ThreadGroup m_oThrGrp;
- protected boolean m_bError = false;
+ protected ThreadGroup m_oThrGrp;
+ protected boolean m_bError = false;
protected Class m_oExecClass;
protected DomElement m_oChParms;
protected int m_iQthr = 0, m_iMaxThr;
- protected StringBuilder m_sb;
+ protected StringBuilder m_sb;
protected int m_iSbIni;
protected GroupOfChilds(ThreadGroup p_oThrGrp) throws Exception
@@ -280,10 +331,37 @@
// and to add REAL parameter checking
protected void checkParms(DomElement p_oP) throws Exception
{
- m_sb.setLength(0);
+ m_sb.setLength(m_iSbIni);
m_oChParms = p_oP.cloneObj();
setMaxThreads(p_oP,10);
} //________________________________
- } //______________________________________________________
+ } //______________________________________________________
+
+ protected static class ChildProcess extends Observable implements Runnable
+ { private Class m_oExecClass;
+ private DomElement m_oParms;
+ private Logger m_oLogger;
+ public ChildProcess(Class p_oExec, Observer p_oObs, DomElement p_oP)
+ { m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
+ m_oExecClass = p_oExec;
+ this.addObserver(p_oObs);
+ m_oParms = p_oP;
+ setChanged();
+ notifyObservers(new Integer(1));
+ } //__________________________________
+
+ public void run()
+ { try
+ { Constructor oCnst = m_oExecClass.getConstructor(new Class[] {DomElement.class});
+ Object oProc = oCnst.newInstance(new Object[] {m_oParms});
+ ((EsbFileProcessor)oProc).execute();
+ }
+ catch (Exception e) { m_oLogger.error("run() FAILED",e); }
+
+ setChanged();
+ notifyObservers(new Integer(-1));
+ } //__________________________________
+ } //______________________________________________________
+
} //____________________________________________________________________________
Modified: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java 2006-07-03 16:58:38 UTC (rev 4902)
+++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java 2006-07-03 20:15:11 UTC (rev 4903)
@@ -36,54 +36,16 @@
new BetterDirListener(args[0]);
} //________________________________
- public static final String PARM_FILE_PROCESSOR_CLASS = "fileProcessorClass";
- public static final String PARM_INPUT_DIR = "inputDirURI";
- public static final String PARM_SUFFIX = "inputSuffix";
-
public BetterDirListener(String p_sParamsUid) throws Exception
{
super(p_sParamsUid);
+ m_iDfltReloadMillis = 180000;
+ m_iDfltPollMillis = 20000;
+ m_iMinPollMillis = 5000;
// See superclass - It provides ability to request end by subscribing to a Topic
runUntilEndRequested();
} //__________________________________
- @Override
- protected void executeOneCycle() throws Exception
- {
- String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY);
- long lNewLoad = System.currentTimeMillis()
- + ( (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 180000);
- DomElement[] oaParms = m_oParms.getAllElemChildren();
-
- sAtt = m_oParms.getAttr(PARM_POLL_LTCY);
- long lPollLtcy = (null != sAtt)
- ? (1000 * Integer.parseInt(sAtt))
- : 20000; // if poll latency was not there, do it every 20 secs
-
- if (lPollLtcy < 3000)
- lPollLtcy = 3000; // but not too often
-
- boolean bFirst = true;
- while (System.currentTimeMillis() <= lNewLoad)
- {
- for (DomElement oCurr : oaParms)
- {
- super.oneScan(oCurr, bFirst);
- }
- long lSlack = lNewLoad - System.currentTimeMillis();
- if (lSlack < 0)
- {
- break;
- }
- if (waitForQuiesce(Math.min(lSlack, lPollLtcy)))
- { m_bEndRequested = true;
- return;
- }
- bFirst = false;
- }
- } //_________________________________________
-
- @Override
protected GroupOfChilds newChildGroup(ThreadGroup pThG) throws Exception
{
return new MyChildGroup(pThG);
@@ -91,6 +53,10 @@
private class MyChildGroup extends AbstractPoller.GroupOfChilds
{
+ public static final String PARM_FILE_PROCESSOR_CLASS = "fileProcessorClass";
+ public static final String PARM_INPUT_DIR = "inputDirURI";
+ public static final String PARM_SUFFIX = "inputSuffix";
+
private File m_oInpDir;
private FileFilter m_oFFilt;
@@ -100,14 +66,7 @@
@Override
protected void doYourJob(DomElement p_oP) throws Exception
- { m_sb.setLength(m_iSbIni);
- if (m_bError)
- {
- m_oLogger.warn(formatLogMsg(" Skipping execution due to previous errors"));
- return;
- }
- checkParms(p_oP);
-
+ {
File[] oaF = m_oInpDir.listFiles(m_oFFilt);
for (File oFcurr : oaF)
@@ -124,17 +83,16 @@
m_oChParms.addElemChild(oThisProc);
new Thread(m_oThrGrp,
- new OneChildProcess(m_oExecClass, this, m_oChParms)).start();
+ new ChildProcess(m_oExecClass, this, m_oChParms)).start();
Thread.sleep(500);
}
- }
+ } //________________________________
protected void checkParms(DomElement p_oP) throws Exception
{
super.checkParms(p_oP);
- String sAtt = p_oP.getAttr(PARM_MAX_THREADS);
- sAtt = m_oChParms.getAttr(PARM_INPUT_DIR);
+ String sAtt = m_oChParms.getAttr(PARM_INPUT_DIR);
if (null == sAtt)
{ throw new Exception(formatLogMsg(
m_sb.append("Missing ").append(PARM_INPUT_DIR)
@@ -168,7 +126,7 @@
m_oExecClass = null;
if (null == sAtt)
{ throw new Exception(formatLogMsg(
- m_sb.append("Missing actionClass attribute").
+ m_sb.append("Missing fileProcessorClass attribute").
toString()));
}
try
Deleted: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java 2006-07-03 16:58:38 UTC (rev 4902)
+++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java 2006-07-03 20:15:11 UTC (rev 4903)
@@ -1,411 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-
-package org.jboss.soa.esb.listeners;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.apache.log4j.*;
-import javax.naming.*;
-import javax.jms.*;
-
-import org.jboss.soa.esb.util.*;
-import org.jboss.soa.esb.common.*;
-import org.jboss.soa.esb.helpers.*;
-import org.jboss.soa.esb.parameters.*;
-import org.jboss.soa.esb.processors.*;
-
-//import org.jboss.soa.esb.nagios.*;
-
-public class DirListener
-{
- public static void main(String[] args) throws Exception
- {
- new DirListener(args[0]);
- } //________________________________
-
- public static final String PARM_POLL_LTCY = "pollLatency";
- public static final String PARM_RELOAD_LTCY = "reloadLatency";
-
- public static final String PARM_MAX_THREADS = "maxThreads";
- public static final String PARM_FILE_PROCESSOR_CLASS = "fileProcessorClass";
-
- public static final String PARM_INPUT_DIR = "inputDirURI";
- public static final String PARM_SUFFIX = "inputSuffix";
-
- private Map<String,GroupOfChilds> m_omChildPrc
- = new HashMap<String,GroupOfChilds>();
-
- private ThreadGroup m_oThrGrp = Thread.currentThread().getThreadGroup();
-
- private Logger m_oLogger;
- private DomElement m_oParms;
- private ParamsRepository m_oParmRepos;
-
- private TopicConnection m_oTopicConn = null;
- private TopicSession m_oSession = null;
- private Topic m_oTopic = null;
- private TopicSubscriber m_oTopicSub = null;
-
- public DirListener(String p_sParamsUid) throws Exception
- {
- m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
-// setupSubscribe();
- /*
- * Removing Nagios integration
- try
- {
- String sNagServer = System.getProperty("jbossEsb.nagios.server");
- if (sNagServer != null)
- {
- int iNagPort = Integer.parseInt
- (System.getProperty("jbossEsb.nagios.port","5667"));
- String sNagService =
- System.getProperty("jbossEsb.nagios.service");
- new NagiosStandaloneHeartbeat(
- sNagServer, iNagPort, sNagService, "rosetta-listener-service");
- }
- }
- catch (Exception eNagios)
- {
- m_oLogger.info("Problems with Nagios Notification", eNagios);
- }
- */
-
- String sFactoryClass = EsbSysProps.getParamsReposFactoryClass();
- m_oParmRepos = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
-
- Name oParms = ParamsReposUtil.nameFromString(p_sParamsUid);
- while (loadParmsCycle(oParms))
- {
- }
- } //__________________________________
-
- protected boolean loadParmsCycle(Name p_oParams) throws Exception
- {
- String sMsg = (null == m_oParms)
- ? "Initial Parameter loading" : "Reloading Params";
- m_oLogger.info(sMsg);
-
- try
- {
- m_oParms = m_oParmRepos.getElement(p_oParams);
- }
- catch (Exception e)
- {
- m_oLogger.warn("Failed to load parameters");
- if (null == m_oParms)
- {
- throw e;
- }
- }
-
- String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY);
- long lNewLoad = System.currentTimeMillis()
- + ( (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 180000);
- DomElement[] oaParms = m_oParms.getAllElemChildren();
-
- sAtt = m_oParms.getAttr(PARM_POLL_LTCY);
- long lPollLtcy = (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 20000;
- if (lPollLtcy < 3000)
- {
- lPollLtcy = 3000;
-
- }
- boolean bFirst = true;
- while (System.currentTimeMillis() <= lNewLoad)
- {
- for (DomElement oCurr : oaParms)
- {
- oneScan(oCurr, bFirst);
- }
- long lSlack = lNewLoad - System.currentTimeMillis();
- if (lSlack < 0)
- {
- break;
- }
- if (waitForQuiesce(Math.min(lSlack, lPollLtcy)))
- {
- return false;
- }
- bFirst = false;
- }
- return true;
- } //_________________________________________
-
- public void setupSubscribe() throws JMSException, NamingException
- {
- try
- {
- String sStopTopic = "topic/quiesce";
- StringBuilder sb = new StringBuilder("processor='DirListener'");
-
- String sJndiType = EsbSysProps.getJndiServerType();
- String sJndiServer = EsbSysProps.getJndiServerURL();
- Context oJndiCtx = AppServerContext.getServerContext(sJndiType,sJndiServer);
-
- Object tmp = oJndiCtx.lookup("UIL2ConnectionFactory");
- TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
- m_oTopicConn = tcf.createTopicConnection();
- m_oTopic = (Topic) oJndiCtx.lookup(sStopTopic);
- m_oSession = m_oTopicConn.createTopicSession
- (false,TopicSession.AUTO_ACKNOWLEDGE);
- m_oTopicConn.start();
- m_oTopicSub = m_oSession.createSubscriber(m_oTopic, sb.toString(),true);
- }
- catch (Exception e)
- { m_oLogger.error("Problems connecting to JMS. ",e);
- }
-
-
- } //_________________________________________
-
- private boolean waitForQuiesce(long p_lMillis) throws Exception
- {
- try
- { boolean bRec = false;
-
- if (null != secureReceive(p_lMillis))
- { bRec = true;
- m_oLogger.info("Starting Quiesce of Listener. ");
- }
- else
- Thread.sleep(p_lMillis);
- return bRec;
-
- }
- catch (Exception e)
- { m_oLogger.error("Problems with waitForQuiesce. ",e);
- Thread.sleep(p_lMillis);
- return false;
- }
- } //_________________________________________
-
- private Object secureReceive(long p_lMillis) throws Exception
- {
- while (true)
- try
- { return (null==m_oTopicSub) ? null : m_oTopicSub.receive(p_lMillis); }
- catch (JMSException e)
- {
- // put here your recovery code
- return null;
- }
-
- } //_________________________________________
-
-
- private void oneScan(DomElement p_oP, boolean p_bFirst) throws Exception
- {
- String sPrcName = p_oP.getName();
- if (!m_omChildPrc.containsKey(sPrcName))
- {
- ThreadGroup[] oaCh = new ThreadGroup[m_oThrGrp.activeGroupCount()];
- int iMax = m_oThrGrp.enumerate(oaCh);
-
- ThreadGroup oThG = null;
- for (int i1 = 0; null == oThG && i1 < iMax; i1++)
- { if (m_oThrGrp.getName().equals(sPrcName))
- oThG = oaCh[i1];
- }
- if (null == oThG)
- oThG = new ThreadGroup(sPrcName);
- m_omChildPrc.put(sPrcName, new GroupOfChilds(oThG));
- }
- GroupOfChilds oCnt = m_omChildPrc.get(sPrcName);
-
- if (null == oCnt) return;
- if (p_bFirst)
- oCnt.m_bError = false;
-
- try
- {
- oCnt.execute(p_oP);
- }
- catch (Exception e)
- {
- oCnt.m_bError = true;
- m_oLogger.error("GroupOfChilds.execute", e);
- }
- } //_________________________________________
-
- private class GroupOfChilds implements Observer
- {
- private ThreadGroup m_oThrGrp;
- private boolean m_bError = false;
-
- private File m_oInpDir;
- private FileFilter m_oFFilt;
- private Class m_oExecClass;
- private DomElement m_oChParms;
- private int m_iQthr = 0, m_iMaxThr;
- private StringBuilder m_sb;
- private int m_iSbIni;
-
- private GroupOfChilds(ThreadGroup p_oThrGrp) throws Exception
- {
- m_oThrGrp = p_oThrGrp;
- m_sb = new StringBuilder("GroupOfThreads ")
- .append(m_oThrGrp.getName()).append(" : ");
- m_iSbIni = m_sb.length();
- } //________________________________
-
- public void update(Observable p_oObs, Object p_oUsrObj)
- {
- if (p_oUsrObj instanceof Integer)
- {
- updQthreads( ( (Integer) p_oUsrObj).intValue());
- }
- } //________________________________
-
- private synchronized void updQthreads(int p_i)
- {
- m_iQthr += p_i;
- } //________________________________
-
- private void execute(DomElement p_oP) throws Exception
- {
- m_sb.setLength(m_iSbIni);
- if (m_bError)
- {
- m_oLogger.warn(m_sb.append(" Skipping execution due to previous errors")
- .toString());
- return;
- }
- checkParms(p_oP);
-
- File[] oaF = m_oInpDir.listFiles(m_oFFilt);
-
- for (File oFcurr : oaF)
- {
- if (m_iQthr >= m_iMaxThr)
- {
- m_oLogger.info(m_sb.append("Waiting for available threads").toString());
- Thread.sleep(5000);
- break;
- }
- m_oChParms.rmvChildsByName(EsbAbstractProcessor.PARMS_THIS_INSTANCE);
- DomElement oThisProc = new DomElement(EsbAbstractProcessor.PARMS_THIS_INSTANCE);
- oThisProc.setAttr(ParamsFileProcessor.FPRC_FILENAME, oFcurr.getName());
- m_oChParms.addElemChild(oThisProc);
-
- new Thread(m_oThrGrp,
- new OneChildProcess(m_oExecClass, this, m_oChParms)).start();
- Thread.sleep(500);
- }
- } //________________________________
-
- protected void checkParms(DomElement p_oP) throws Exception
- {
- String sAtt = p_oP.getAttr(PARM_MAX_THREADS);
- m_iMaxThr = (null == sAtt) ? 1 : Integer.parseInt(sAtt);
- if (m_iMaxThr > 10)
- {
- m_iMaxThr = 10;
- }
- String sUid = p_oP.getName();
- m_oChParms = p_oP.cloneObj();
- sAtt = m_oChParms.getAttr(PARM_INPUT_DIR);
- if (null == sAtt)
- {
- throw new Exception(m_sb.append("Missing ").append(PARM_INPUT_DIR)
- .append(" attribute in -parameters ")
- .append(sUid).toString());
- }
- m_oInpDir = new File(new URI(sAtt));
- if (!m_oInpDir.isDirectory())
- {
- throw new Exception(m_sb.append(sAtt).append(" is not a directory").
- toString());
- }
- if (!m_oInpDir.canRead())
- {
- throw new Exception(m_sb.append("Can't read directory ").append(sAtt).
- toString());
- }
-
- sAtt = m_oChParms.getAttr(PARM_SUFFIX);
- if (null == sAtt)
- {
- throw new Exception(m_sb.append("Missing ").append(PARM_SUFFIX)
- .append(" attribute in -parameters ")
- .append(sUid).toString());
- }
-
- m_oFFilt = new FileEndsWith(sAtt);
-
- do
- {
- sAtt = p_oP.getAttr(PARM_FILE_PROCESSOR_CLASS);
- m_oExecClass = null;
- if (null == sAtt)
- {
- throw new Exception(m_sb.append("Missing actionClass attribute").
- toString());
- }
- try
- {
- m_oExecClass = Class.forName(sAtt);
- }
- catch (ClassNotFoundException e)
- {
- throw new Exception(m_sb.append("Class ").append(sAtt)
- .append(" not found in classpath").toString());
- }
- try
- {
- m_oExecClass.getConstructor(new Class[] {DomElement.class});
- }
- catch (NoSuchMethodException eN)
- {
- throw new Exception(m_sb.append("No appropriate constructor")
- .append(" (DomElement) found for class").toString());
- }
- }
- while (false);
- } //________________________________
-
- private class FileEndsWith implements FileFilter
- {
- String m_sSuffix;
- FileEndsWith(String p_sEnd) throws Exception
- {
- m_sSuffix = p_sEnd;
- if (null == m_sSuffix)
- {
- throw new Exception("Must specify file extension");
- }
- } //_________________________________________
-
- public boolean accept(File p_f)
- {
- if (!p_f.isFile())
- {
- return false;
- }
- return p_f.toString().endsWith(m_sSuffix);
- } //_________________________________________
- } //___________________________________________________
- } //______________________________________________________
-} //____________________________________________________________________________
Copied: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OldDirListener.java (from rev 4902, labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java)
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/DirListener.java 2006-07-03 16:58:38 UTC (rev 4902)
+++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OldDirListener.java 2006-07-03 20:15:11 UTC (rev 4903)
@@ -0,0 +1,440 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+
+package org.jboss.soa.esb.listeners;
+
+import java.io.*;
+import java.lang.reflect.Constructor;
+import java.net.*;
+import java.util.*;
+
+import org.apache.log4j.*;
+
+import javax.naming.*;
+import javax.jms.*;
+
+import org.jboss.soa.esb.util.*;
+import org.jboss.soa.esb.common.*;
+import org.jboss.soa.esb.helpers.*;
+import org.jboss.soa.esb.parameters.*;
+import org.jboss.soa.esb.processors.*;
+
+//import org.jboss.soa.esb.nagios.*;
+
+public class OldDirListener
+{
+ public static void main(String[] args) throws Exception
+ {
+ new OldDirListener(args[0]);
+ } //________________________________
+
+ public static final String PARM_POLL_LTCY = "pollLatency";
+ public static final String PARM_RELOAD_LTCY = "reloadLatency";
+
+ public static final String PARM_MAX_THREADS = "maxThreads";
+ public static final String PARM_FILE_PROCESSOR_CLASS = "fileProcessorClass";
+
+ public static final String PARM_INPUT_DIR = "inputDirURI";
+ public static final String PARM_SUFFIX = "inputSuffix";
+
+ private Map<String,GroupOfChilds> m_omChildPrc
+ = new HashMap<String,GroupOfChilds>();
+
+ private ThreadGroup m_oThrGrp = Thread.currentThread().getThreadGroup();
+
+ private Logger m_oLogger;
+ private DomElement m_oParms;
+ private ParamsRepository m_oParmRepos;
+
+ private TopicConnection m_oTopicConn = null;
+ private TopicSession m_oSession = null;
+ private Topic m_oTopic = null;
+ private TopicSubscriber m_oTopicSub = null;
+
+ public OldDirListener(String p_sParamsUid) throws Exception
+ {
+ m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
+// setupSubscribe();
+ /*
+ * Removing Nagios integration
+ try
+ {
+ String sNagServer = System.getProperty("jbossEsb.nagios.server");
+ if (sNagServer != null)
+ {
+ int iNagPort = Integer.parseInt
+ (System.getProperty("jbossEsb.nagios.port","5667"));
+ String sNagService =
+ System.getProperty("jbossEsb.nagios.service");
+ new NagiosStandaloneHeartbeat(
+ sNagServer, iNagPort, sNagService, "rosetta-listener-service");
+ }
+ }
+ catch (Exception eNagios)
+ {
+ m_oLogger.info("Problems with Nagios Notification", eNagios);
+ }
+ */
+
+ String sFactoryClass = EsbSysProps.getParamsReposFactoryClass();
+ m_oParmRepos = ParamsReposUtil.reposFromFactory(sFactoryClass,null);
+
+ Name oParms = ParamsReposUtil.nameFromString(p_sParamsUid);
+ while (loadParmsCycle(oParms))
+ {
+ }
+ } //__________________________________
+
+ protected boolean loadParmsCycle(Name p_oParams) throws Exception
+ {
+ String sMsg = (null == m_oParms)
+ ? "Initial Parameter loading" : "Reloading Params";
+ m_oLogger.info(sMsg);
+
+ try
+ {
+ m_oParms = m_oParmRepos.getElement(p_oParams);
+ }
+ catch (Exception e)
+ {
+ m_oLogger.warn("Failed to load parameters");
+ if (null == m_oParms)
+ {
+ throw e;
+ }
+ }
+
+ String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY);
+ long lNewLoad = System.currentTimeMillis()
+ + ( (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 180000);
+ DomElement[] oaParms = m_oParms.getAllElemChildren();
+
+ sAtt = m_oParms.getAttr(PARM_POLL_LTCY);
+ long lPollLtcy = (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 20000;
+ if (lPollLtcy < 3000)
+ {
+ lPollLtcy = 3000;
+
+ }
+ boolean bFirst = true;
+ while (System.currentTimeMillis() <= lNewLoad)
+ {
+ for (DomElement oCurr : oaParms)
+ {
+ oneScan(oCurr, bFirst);
+ }
+ long lSlack = lNewLoad - System.currentTimeMillis();
+ if (lSlack < 0)
+ {
+ break;
+ }
+ if (waitForQuiesce(Math.min(lSlack, lPollLtcy)))
+ {
+ return false;
+ }
+ bFirst = false;
+ }
+ return true;
+ } //_________________________________________
+
+ public void setupSubscribe() throws JMSException, NamingException
+ {
+ try
+ {
+ String sStopTopic = "topic/quiesce";
+ StringBuilder sb = new StringBuilder("processor='OldDirListener'");
+
+ String sJndiType = EsbSysProps.getJndiServerType();
+ String sJndiServer = EsbSysProps.getJndiServerURL();
+ Context oJndiCtx = AppServerContext.getServerContext(sJndiType,sJndiServer);
+
+ Object tmp = oJndiCtx.lookup("UIL2ConnectionFactory");
+ TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
+ m_oTopicConn = tcf.createTopicConnection();
+ m_oTopic = (Topic) oJndiCtx.lookup(sStopTopic);
+ m_oSession = m_oTopicConn.createTopicSession
+ (false,TopicSession.AUTO_ACKNOWLEDGE);
+ m_oTopicConn.start();
+ m_oTopicSub = m_oSession.createSubscriber(m_oTopic, sb.toString(),true);
+ }
+ catch (Exception e)
+ { m_oLogger.error("Problems connecting to JMS. ",e);
+ }
+
+
+ } //_________________________________________
+
+ private boolean waitForQuiesce(long p_lMillis) throws Exception
+ {
+ try
+ { boolean bRec = false;
+
+ if (null != secureReceive(p_lMillis))
+ { bRec = true;
+ m_oLogger.info("Starting Quiesce of Listener. ");
+ }
+ else
+ Thread.sleep(p_lMillis);
+ return bRec;
+
+ }
+ catch (Exception e)
+ { m_oLogger.error("Problems with waitForQuiesce. ",e);
+ Thread.sleep(p_lMillis);
+ return false;
+ }
+ } //_________________________________________
+
+ private Object secureReceive(long p_lMillis) throws Exception
+ {
+ while (true)
+ try
+ { return (null==m_oTopicSub) ? null : m_oTopicSub.receive(p_lMillis); }
+ catch (JMSException e)
+ {
+ // put here your recovery code
+ return null;
+ }
+
+ } //_________________________________________
+
+
+ private void oneScan(DomElement p_oP, boolean p_bFirst) throws Exception
+ {
+ String sPrcName = p_oP.getName();
+ if (!m_omChildPrc.containsKey(sPrcName))
+ {
+ ThreadGroup[] oaCh = new ThreadGroup[m_oThrGrp.activeGroupCount()];
+ int iMax = m_oThrGrp.enumerate(oaCh);
+
+ ThreadGroup oThG = null;
+ for (int i1 = 0; null == oThG && i1 < iMax; i1++)
+ { if (m_oThrGrp.getName().equals(sPrcName))
+ oThG = oaCh[i1];
+ }
+ if (null == oThG)
+ oThG = new ThreadGroup(sPrcName);
+ m_omChildPrc.put(sPrcName, new GroupOfChilds(oThG));
+ }
+ GroupOfChilds oCnt = m_omChildPrc.get(sPrcName);
+
+ if (null == oCnt) return;
+ if (p_bFirst)
+ oCnt.m_bError = false;
+
+ try
+ {
+ oCnt.execute(p_oP);
+ }
+ catch (Exception e)
+ {
+ oCnt.m_bError = true;
+ m_oLogger.error("GroupOfChilds.execute", e);
+ }
+ } //_________________________________________
+
+ private class GroupOfChilds implements Observer
+ {
+ private ThreadGroup m_oThrGrp;
+ private boolean m_bError = false;
+
+ private File m_oInpDir;
+ private FileFilter m_oFFilt;
+ private Class m_oExecClass;
+ private DomElement m_oChParms;
+ private int m_iQthr = 0, m_iMaxThr;
+ private StringBuilder m_sb;
+ private int m_iSbIni;
+
+ private GroupOfChilds(ThreadGroup p_oThrGrp) throws Exception
+ {
+ m_oThrGrp = p_oThrGrp;
+ m_sb = new StringBuilder("GroupOfThreads ")
+ .append(m_oThrGrp.getName()).append(" : ");
+ m_iSbIni = m_sb.length();
+ } //________________________________
+
+ public void update(Observable p_oObs, Object p_oUsrObj)
+ {
+ if (p_oUsrObj instanceof Integer)
+ {
+ updQthreads( ( (Integer) p_oUsrObj).intValue());
+ }
+ } //________________________________
+
+ private synchronized void updQthreads(int p_i)
+ {
+ m_iQthr += p_i;
+ } //________________________________
+
+ private void execute(DomElement p_oP) throws Exception
+ {
+ m_sb.setLength(m_iSbIni);
+ if (m_bError)
+ {
+ m_oLogger.warn(m_sb.append(" Skipping execution due to previous errors")
+ .toString());
+ return;
+ }
+ checkParms(p_oP);
+
+ File[] oaF = m_oInpDir.listFiles(m_oFFilt);
+
+ for (File oFcurr : oaF)
+ {
+ if (m_iQthr >= m_iMaxThr)
+ {
+ m_oLogger.info(m_sb.append("Waiting for available threads").toString());
+ Thread.sleep(5000);
+ break;
+ }
+ m_oChParms.rmvChildsByName(EsbAbstractProcessor.PARMS_THIS_INSTANCE);
+ DomElement oThisProc = new DomElement(EsbAbstractProcessor.PARMS_THIS_INSTANCE);
+ oThisProc.setAttr(ParamsFileProcessor.FPRC_FILENAME, oFcurr.getName());
+ m_oChParms.addElemChild(oThisProc);
+
+ new Thread(m_oThrGrp,
+ new ChildProcess(m_oExecClass, this, m_oChParms)).start();
+ Thread.sleep(500);
+ }
+ } //________________________________
+
+ protected void checkParms(DomElement p_oP) throws Exception
+ {
+ String sAtt = p_oP.getAttr(PARM_MAX_THREADS);
+ m_iMaxThr = (null == sAtt) ? 1 : Integer.parseInt(sAtt);
+ if (m_iMaxThr > 10)
+ {
+ m_iMaxThr = 10;
+ }
+ String sUid = p_oP.getName();
+ m_oChParms = p_oP.cloneObj();
+ sAtt = m_oChParms.getAttr(PARM_INPUT_DIR);
+ if (null == sAtt)
+ {
+ throw new Exception(m_sb.append("Missing ").append(PARM_INPUT_DIR)
+ .append(" attribute in -parameters ")
+ .append(sUid).toString());
+ }
+ m_oInpDir = new File(new URI(sAtt));
+ if (!m_oInpDir.isDirectory())
+ {
+ throw new Exception(m_sb.append(sAtt).append(" is not a directory").
+ toString());
+ }
+ if (!m_oInpDir.canRead())
+ {
+ throw new Exception(m_sb.append("Can't read directory ").append(sAtt).
+ toString());
+ }
+
+ sAtt = m_oChParms.getAttr(PARM_SUFFIX);
+ if (null == sAtt)
+ {
+ throw new Exception(m_sb.append("Missing ").append(PARM_SUFFIX)
+ .append(" attribute in -parameters ")
+ .append(sUid).toString());
+ }
+
+ m_oFFilt = new FileEndsWith(sAtt);
+
+ do
+ {
+ sAtt = p_oP.getAttr(PARM_FILE_PROCESSOR_CLASS);
+ m_oExecClass = null;
+ if (null == sAtt)
+ {
+ throw new Exception(m_sb.append("Missing actionClass attribute").
+ toString());
+ }
+ try
+ {
+ m_oExecClass = Class.forName(sAtt);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new Exception(m_sb.append("Class ").append(sAtt)
+ .append(" not found in classpath").toString());
+ }
+ try
+ {
+ m_oExecClass.getConstructor(new Class[] {DomElement.class});
+ }
+ catch (NoSuchMethodException eN)
+ {
+ throw new Exception(m_sb.append("No appropriate constructor")
+ .append(" (DomElement) found for class").toString());
+ }
+ }
+ while (false);
+ } //________________________________
+
+ private class FileEndsWith implements FileFilter
+ {
+ String m_sSuffix;
+ FileEndsWith(String p_sEnd) throws Exception
+ {
+ m_sSuffix = p_sEnd;
+ if (null == m_sSuffix)
+ {
+ throw new Exception("Must specify file extension");
+ }
+ } //_________________________________________
+
+ public boolean accept(File p_f)
+ {
+ if (!p_f.isFile())
+ {
+ return false;
+ }
+ return p_f.toString().endsWith(m_sSuffix);
+ } //_________________________________________
+ } //___________________________________________________
+ } //______________________________________________________
+
+ private static class ChildProcess extends Observable implements Runnable
+ { private Class m_oExecClass;
+ private DomElement m_oParms;
+ private Logger m_oLogger;
+ public ChildProcess(Class p_oExec, Observer p_oObs, DomElement p_oP)
+ { m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
+ m_oExecClass = p_oExec;
+ this.addObserver(p_oObs);
+ m_oParms = p_oP;
+ setChanged();
+ notifyObservers(new Integer(1));
+ } //__________________________________
+
+ public void run()
+ { try
+ { Constructor oCnst = m_oExecClass.getConstructor(new Class[] {DomElement.class});
+ Object oProc = oCnst.newInstance(new Object[] {m_oParms});
+ ((EsbFileProcessor)oProc).execute();
+ }
+ catch (Exception e) { m_oLogger.error("run() FAILED",e); }
+
+ setChanged();
+ notifyObservers(new Integer(-1));
+ } //__________________________________
+ } //____________________________________________________________________________
+} //____________________________________________________________________________
Deleted: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OneChildProcess.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OneChildProcess.java 2006-07-03 16:58:38 UTC (rev 4902)
+++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/OneChildProcess.java 2006-07-03 20:15:11 UTC (rev 4903)
@@ -1,59 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-
-package org.jboss.soa.esb.listeners;
-
-import java.util.*;
-import java.lang.reflect.*;
-import org.apache.log4j.*;
-
-import org.jboss.soa.esb.helpers.*;
-import org.jboss.soa.esb.processors.*;
-import org.jboss.soa.esb.util.EsbUtil;
-
-
-public class OneChildProcess extends Observable implements Runnable
-{ private Class m_oExecClass;
- private DomElement m_oParms;
- private Logger m_oLogger;
- public OneChildProcess(Class p_oExec, Observer p_oObs, DomElement p_oP)
- { m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
- m_oExecClass = p_oExec;
- this.addObserver(p_oObs);
- m_oParms = p_oP;
- setChanged();
- notifyObservers(new Integer(1));
- } //__________________________________
-
- public void run()
- { try
- { Constructor oCnst = m_oExecClass.getConstructor(new Class[] {DomElement.class});
- Object oProc = oCnst.newInstance(new Object[] {m_oParms});
- ((EsbFileProcessor)oProc).execute();
- }
- catch (Exception e) { m_oLogger.error("run() FAILED",e); }
-
- setChanged();
- notifyObservers(new Integer(-1));
- } //__________________________________
-} //____________________________________________________________________________
|
Author: tho...@jb...
Date: 2006-07-03 13:31:58 -0400 (Mon, 03 Jul 2006)
New Revision: 545
Added:
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java
Modified:
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java
trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
Log:
Add support for @RequestWrapper, @ResponseWrapper
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -48,6 +48,8 @@
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import javax.xml.rpc.holders.Holder;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.addressing.AddressingProperties;
import org.jboss.logging.Logger;
@@ -289,30 +291,70 @@
{
xmlName = opMetaData.getXmlName();
xmlType = opMetaData.getXmlName();
- String epName = epMetaData.getQName().getLocalPart();
- if (epName.endsWith("Port"))
- epName = epName.substring(0, epName.lastIndexOf("Port"));
- wrappedParameter = new ParameterMetaData(opMetaData, xmlName, xmlType, null);
+ String requestWrapperType = null;
+ if (method.isAnnotationPresent(RequestWrapper.class))
+ {
+ RequestWrapper anReqWrapper = method.getAnnotation(RequestWrapper.class);
+
+ String localName = (anReqWrapper.localName().length() > 0 ? anReqWrapper.localName() : operationName);
+ String targetNamespace = (anReqWrapper.targetNamespace().length() > 0 ? anReqWrapper.targetNamespace() : epMetaData.getQName().getNamespaceURI());
+ xmlName = new QName(targetNamespace, localName);
+
+ if (anReqWrapper.className().length() > 0)
+ {
+ requestWrapperType = anReqWrapper.className();
+
+ TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, requestWrapperType);
+ typesMetaData.addTypeMapping(tmMetaData);
+ }
+ }
+
+ wrappedParameter = new ParameterMetaData(opMetaData, xmlName, xmlType, requestWrapperType);
wrappedElementNames = new ArrayList<QName>(parameterTypes.length);
wrappedVariables = new ArrayList<String>(parameterTypes.length);
wrappedTypes = new ArrayList<String>(parameterTypes.length);
wrappedParameter.setWrappedElementNames(wrappedElementNames);
wrappedParameter.setWrappedVariables(wrappedVariables);
wrappedParameter.setWrappedTypes(wrappedTypes);
-
opMetaData.addParameter(wrappedParameter);
+ // Generate temporary wrapper types so that tools can generate the correct wsdl
+ if (requestWrapperType == null)
+ ParameterWrapping.generateWrapper(wrappedParameter, false);
+
if (!opMetaData.isOneWayOperation())
{
xmlName = new QName(targetNS, operationName + "Response");
xmlType = new QName(targetNS, operationName + "Response");
- ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, null);
+ String responseWrapperType = null;
+ if (method.isAnnotationPresent(ResponseWrapper.class))
+ {
+ ResponseWrapper anResWrapper = method.getAnnotation(ResponseWrapper.class);
+
+ String localName = (anResWrapper.localName().length() > 0 ? anResWrapper.localName() : operationName + "Response");
+ String targetNamespace = (anResWrapper.targetNamespace().length() > 0 ? anResWrapper.targetNamespace() : epMetaData.getQName().getNamespaceURI());
+ xmlName = new QName(targetNamespace, localName);
+
+ if (anResWrapper.className().length() > 0)
+ {
+ responseWrapperType = anResWrapper.className();
+
+ TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, responseWrapperType);
+ typesMetaData.addTypeMapping(tmMetaData);
+ }
+ }
+
+ ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, responseWrapperType);
retMetaData.setWrappedVariables(new ArrayList<String>(1));
retMetaData.setWrappedElementNames(new ArrayList<QName>(1));
retMetaData.setWrappedTypes(new ArrayList<String>(1));
opMetaData.setReturnParameter(retMetaData);
+
+ // Generate temporary wrapper types so that tools can generate the correct wsdl
+ if (responseWrapperType == null)
+ ParameterWrapping.generateWrapper(retMetaData, false);
}
}
@@ -333,9 +375,6 @@
if (xmlType == null)
xmlType = getWebParamType(opMetaData, javaType);
- TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, javaTypeName);
- typesMetaData.addTypeMapping(tmMetaData);
-
if (isWrapped)
{
QName wrappedElementName = getWebParamName(opMetaData, typeIndexes, javaType, anWebParam);
@@ -351,6 +390,9 @@
}
else
{
+ TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, javaTypeName);
+ typesMetaData.addTypeMapping(tmMetaData);
+
xmlName = getWebParamName(opMetaData, typeIndexes, javaType, anWebParam);
xmlType = typeMapping.getXMLType(javaType);
if (xmlType == null)
@@ -384,9 +426,6 @@
if (xmlType == null)
xmlType = getWebResultType(targetNS, returnType);
- TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, returnTypeName);
- typesMetaData.addTypeMapping(tmMetaData);
-
if (opMetaData.isDocumentWrapped())
{
QName elementName = getWebResultName(opMetaData, returnType, method.getAnnotation(WebResult.class));
@@ -398,20 +437,15 @@
}
else
{
+ TypeMappingMetaData tmMetaData = new TypeMappingMetaData(typesMetaData, xmlType, returnTypeName);
+ typesMetaData.addTypeMapping(tmMetaData);
+
xmlName = getWebResultName(opMetaData, returnType, method.getAnnotation(WebResult.class));
ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, returnTypeName);
opMetaData.setReturnParameter(retMetaData);
}
}
- // Generate temporary wrapper types so that tools can generate the correct wsdl
- if (opMetaData.isDocumentWrapped())
- {
- ParameterWrapping.generateWrapper(wrappedParameter, false);
- if (!opMetaData.isOneWayOperation())
- ParameterWrapping.generateWrapper(opMetaData.getReturnParameter(), false);
- }
-
// Add faults
for (Class exClass : method.getExceptionTypes())
if (!RemoteException.class.isAssignableFrom(exClass))
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -25,8 +25,11 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPMessageHandler;
import javax.jws.soap.SOAPMessageHandlers;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
import org.jboss.logging.Logger;
@@ -37,6 +40,7 @@
*
* @since 24-Nov-2005
*/
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@WebService(name = "ActionEndpoint", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionDocService.wsdl")
@SOAPMessageHandlers( { @SOAPMessageHandler(className = "org.jboss.ws.addressing.soap.SOAPServerHandler") })
public class ActionDocEndpointImpl implements ActionEndpoint
@@ -44,14 +48,18 @@
// provide logging
private static Logger log = Logger.getLogger(ActionDocEndpointImpl.class);
- @WebMethod (action = "urn:wsa-action-foo")
+ @WebMethod(action = "urn:wsa-action-foo")
+ @RequestWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_foo_RequestStruct")
+ @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_foo_ResponseStruct")
public String foo(String item)
{
log.info("foo: " + item);
return "foo:" + item;
}
- @WebMethod (action = "urn:wsa-action-bar")
+ @WebMethod(action = "urn:wsa-action-bar")
+ @RequestWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_bar_RequestStruct")
+ @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_bar_ResponseStruct")
public String bar(String item)
{
log.info("bar: " + item);
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -5,22 +5,34 @@
package org.jboss.test.ws.addressing.action;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
-public class ActionEndpoint_bar_RequestStruct {
- protected java.lang.String String_1;
-
- public ActionEndpoint_bar_RequestStruct() {
- }
-
- public ActionEndpoint_bar_RequestStruct(java.lang.String String_1) {
- this.String_1 = String_1;
- }
-
- public java.lang.String getString_1() {
- return String_1;
- }
-
- public void setString_1(java.lang.String String_1) {
- this.String_1 = String_1;
- }
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "bar", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "String_1" })
+public class ActionEndpoint_bar_RequestStruct
+{
+ @XmlElement(required = true)
+ protected String String_1;
+
+ public ActionEndpoint_bar_RequestStruct()
+ {
+ }
+
+ public ActionEndpoint_bar_RequestStruct(String String_1)
+ {
+ this.String_1 = String_1;
+ }
+
+ public String getString_1()
+ {
+ return String_1;
+ }
+
+ public void setString_1(String String_1)
+ {
+ this.String_1 = String_1;
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -5,22 +5,34 @@
package org.jboss.test.ws.addressing.action;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
-public class ActionEndpoint_bar_ResponseStruct {
- protected java.lang.String result;
-
- public ActionEndpoint_bar_ResponseStruct() {
- }
-
- public ActionEndpoint_bar_ResponseStruct(java.lang.String result) {
- this.result = result;
- }
-
- public java.lang.String getResult() {
- return result;
- }
-
- public void setResult(java.lang.String result) {
- this.result = result;
- }
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "barResponse", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "result" })
+public class ActionEndpoint_bar_ResponseStruct
+{
+ @XmlElement(required = true)
+ protected String result;
+
+ public ActionEndpoint_bar_ResponseStruct()
+ {
+ }
+
+ public ActionEndpoint_bar_ResponseStruct(String result)
+ {
+ this.result = result;
+ }
+
+ public String getResult()
+ {
+ return result;
+ }
+
+ public void setResult(String result)
+ {
+ this.result = result;
+ }
}
Added: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -0,0 +1,38 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.2_01, build R40)
+// Generated source version: 1.1.2
+
+package org.jboss.test.ws.addressing.action;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "foo", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "String_1" })
+public class ActionEndpoint_foo_RequestStruct
+{
+ @XmlElement(required = true)
+ protected String String_1;
+
+ public ActionEndpoint_foo_RequestStruct()
+ {
+ }
+
+ public ActionEndpoint_foo_RequestStruct(String String_1)
+ {
+ this.String_1 = String_1;
+ }
+
+ public String getString_1()
+ {
+ return String_1;
+ }
+
+ public void setString_1(String String_1)
+ {
+ this.String_1 = String_1;
+ }
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -0,0 +1,38 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.2_01, build R40)
+// Generated source version: 1.1.2
+
+package org.jboss.test.ws.addressing.action;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "fooResponse", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "result" })
+public class ActionEndpoint_foo_ResponseStruct
+{
+ @XmlElement(required = true)
+ protected String result;
+
+ public ActionEndpoint_foo_ResponseStruct()
+ {
+ }
+
+ public ActionEndpoint_foo_ResponseStruct(String result)
+ {
+ this.result = result;
+ }
+
+ public String getResult()
+ {
+ return result;
+ }
+
+ public void setResult(String result)
+ {
+ this.result = result;
+ }
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -61,15 +61,15 @@
}
}
+ public void testRpcEndpoint() throws Exception
+ {
+ assertEquals("bar:HelloBar", rpcEndpoint.bar("HelloBar"));
+ assertEquals("bar:HelloFoo", rpcEndpoint.foo("HelloFoo"));
+ }
+
public void testDocEndpoint() throws Exception
{
+ assertEquals("bar:HelloBar", docEndpoint.bar("HelloBar"));
assertEquals("bar:HelloFoo", docEndpoint.foo("HelloFoo"));
- assertEquals("bar:HelloBar", docEndpoint.bar("HelloBar"));
}
-
- public void testRpcEndpoint() throws Exception
- {
- assertEquals("bar:HelloFoo", rpcEndpoint.foo("HelloFoo"));
- assertEquals("bar:HelloBar", rpcEndpoint.bar("HelloBar"));
- }
}
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java 2006-07-03 17:31:58 UTC (rev 545)
@@ -24,7 +24,6 @@
import java.net.URISyntaxException;
import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.MessageContext;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
Modified: trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml 2006-07-03 17:31:58 UTC (rev 545)
@@ -9,7 +9,6 @@
<package-type>org.jboss.test.ws.addressing.action</package-type>
<namespaceURI>http://org.jboss.ws/addressing/action</namespaceURI>
</package-mapping>
- <!--
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_foo_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:fooResponse</root-type-qname>
@@ -19,7 +18,6 @@
<xml-element-name>result</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
- -->
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_bar_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:barResponse</root-type-qname>
@@ -29,7 +27,6 @@
<xml-element-name>result</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
- <!--
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_foo_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:foo</root-type-qname>
@@ -39,7 +36,6 @@
<xml-element-name>String_1</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
- -->
<java-xml-type-mapping>
<java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_bar_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:bar</root-type-qname>
Modified: trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl 2006-07-03 15:33:33 UTC (rev 544)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl 2006-07-03 17:31:58 UTC (rev 545)
@@ -16,7 +16,6 @@
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
- <!--
<complexType name="foo">
<sequence>
<element name="String_1" type="string" nillable="true"/>
@@ -27,7 +26,6 @@
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
- -->
<element name="bar" type="tns:bar"/>
<element name="barResponse" type="tns:barResponse"/>
<element name="foo" type="tns:bar"/>
|
|
From: <jbo...@li...> - 2006-07-03 16:58:45
|
Author: unibrew
Date: 2006-07-03 12:58:38 -0400 (Mon, 03 Jul 2006)
New Revision: 4902
Modified:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
Log:
[JBFORUMS-89] and [JBFORUMS-94] Refresh issue for deleting, locking and unlocking actions solved. Flow updates and finishing moderator's actions integration into TopicView.
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-07-03 16:58:38 UTC (rev 4902)
@@ -225,8 +225,6 @@
message = bundle.getString("SUCC_TOPIC_MOVED");
FacesContext.getCurrentInstance().addMessage("message",
new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(this.forum.getId());
- checkboxes=new HashMap();
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -267,10 +265,7 @@
}
message = bundle.getString("SUCC_TOPIC_LOCKED");
FacesContext.getCurrentInstance().addMessage("message",
- new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(forum.getId());
-
- checkboxes=new HashMap();
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -319,9 +314,7 @@
}
message = bundle.getString("SUCC_TOPIC_UNLOCKED");
FacesContext.getCurrentInstance().addMessage("message",
- new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(forum.getId());
- checkboxes=new HashMap();
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -428,7 +421,7 @@
}
private void execute() throws Exception
- {
+ {
if (this.bundle == null) {
// Getting ResourceBundle with current Locale
FacesContext ctx = FacesContext.getCurrentInstance();
@@ -450,7 +443,7 @@
// trying to get forumId from request parameter
int forumId = -1;
String f = ForumUtil.getParameter(Constants.p_forumId);
-
+
if(f!=null && f.trim().length()>0)
{
forumId = Integer.parseInt(f);
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -82,6 +82,10 @@
<key>moderator</key>
<value>/views/moderator/modcp_body.jsf</value>
</map-entry>
+ <map-entry>
+ <key>topicSplit</key>
+ <value>/views/moderator/modcp_split.jsf</value>
+ </map-entry>
</map-entries>
</managed-property>
</managed-bean>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -652,8 +652,10 @@
<forums:isAllowed fragment="acl://votePoll">
You <b>cannot</b> vote in polls in this forum <br/>
</forums:isAllowed>
- <!-- TODO: insert security check to make sure "moderator access" is allowed on "this forum" -->
+ <!-- TODO: insert link to moderator control panel if user is allowed to moderate this forum -->
+ <forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">
You <b>cannot</b> moderate this forum <b/>
+ </forums:isAllowed>
</span>
<ui:include src="/views/jumpbox.xhtml"/>
</span>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -42,6 +42,7 @@
<tr>
<td class="row1" align="center">
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<span class="gen"><br/>
${resource.Topic_delete_confirm}
<br/><br/>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -35,6 +35,7 @@
<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
<h:messages layout="table" infoStyle="color:green" warnStyle="color:red"/>
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left">
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -33,6 +33,7 @@
<ui:define name="mainContent">
<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<table width="100%" cellspacing="2" cellpadding="2" border="0"
align="center">
<tr>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -762,15 +762,18 @@
<h:commandLink action="#{moderator.unlockTopic}" style="text-decoration: none;">
<f:param name="t" value="#{topic.topic.id}"/>
<f:verbatim>
- <img border="0" src="/portal-forums/subSilver/images/topic_unlock.gif" alt="Lock this topic" title="Lock this topic"/>
+ <img border="0" src="/portal-forums/subSilver/images/topic_unlock.gif" alt="Unlock this topic" title="Unlock this topic"/>
</f:verbatim>
</h:commandLink>
&nbsp;
</c:otherwise>
</c:choose>
- <a href="" style="text-decoration: none;">
+ <h:outputLink value="#{forums:outputLink(shared.links['topicSplit'],true)}" style="text-decoration: none;">
+ <f:param name="t" value="#{topic.topic.id}"/>
+ <f:verbatim>
<img border="0" src="/portal-forums/subSilver/images/topic_split.gif" alt="Split this topic" title="Split this topic"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:outputLink>&nbsp;
</td>
</tr>
</c:if>
|
|
From: <jbo...@li...> - 2006-07-03 14:30:21
|
Author: mar...@jb...
Date: 2006-07-03 10:29:57 -0400 (Mon, 03 Jul 2006)
New Revision: 4901
Added:
labs/jbossesb/branches/JBESB-51/Build.txt
labs/jbossesb/branches/JBESB-51/product.properties
Removed:
labs/jbossesb/branches/JBESB-51/ESBCore/services/buildOne.xml
Modified:
labs/jbossesb/branches/JBESB-51/ESBCore/build.xml
labs/jbossesb/branches/JBESB-51/ESBCore/common/build.xml
labs/jbossesb/branches/JBESB-51/ESBCore/listeners/build.xml
labs/jbossesb/branches/JBESB-51/ESBCore/processors/build.xml
labs/jbossesb/branches/JBESB-51/ESBCore/services/build.xml
labs/jbossesb/branches/JBESB-51/Readme.txt
labs/jbossesb/branches/JBESB-51/build.xml
Log:
New build structure.
Added: labs/jbossesb/branches/JBESB-51/Build.txt
===================================================================
--- labs/jbossesb/branches/JBESB-51/Build.txt 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/Build.txt 2006-07-03 14:29:57 UTC (rev 4901)
@@ -0,0 +1,5 @@
+Use the root build.xml in conjuntion with product.properties, where various properties used
+in the build can be set for convenience. The lib/ext directory contains the most recently tested
+libs needed to build the system. You are free to use these, or your own versions of the jars
+from a JBossAS 4.0.3SP1 installation. If the latter, then set org.jboss.esb.frominstall to true
+and org.jboss.esb.jboss.home to the root of your JBossAS installation.
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB-51/ESBCore/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -4,15 +4,15 @@
<!-- build.xml - Builds all subprojects in child directories -->
<!-- =================================================================== -->
-<project name="JbossEsb" default="compile" basedir=".">
+<project name="JbossEsb" default="org.jboss.esb.core.compile" basedir=".">
- <property name="name.jar" value="name.jar-NOT_SET.jar"/>
+ <property name="org.jboss.esb.core.name.jar" value="name.jar-NOT_SET.jar"/>
<property environment="env"/>
<!-- =================================================================== -->
<!-- Initialize -->
<!-- =================================================================== -->
- <target name="init">
+ <target name="org.jboss.esb.core.init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
@@ -21,36 +21,32 @@
<!-- =================================================================== -->
<!-- Prepares the directory structure -->
<!-- =================================================================== -->
- <target name="prepare" depends="init">
- <mkdir dir="dist"/>
- <mkdir dir="lib"/>
+ <target name="org.jboss.esb.core.prepare" depends="org.jboss.esb.core.init">
+ <mkdir dir="${org.jboss.esb.internal.dest}/dist"/>
+ <mkdir dir="${org.jboss.esb.internal.dest}/lib"/>
</target>
<!-- =================================================================== -->
<!-- Compiles all the classes -->
<!-- =================================================================== -->
- <target name="compile" depends="prepare" description="Compile subprojects">
- <subant target="compile">
- <property name="name.jar" value="${name.jar}"/>
- <fileset file="common/build.xml"/>
- <fileset file="services/build.xml"/>
- <fileset file="processors/build.xml"/>
- <fileset file="listeners/build.xml"/>
- </subant>
+ <target name="org.jboss.esb.core.compile" depends="org.jboss.esb.core.prepare" description="Compile subprojects">
+ <echo message="Compiling submodules"/>
+ <ant dir="common"/>
+ <ant dir="services"/>
+ <ant dir="processors"/>
+ <ant dir="listeners"/>
</target>
<!-- =================================================================== -->
<!-- Assemble jars -->
<!-- =================================================================== -->
- <target name="jar" depends="compile" description="arma los jars">
- <subant target="jar">
- <!-- Always services as last jar -->
- <fileset dir="." includes="*/build.xml"
- excludes="EsbServices/*"
- />
- <fileset file="EsbServices/build.xml"/>
- </subant>
+ <target name="jar" depends="org.jboss.esb.core.compile" description="arma los jars">
+ <echo message="Building jar"/>
+ <ant dir="common" target="jar"/>
+ <ant dir="listeners" target="jar"/>
+ <ant dir="processors" target="jar"/>
+ <ant dir="services" target="jar"/>
<antcall target="-ear"/>
</target>
@@ -58,7 +54,7 @@
<ear destfile="dist/JbossEsbAppl.ear"
appxml="EsbServices/src/META-INF/application.xml"
>
- <fileset dir="dist"
+ <fileset dir="../${org.jboss.esb.internal.dest}/dist"
includes="*.jar"
/>
</ear>
@@ -68,17 +64,21 @@
<!-- =================================================================== -->
<!-- Clean all -->
<!-- =================================================================== -->
- <target name="clean" description="Clean dist directory, and cleans subprojects">
- <subant target="clean">
- <fileset dir="." includes="*/build.xml" />
- </subant>
- <delete dir="dist" />
+ <target name="clean" description="Clean dist directory and cleans subprojects">
+ <ant dir="common" target="clean"/>
+ <ant dir="listeners" target="clean"/>
+ <ant dir="processors" target="clean"/>
+ <ant dir="services" target="clean"/>
</target>
+
+ <target name="purge" depends="clean">
+ <delete dir="../${org.jboss.esb.internal.dest}/dist"/>
+ </target>
<!-- =================================================================== -->
<!-- Rebuild everything from scratch -->
<!-- =================================================================== -->
<target name="all" depends="clean,jar" />
- <target name="recompile" depends="clean,compile" />
+ <target name="recompile" depends="clean,org.jboss.esb.core.compile" />
</project>
Modified: labs/jbossesb/branches/JBESB-51/ESBCore/common/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/common/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/common/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1,53 +1,61 @@
<?xml version="1.0"?>
-<project name="BuildJbossEsbCommon" default="compile" basedir=".">
+<project name="BuildJbossEsbCommon" default="org.jboss.esb.common.compile" basedir=".">
- <property name="jar.name" value="jbossesb-common"/>
- <property name="distrib.dir" value="../dist"/>
- <property name="bin.dir" value="${basedir}/bin"/>
- <property name="src.dir" value="${basedir}/src"/>
- <property name="root.dir" value="../.."/>
+ <property name="org.jboss.esb.common.jar.name" value="jbossesb-common"/>
+ <property name="org.jboss.esb.common.distrib.dir" value="${org.jboss.esb.internal.dest}/dist"/>
+ <property name="org.jboss.esb.common.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.common.src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.root.dir" value="../.."/>
<property environment="env"/>
- <path id="base.class.path">
- <fileset dir="${root.dir}/lib/ext" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <path id="org.jboss.esb.common.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
</path>
- <target name="init">
+ <target name="org.jboss.esb.common.init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
</target>
- <target name="prepare" depends="init">
- <mkdir dir="${bin.dir}"/>
- <mkdir dir="${distrib.dir}"/>
+ <target name="org.jboss.esb.common.prepare" depends="org.jboss.esb.common.init">
+ <mkdir dir="${org.jboss.esb.common.bin.dir}"/>
+ <mkdir dir="${org.jboss.esb.common.distrib.dir}"/>
</target>
<target name="clean" description="Remove bin directory">
- <delete dir="${bin.dir}"/>
</target>
- <target name="compile" depends="prepare"
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.common.bin.dir}"/>
+ </target>
+
+ <target name="org.jboss.esb.common.compile" depends="org.jboss.esb.common.prepare"
description="Compile all classes">
<javac
- destdir="${bin.dir}"
- classpathref="base.class.path"
+ destdir="${org.jboss.esb.common.bin.dir}"
+ classpathref="org.jboss.esb.common.base.classpath"
debug="on"
optimize="off"
>
- <src path="${src.dir}"/>
+ <src path="${org.jboss.esb.common.src.dir}"/>
</javac>
</target>
- <target name="recompile" depends="clean,compile"
+ <target name="recompile" depends="clean,org.jboss.esb.common.compile"
description="Clean and compile"/>
- <target name="jar" depends="compile" description="Assemble jar files">
- <delete file="${distrib.dir}/${jar.name}.jar" />
- <jar destfile="${distrib.dir}/${jar.name}.jar"
- basedir="${bin.dir}"
+ <target name="jar" depends="org.jboss.esb.common.compile" description="Assemble jar files">
+ <delete file="${org.jboss.esb.common.distrib.dir}/${org.jboss.esb.common.jar.name}.jar" />
+ <jar destfile="${org.jboss.esb.common.distrib.dir}/${org.jboss.esb.common.jar.name}.jar"
+ basedir="${org.jboss.esb.common.bin.dir}"
includes="**/*.class"
excludes="test/**"
/>
Modified: labs/jbossesb/branches/JBESB-51/ESBCore/listeners/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/listeners/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/listeners/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1,60 +1,66 @@
<?xml version="1.0"?>
-<project name="BuildJbossEsbListeners" default="compile" basedir=".">
+<project name="BuildJbossEsbListeners" default="org.jboss.esb.listeners.compile" basedir=".">
- <property name="jar.name" value="jbossesb-listeners"/>
- <property name="distrib.dir" value="../dist"/>
- <property name="bin.dir" value="${basedir}/bin"/>
- <property name="src.dir" value="${basedir}/src"/>
- <property name="root.dir" value="../.."/>
+ <property name="org.jboss.esb.listeners.jar.name" value="jbossesb-listeners"/>
+ <property name="org.jboss.esb.listeners.distrib.dir" value="${org.jboss.esb.internal.dest}/dist"/>
+ <property name="org.jboss.esb.listeners.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.listeners.src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.root.dir" value="../.."/>
<property environment="env"/>
- <path id="base.class.path">
- <fileset dir="${root.dir}/lib/ext" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <path id="org.jboss.esb.listeners.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
</path>
<path id="default.class.path">
- <path refid="base.class.path"/>
- <pathelement location="../common/bin"/>
- <pathelement location="../services/bin"/>
- <pathelement location="../processors/bin"/>
+ <path refid="org.jboss.esb.listeners.base.classpath"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/classes"/>
</path>
- <target name="init">
+ <target name="org.jboss.esb.listeners.init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
</target>
- <target name="prepare" depends="init">
- <mkdir dir="${bin.dir}"/>
- <mkdir dir="${distrib.dir}"/>
+ <target name="org.jboss.esb.listeners.prepare" depends="org.jboss.esb.listeners.init">
+ <mkdir dir="${org.jboss.esb.listeners.bin.dir}"/>
+ <mkdir dir="${org.jboss.esb.listeners.distrib.dir}"/>
</target>
<target name="clean" description="Remove bin directory">
- <delete dir="${bin.dir}"/>
</target>
+
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.listeners.bin.dir}"/>
+ </target>
- <target name="compile" depends="prepare"
+ <target name="org.jboss.esb.listeners.compile" depends="org.jboss.esb.listeners.prepare"
description="Compile all classes">
<javac
- destdir="${bin.dir}"
+ destdir="${org.jboss.esb.listeners.bin.dir}"
classpathref="default.class.path"
debug="on"
optimize="off"
>
- <src path="${src.dir}"/>
+ <src path="${org.jboss.esb.listeners.src.dir}"/>
</javac>
</target>
- <target name="recompile" depends="clean,compile"
+ <target name="recompile" depends="clean,org.jboss.esb.listeners.compile"
description="Clean and compile"/>
- <target name="jar" depends="compile" description="Assemble jar files">
- <delete file="${distrib.dir}/${jar.name}.jar" />
- <jar destfile="${distrib.dir}/${jar.name}.jar"
- basedir="${bin.dir}"
+ <target name="jar" depends="org.jboss.esb.listeners.compile" description="Assemble jar files">
+ <delete file="${org.jboss.esb.listeners.distrib.dir}/${org.jboss.esb.listeners.jar.name}.jar" />
+ <jar destfile="${org.jboss.esb.listeners.distrib.dir}/${org.jboss.esb.listeners.jar.name}.jar"
+ basedir="${org.jboss.esb.listeners.bin.dir}"
includes="**/*.class"
excludes="test/**"
/>
Modified: labs/jbossesb/branches/JBESB-51/ESBCore/processors/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/processors/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/processors/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1,59 +1,66 @@
<?xml version="1.0"?>
-<project name="BuildJbossEsbProcessors" default="compile" basedir=".">
+<project name="BuildJbossEsbProcessors" default="org.jboss.esb.processors.compile" basedir=".">
- <property name="jar.name" value="jbossesb-processors"/>
- <property name="distrib.dir" value="../dist"/>
- <property name="bin.dir" value="${basedir}/bin"/>
- <property name="src.dir" value="${basedir}/src"/>
- <property name="root.dir" value="../.."/>
+ <property name="org.jboss.esb.processors.jar.name" value="jbossesb-processors"/>
+ <property name="org.jboss.esb.processors.distrib.dir" value="${org.jboss.esb.internal.dest}/dist"/>
+ <property name="org.jboss.esb.processors.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.processors.src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.root.dir" value="../.."/>
<property environment="env"/>
- <path id="base.class.path">
- <fileset dir="${root.dir}/lib/ext" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <path id="org.jboss.esb.processors.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
</path>
<path id="default.class.path">
- <path refid="base.class.path"/>
- <pathelement location="../common/bin"/>
- <pathelement location="../services/bin"/>
+ <path refid="org.jboss.esb.processors.base.classpath"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/classes"/>
</path>
- <target name="init">
+ <target name="org.jboss.esb.processors.init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
</target>
- <target name="prepare" depends="init">
- <mkdir dir="${bin.dir}"/>
- <mkdir dir="${distrib.dir}"/>
+ <target name="org.jboss.esb.processors.prepare" depends="org.jboss.esb.processors.init">
+ <mkdir dir="${org.jboss.esb.processors.bin.dir}"/>
+ <mkdir dir="${org.jboss.esb.processors.distrib.dir}"/>
</target>
<target name="clean" description="Remove bin directory">
- <delete dir="${bin.dir}"/>
</target>
+
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.processors.bin.dir}"/>
+ </target>
- <target name="compile" depends="prepare"
+ <target name="org.jboss.esb.processors.compile" depends="org.jboss.esb.processors.prepare"
description="Compile all classes">
<javac
- destdir="${bin.dir}"
+ destdir="${org.jboss.esb.processors.bin.dir}"
classpathref="default.class.path"
debug="on"
optimize="off"
>
- <src path="${src.dir}"/>
+ <src path="${org.jboss.esb.processors.src.dir}"/>
</javac>
</target>
- <target name="recompile" depends="clean,compile"
+ <target name="recompile" depends="clean,org.jboss.esb.processors.compile"
description="Clean and compile"/>
- <target name="jar" depends="compile" description="Assemble jar files">
- <delete file="${distrib.dir}/${jar.name}.jar" />
- <jar destfile="${distrib.dir}/${jar.name}.jar"
- basedir="${bin.dir}"
+ <target name="jar" depends="org.jboss.esb.processors.compile" description="Assemble jar files">
+ <delete file="${org.jboss.esb.processors.distrib.dir}/${org.jboss.esb.processors.jar.name}.jar" />
+ <jar destfile="${org.jboss.esb.processors.distrib.dir}/${org.jboss.esb.processors.jar.name}.jar"
+ basedir="${org.jboss.esb.processors.bin.dir}"
includes="**/*.class"
excludes="test/**"
/>
Modified: labs/jbossesb/branches/JBESB-51/ESBCore/services/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/services/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/services/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1,15 +1,97 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="JbossEsbServices" default="compile" basedir=".">
+<project name="JbossEsbServices" default="org.jboss.esb.services.compile" basedir=".">
- <property name="name.jar" value="${ant.project.name}.jar"/>
- <property name="appl.dir" value=".."/>
- <property name="metainf.dir" value="src/META-INF"/>
+ <property name="org.jboss.esb.services.name.jar" value="${ant.project.name}.jar"/>
+ <property name="org.jboss.esb.services.appl.dir" value="../.."/>
+ <property name="org.jboss.esb.services.metainf.dir" value="src/META-INF"/>
- <import file="buildOne.xml"/>
+ <property name="org.jboss.esb.services.classes.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.services.src.dir" value="${basedir}/src"/>
+ <property name="root.dir" value="../.."/>
+ <property environment="env"/>
- <path id="default.class.path">
- <path refid="base.class.path"/>
+ <property name="org.jboss.esb.ext.serverlib.dir" value="${root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.serverlib.dir" value="{org.jboss.esb.jboss.home}/server/all/lib">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <property name="org.jboss.esb.ext.lib.dir" value="${root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/lib">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <!-- =================================================================== -->
+ <!-- Define the class path -->
+ <!-- =================================================================== -->
+ <path id="org.jboss.esb.services.base.classpath">
+ <fileset dir="${org.jboss.esb.services.appl.dir}/lib" includes="*.jar,*.zip"/>
+ <fileset dir="${org.jboss.esb.ext.serverlib.dir}"
+ includes="*.jar,*.zip"
+ />
+ <fileset dir="${org.jboss.esb.ext.lib.dir}"
+ includes="jboss-jmx.jar"
+ />
+ </path>
+
+ <!-- =================================================================== -->
+ <!-- Initialize -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.init">
+ <tstamp>
+ <format property="TODAY" pattern="d-MM-yy"/>
+ </tstamp>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Prepares the directory structure -->
+ <!-- =================================================================== -->
+ <target name="org.jboss.esb.services.prepare" depends="org.jboss.esb.services.init">
+ <mkdir dir="${org.jboss.esb.services.classes.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles all the classes -->
+ <!-- =================================================================== -->
+
+ <target name="org.jboss.esb.services.compile" depends="org.jboss.esb.services.prepare"
+ description="Compile all classes">
+
+ <javac
+ destdir="${org.jboss.esb.services.classes.dir}"
+ classpathref="org.jboss.esb.services.default.classpath"
+ debug="on"
+ optimize="off"
+ >
+ <src path="${org.jboss.esb.services.src.dir}"/>
+ </javac>
+
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Recompiles all the classes -->
+ <!-- =================================================================== -->
+
+ <target name="recompile" depends="clean,org.jboss.esb.services.compile"
+ description="Clean and compile"/>
+
+ <!-- =================================================================== -->
+ <!-- Clean -->
+ <!-- =================================================================== -->
+ <target name="clean" description="Remove clases directory">
+ </target>
+
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.services.classes.dir}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Rebuild everything from scratch -->
+ <!-- =================================================================== -->
+ <target name="all" depends="recompile,jar" />
+
+ <path id="org.jboss.esb.services.default.classpath">
+ <path refid="org.jboss.esb.services.base.classpath"/>
<pathelement location="../common/bin"/>
</path>
@@ -17,13 +99,13 @@
<fileset dir="${env.XDOCLET_HOME}/lib">
<include name="*.jar"/>
</fileset>
- <path refid="default.class.path"/>
+ <path refid="org.jboss.esb.services.default.classpath"/>
</path>
<!-- =================================================================== -->
<!-- Initialise xdoclet tasks -->
<!-- =================================================================== -->
- <target name="initXdoclet">
+ <target name="org.jboss.esb.services.initXdoclet">
<taskdef
name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
@@ -35,7 +117,7 @@
<!-- =================================================================== -->
<!-- Initialise -->
<!-- =================================================================== -->
- <target name="ejbdoclet" depends="initXdoclet">
+ <target name="ejbdoclet" depends="org.jboss.esb.services.initXdoclet">
<echo>+---------------------------------------------------+</echo>
<echo>| |</echo>
@@ -63,7 +145,7 @@
</fileset>
<deploymentdescriptor
- destdir="${metainf.dir}"
+ destdir="${org.jboss.esb.services.metainf.dir}"
validatexml="true"
mergedir="fake-to-debug"
description="Jboss ESB"
@@ -73,7 +155,7 @@
<jboss
version="3.2"
xmlencoding="iso-8859-1"
- destdir="${metainf.dir}"
+ destdir="${org.jboss.esb.services.metainf.dir}"
validatexml="true"
/>
@@ -84,19 +166,19 @@
<!-- Jar -->
<!-- =================================================================== -->
<target name="jar" description="Assemble jar files"
- depends="compile,ejbdoclet"
+ depends="org.jboss.esb.services.compile,ejbdoclet"
>
- <jar destfile="../dist/JbossEsbServicesClient.jar"
- basedir="bin"
+ <jar destfile="../${org.jboss.esb.internal.dest}/dist/JbossEsbServicesClient.jar"
+ basedir="../${org.jboss.esb.internal.dest}/bin"
includes="**/*.class"
excludes="**/EJBs/*Bean*"
/>
- <jar destfile="../dist/JbossEsbServices.jar"
- basedir="bin"
+ <jar destfile="../${org.jboss.esb.internal.dest}/dist/JbossEsbServices.jar"
+ basedir="../${org.jboss.esb.internal.dest}/bin"
includes="**/EJBs/*.class,**/dbtables/*.class,**/crypto/*.class"
- manifest="${metainf.dir}/manifest.server"
+ manifest="${org.jboss.esb.services.metainf.dir}/manifest.server"
>
- <metainf dir="${metainf.dir}" includes="*.xml"
+ <metainf dir="${org.jboss.esb.services.metainf.dir}" includes="*.xml"
excludes="application.xml"
/>
</jar>
@@ -106,10 +188,10 @@
<target name="-ear">
- <ear destfile="../dist/JbossEsbAppl.ear"
- appxml="${metainf.dir}/application.xml"
+ <ear destfile="../${org.jboss.esb.internal.dest}/dist/JbossEsbAppl.ear"
+ appxml="${org.jboss.esb.services.metainf.dir}/application.xml"
>
- <fileset dir="../dist"
+ <fileset dir="../${org.jboss.esb.internal.dest}/dist"
includes="jbossesb-common.jar
,CQ3ServicesClient.jar
,CQ3Services.jar
Deleted: labs/jbossesb/branches/JBESB-51/ESBCore/services/buildOne.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/ESBCore/services/buildOne.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/ESBCore/services/buildOne.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- =================================================================== -->
<!-- buildOne.xml - Invoked from child directories -->
<!-- =================================================================== -->
<project name="JbossEsb-module" default="compile" basedir=".">
<property name="classes.dir" value="${basedir}/bin"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="root.dir" value="../.."/>
<property environment="env"/>
<!-- =================================================================== -->
<!-- Define the class path -->
<!-- =================================================================== -->
<path id="base.class.path">
<fileset dir="${appl.dir}/lib" includes="*.jar,*.zip"/>
<fileset dir="${root.dir}/lib/ext"
includes="*.jar,*.zip"
/>
<fileset dir="${root.dir}/lib/ext"
includes="jboss-jmx.jar"
/>
</path>
<!-- =================================================================== -->
<!-- Initialize -->
<!-- =================================================================== -->
<target name="init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
</target>
<!-- =================================================================== -->
<!-- Prepares the directory structure -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
<mkdir dir="${classes.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Compiles all the classes -->
<!-- =================================================================== -->
<target name="compile" depends="prepare"
description="Compile all classes">
<javac
destdir="${classes.dir}"
classpathref="default.class.path"
debug="on"
optimize="off"
>
<src path="${src.dir}"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Recompiles all the classes -->
<!-- =================================================================== -->
<target name="recompile" depends="clean,compile"
description="Clean and compile"/>
<!-- =================================================================== -->
<!-- Jar -->
<!-- =================================================================== -->
<target name="jar" description="Assemble jar files">
<jar destfile="../dist/${name.jar}"
basedir="bin"
includes="**/*.class"
/>
</target>
<!-- =================================================================== -->
<!-- Clean -->
<!-- =================================================================== -->
<target name="clean" description="Remove clases directory">
<delete dir="${classes.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Rebuild everything from scratch -->
<!-- =================================================================== -->
<target name="all" depends="recompile,jar" />
</project>
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB-51/Readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB-51/Readme.txt 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/Readme.txt 2006-07-03 14:29:57 UTC (rev 4901)
@@ -1,2 +1,4 @@
This is the source code repository for JBossESB. This is a work in progress, so the structure may change.
+For more information on JBossESB, visit http://labs.jboss.com/portal/jbossesb/?prjlist=false
+
Modified: labs/jbossesb/branches/JBESB-51/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB-51/build.xml 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/build.xml 2006-07-03 14:29:57 UTC (rev 4901)
@@ -5,29 +5,43 @@
<!-- Set module name -->
<property name="org.jboss.esb.internal.modulename" value="jbesb"/>
+ <property name="org.jboss.esb.jboss.home" value="."/>
+
+ <!-- Product properties file -->
+ <property name="org.jboss.esb.product.properties" value="jbossesb-properties.xml"/>
+
+ <!-- Set default properties filename -->
+ <property name="org.jboss.esb.properties" value="product.properties"/>
+
<!-- Load Build Properties File -->
<property file="${org.jboss.esb.properties}"/>
<!-- Set internal property defaults -->
- <property name="org.jboss.esb.installationdirectory" value="build/install"/>
+ <property name="org.jboss.esb.installationdirectory" value="${basedir}/build/install"/>
<!-- Compile with debugging? -->
+ <property name="org.jboss.esb.debug" value="yes"/>
<condition property="org.jboss.esb.debug" value="no">
<equals arg1="${org.jboss.esb.debug}" arg2="no"/>
</condition>
- <property name="org.jboss.esb.debug" value="yes"/>
<!-- Compile with deprecation? -->
+ <property name="org.jboss.esb.deprecation" value="no"/>
<condition property="org.jboss.esb.deprecation" value="yes">
<equals arg1="${org.jboss.esb.deprecation}" arg2="yes"/>
</condition>
- <property name="org.jboss.esb.deprecation" value="no"/>
+ <!-- Build from local libs? -->
+ <property name="org.jboss.esb.frominstall" value="no"/>
+ <condition property="org.jboss.esb.frominstall" value="yes">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
<!-- Path names -->
<property name="org.jboss.esb.internal.core" value="ESBCore"/>
- <property name="org.jboss.esb.internal.build.dest" value="build"/>
- <property name="org.jboss.esb.internal.jar.dest" value="lib"/>
+ <property name="org.jboss.esb.internal.dest" value="${basedir}/build"/>
+ <property name="org.jboss.esb.internal.jar.dest" value="${basedir}/lib"/>
<property name="org.jboss.esb.internal.javadocs.dest" value="javadocs"/>
<!-- Initialisation -->
@@ -48,7 +62,7 @@
<target name="org.jboss.esb.jar" depends="org.jboss.esb.internal.init, org.jboss.esb.core.jar"/>
<target name="org.jboss.esb.core.compile" depends="org.jboss.esb.internal.init">
- <echo message="Compiling module"/>
+ <echo message="Compiling modules"/>
<ant dir="ESBCore"/>
</target>
@@ -120,15 +134,25 @@
<!-- Clean targets -->
<target name="org.jboss.esb.clean">
- <echo message="Cleaning module"/>
+ <echo message="Cleaning modules"/>
+
+ <echo message="Compiling modules"/>
+ <ant dir="ESBCore" target="clean"/>
+ </target>
+
+ <target name="org.jboss.esb.purge">
+ <echo message="Purging modules"/>
+
+ <ant dir="ESBCore" target="purge"/>
+
<delete dir="${org.jboss.esb.internal.dest}"/>
<delete dir="${org.jboss.esb.internal.dest.root}"/>
<delete dir="${org.jboss.esb.internal.javadocs.dest}"/>
- <delete dir="${org.jboss.esb.internal.jar.dest}"/>
</target>
<!-- Short target names -->
<target name="compile" depends="org.jboss.esb.compile"/>
<target name="jar" depends="org.jboss.esb.jar"/>
<target name="clean" depends="org.jboss.esb.clean"/>
+ <target name="purge" depends="org.jboss.esb.purge"/>
</project>
Added: labs/jbossesb/branches/JBESB-51/product.properties
===================================================================
--- labs/jbossesb/branches/JBESB-51/product.properties 2006-07-02 16:18:04 UTC (rev 4900)
+++ labs/jbossesb/branches/JBESB-51/product.properties 2006-07-03 14:29:57 UTC (rev 4901)
@@ -0,0 +1,7 @@
+# JBossESB ant properties file
+# $Id$
+#
+org.jboss.esb.deprecation=yes
+org.jboss.esb.alltests.build=yes
+org.jboss.esb.frominstall=no
+org.jboss.esb.jboss.home=.
|
|
From: <jbo...@li...> - 2006-07-03 14:17:52
|
Author: dar...@jb...
Date: 2006-07-03 10:17:35 -0400 (Mon, 03 Jul 2006)
New Revision: 543
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
branches/jbossws-1.0/src/test/resources/jbws1011/
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/ejb-jar.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/webservices.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jbws1011/wstools-config.xml
branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt
Removed:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/ejb-jar.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/webservices.xml
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jbws1011/wstools-config.xml
branches/jbossws-1.0/src/test/resources/samples/samples-tomcat-excludes.txt
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java
branches/jbossws-1.0/src/test/ant/build-jars.xml
branches/jbossws-1.0/src/test/build.xml
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
Log:
Merged changes from trunk for - JBWS-1011 NullPointerException deploying JSR-109 deployment that contains entity beans in addition to the session bean exposed as a WS endpoint.
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java 2006-07-03 13:22:24 UTC (rev 542)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -65,7 +65,11 @@
while (it.hasNext())
{
BeanMetaData bmd = (BeanMetaData)it.next();
- beans.add(buildUnifiedBeanMetaData(bmd));
+ UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
}
umd.setEnterpriseBeans(beans);
}
Modified: branches/jbossws-1.0/src/test/ant/build-jars.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars.xml 2006-07-03 13:22:24 UTC (rev 542)
+++ branches/jbossws-1.0/src/test/ant/build-jars.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -315,8 +315,37 @@
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
- </jar>
+ </jar>
+ <!-- jbossws-jbws1011 -->
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1011.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityLocal.class"/>
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityHome.class"/>
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityBean.class"/>
+ <include name="org/jboss/test/ws/jbws1011/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jbws1011/TestEndpointBean.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1011/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="jbosscmp-jdbc.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="webservices.xml"/>
+ <include name="wsdl/TestService.wsdl"/>
+ </metainf>
+ </jar>
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1011-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1011/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1011/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbossws-jbws231 -->
<war warfile="${build.test.dir}/libs/jbossws-jbws231.war" webxml="${build.test.dir}/resources/jbws231/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-07-03 13:22:24 UTC (rev 542)
+++ branches/jbossws-1.0/src/test/build.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -115,7 +115,7 @@
<condition property="tests.excludesfile" value="${tests.noexcludes.file}">
<isset property="jbossws.target.server.jboss"/>
</condition>
- <condition property="tests.excludesfile" value="${test.resources.dir}/samples/samples-tomcat-excludes.txt">
+ <condition property="tests.excludesfile" value="${test.resources.dir}/tests-tomcat-excludes.txt">
<isset property="jbossws.target.server.tomcat"/>
</condition>
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-07-03 13:22:24 UTC (rev 542)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -30,6 +30,11 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jbws231.JBWS231TestCase;
+/**
+ *
+ * @author dar...@jb...
+ * @since 27-June-2006
+ */
public class JBWS1010TestCase extends JBossWSTest
{
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011 (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jbws1011;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test case to test that a deployment containg a stateless session bean exposed
- * as a web service and a CMP entity bean (exposed using local interfaces) can be
- * correctly deployed.
- *
- * @author dar...@jb...
- * @since 03-July-2006
- */
-public class JBWS1011TestCase extends JBossWSTest
-{
-
- private static TestEndpoint port;
-
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(JBWS1011TestCase.class, "jbossws-jbws1011.jar, jbossws-jbws1011-client.jar");
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- }
-
- public void testCall() throws Exception
- {
- String response = port.echoString("Hello");
- assertEquals("Hello", response);
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jbws1011;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-/**
- *
- * @author dar...@jb...
- * @since 03-July-2006
- */
-public abstract class SimpleEntityBean implements EntityBean
-{
-
- private EntityContext context;
-
- public String ejbCreate(final String id) throws CreateException
- {
- setId(id);
- return null;
- }
-
- public void ejbPostCreate(final String id)
- {
- }
-
- public abstract void setId(final String id);
-
- public abstract String getId();
-
- public void setEntityContext(final EntityContext context)
- {
- this.context = context;
- }
-
- public void unsetEntityContext()
- {
- context = null;
- }
-
- public void ejbRemove()
- {
- }
-
- public void ejbActivate()
- {
- }
-
- public void ejbPassivate()
- {
- }
-
- public void ejbLoad()
- {
- }
-
- public void ejbStore()
- {
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jbws1011;
-
-import java.util.Collection;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBLocalHome;
-import javax.ejb.FinderException;
-
-/**
- *
- * @author dar...@jb...
- * @since 03-July-2006
- */
-public interface SimpleEntityHome extends EJBLocalHome
-{
-
- public SimpleEntityLocal create(String id) throws CreateException;
-
- public SimpleEntityLocal findByPrimaryKey(String id) throws FinderException;
-
- public Collection findAll() throws FinderException;
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jbws1011;
-
-import javax.ejb.EJBLocalObject;
-
-/**
- *
- * @author dar...@jb...
- * @since 03-July-2006
- */
-public interface SimpleEntityLocal extends EJBLocalObject
-{
-
- public String getId();
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jbws1011;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- *
- * @author dar...@jb...
- * @since 03-July-2006
- */
-public interface TestEndpoint extends Remote
-{
-
- public String echoString(final String message) throws RemoteException;
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,40 +0,0 @@
-package org.jboss.test.ws.jbws1011;
-
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-
-public class TestEndpointBean implements SessionBean
-{
-
- /** */
- private static final long serialVersionUID = 4273529627421651843L;
-
- private SessionContext context;
-
- public void ejbCreate()
- {
- }
-
- public String echoString(final String message)
- {
- return message;
- }
-
- public void setSessionContext(final SessionContext context)
- {
- this.context = context;
- }
-
- public void ejbRemove()
- {
- }
-
- public void ejbActivate()
- {
- }
-
- public void ejbPassivate()
- {
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java (from rev 541, trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java)
Copied: branches/jbossws-1.0/src/test/resources/jbws1011 (from rev 541, trunk/src/test/resources/jbws1011)
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF (from rev 541, trunk/src/test/resources/jbws1011/META-INF)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/application-client.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/application-client.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>TestService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
- </port-component-ref>
- </service-ref>
-
-</application-client>
-
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/application-client.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/application-client.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/ejb-jar.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/ejb-jar.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
- version="2.1">
- <enterprise-beans>
-
- <entity>
- <ejb-name>SimpleEntityBean</ejb-name>
- <local-home>
- org.jboss.test.ws.jbws1011.SimpleEntityHome
- </local-home>
- <local>org.jboss.test.ws.jbws1011.SimpleEntityLocal</local>
- <ejb-class>
- org.jboss.test.ws.jbws1011.SimpleEntityBean
- </ejb-class>
- <persistence-type>Container</persistence-type>
- <prim-key-class>java.lang.String</prim-key-class>
- <reentrant>False</reentrant>
- <cmp-version>2.x</cmp-version>
- <abstract-schema-name>Simple</abstract-schema-name>
- <cmp-field>
- <field-name>id</field-name>
- </cmp-field>
- <primkey-field>id</primkey-field>
- </entity>
-
- <session>
- <ejb-name>TestEndpointBean</ejb-name>
- <service-endpoint>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint>
- <ejb-class>org.jboss.test.ws.jbws1011.TestEndpointBean</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Container</transaction-type>
- </session>
- </enterprise-beans>
-</ejb-jar>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/ejb-jar.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws1011</package-type>
- <namespaceURI>http://org.jboss.test.ws/jbws1011/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jbws1011.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1011'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>TestEndpointPort</port-name>
- <java-port-name>TestEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1011'>portTypeNS:TestEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1011'>bindingNS:TestEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>echoString</java-method-name>
- <wsdl-operation>echoString</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1011'>wsdlMsgNS:TestEndpoint_echoString</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1011'>wsdlMsgNS:TestEndpoint_echoStringResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jboss-client.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-jbws1011/TestEndpointBean?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jboss-client.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jbosscmp-jdbc PUBLIC
- "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
- "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
-
-<jbosscmp-jdbc>
- <defaults>
- <create-table>true</create-table>
- <remove-table>true</remove-table>
- </defaults>
-
- <enterprise-beans>
- <entity>
- <ejb-name>SimpleEntityBean</ejb-name>
- <table-name>Simple</table-name>
- </entity>
- </enterprise-beans>
-</jbosscmp-jdbc>
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/webservices.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/webservices.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/webservices.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,15 +0,0 @@
-<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1011' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>TestEndpointPort</port-component-name>
- <wsdl-port>impl:TestEndpointPort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
- <service-impl-bean>
- <ejb-link>TestEndpointBean</ejb-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/webservices.xml (from rev 541, trunk/src/test/resources/jbws1011/META-INF/webservices.xml)
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl (from rev 541, trunk/src/test/resources/jbws1011/META-INF/wsdl)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1011' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1011' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='TestEndpoint_echoString'>
- <part name='String_1' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echoStringResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
- <operation name='echoString' parameterOrder='String_1'>
- <input message='tns:TestEndpoint_echoString'/>
- <output message='tns:TestEndpoint_echoStringResponse'/>
- </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoString'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.test.ws/jbws1011' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.test.ws/jbws1011' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl (from rev 541, trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl)
Deleted: branches/jbossws-1.0/src/test/resources/jbws1011/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jbws1011/wstools-config.xml 2006-07-03 13:16:02 UTC (rev 541)
+++ branches/jbossws-1.0/src/test/resources/jbws1011/wstools-config.xml 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools -cp ../../../../output/tests/classes -dest ./META-INF -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jbws1011.TestEndpoint" style="rpc">
- </service>
- <namespaces target-namespace="http://org.jboss.test.ws/jbws1011" type-namespace="http://org.jboss.test.ws/jbws1011/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices ejb-link="TestEndpointBean"/>
- </java-wsdl>
-</configuration>
Copied: branches/jbossws-1.0/src/test/resources/jbws1011/wstools-config.xml (from rev 541, trunk/src/test/resources/jbws1011/wstools-config.xml)
Deleted: branches/jbossws-1.0/src/test/resources/samples/samples-tomcat-excludes.txt
===================================================================
--- branches/jbossws-1.0/src/test/resources/samples/samples-tomcat-excludes.txt 2006-07-03 13:22:24 UTC (rev 542)
+++ branches/jbossws-1.0/src/test/resources/samples/samples-tomcat-excludes.txt 2006-07-03 14:17:35 UTC (rev 543)
@@ -1,5 +0,0 @@
-org/jboss/test/ws/samples/dynamichandler/**
-org/jboss/test/ws/samples/jmstransport/**
-org/jboss/test/ws/samples/jsr109ejb/**
-org/jboss/test/ws/samples/jsr181ejb/**
-org/jboss/test/ws/samples/secureejb/**
Copied: branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt (from rev 541, trunk/src/test/resources/tests-tomcat-excludes.txt)
|
|
From: <jbo...@li...> - 2006-07-03 13:22:28
|
Author: tho...@jb... Date: 2006-07-03 09:22:24 -0400 (Mon, 03 Jul 2006) New Revision: 542 Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webparam/PingService.java Log: layout Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webparam/PingService.java =================================================================== --- trunk/src/test/java/org/jboss/test/ws/jsr181/webparam/PingService.java 2006-07-03 13:16:02 UTC (rev 541) +++ trunk/src/test/java/org/jboss/test/ws/jsr181/webparam/PingService.java 2006-07-03 13:22:24 UTC (rev 542) @@ -1,24 +1,24 @@ /* - * JBoss, Home of Professional Open Source - * Copyright 2005, JBoss Inc., and individual contributors as indicated - * by the @authors tag. See the copyright.txt in the distribution for a - * full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ package org.jboss.test.ws.jsr181.webparam; import javax.jws.WebMethod; @@ -49,27 +49,23 @@ return p; } - @WebMethod(operationName = "PingOneWay") @Oneway - public void ping( - @WebParam(name = "Ping") PingDocument p) + @WebMethod(operationName = "PingOneWay") + public void ping(@WebParam(name = "Ping") PingDocument p) { log.info("ping: " + p); } @WebMethod(operationName = "PingTwoWay") - public void ping( - @WebParam(name = "Ping", mode = WebParam.Mode.INOUT) PingDocumentHolder p) + public void ping(@WebParam(name = "Ping", mode = WebParam.Mode.INOUT) PingDocumentHolder p) { log.info("ping: " + p.value); p.value = new PingDocument(p.value.getContent() + " Response"); } - @WebMethod(operationName = "SecurePing") @Oneway - public void ping( - @WebParam(name = "Ping") PingDocument p, - @WebParam(name = "SecHeader", header = true) SecurityHeader secHdr) + @WebMethod(operationName = "SecurePing") + public void ping(@WebParam(name = "Ping") PingDocument p, @WebParam(name = "SecHeader", header = true) SecurityHeader secHdr) { log.info("ping: " + p + "," + secHdr); } |
|
From: <jbo...@li...> - 2006-07-03 13:16:17
|
Author: dar...@jb...
Date: 2006-07-03 09:16:02 -0400 (Mon, 03 Jul 2006)
New Revision: 541
Added:
trunk/src/test/java/org/jboss/test/ws/jbws1011/
trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
trunk/src/test/resources/jbws1011/
trunk/src/test/resources/jbws1011/META-INF/
trunk/src/test/resources/jbws1011/META-INF/application-client.xml
trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml
trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml
trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
trunk/src/test/resources/jbws1011/META-INF/webservices.xml
trunk/src/test/resources/jbws1011/META-INF/wsdl/
trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
trunk/src/test/resources/jbws1011/wstools-config.xml
trunk/src/test/resources/tests-tomcat-excludes.txt
Removed:
trunk/src/test/resources/samples/samples-tomcat-excludes.txt
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java
trunk/src/test/ant/build-jars.xml
trunk/src/test/build.xml
trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
Log:
JBWS-1011 NullPointerException deploying JSR-109 deployment that contains entity beans in addition to the session bean exposed as a WS endpoint.
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss/ApplicationMetaDataAdaptor.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -65,7 +65,11 @@
while (it.hasNext())
{
BeanMetaData bmd = (BeanMetaData)it.next();
- beans.add(buildUnifiedBeanMetaData(bmd));
+ UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
}
umd.setEnterpriseBeans(beans);
}
Modified: trunk/src/test/ant/build-jars.xml
===================================================================
--- trunk/src/test/ant/build-jars.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/ant/build-jars.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -315,8 +315,37 @@
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
- </jar>
+ </jar>
+ <!-- jbossws-jbws1011 -->
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1011.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityLocal.class"/>
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityHome.class"/>
+ <include name="org/jboss/test/ws/jbws1011/SimpleEntityBean.class"/>
+ <include name="org/jboss/test/ws/jbws1011/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jbws1011/TestEndpointBean.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1011/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="jbosscmp-jdbc.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="webservices.xml"/>
+ <include name="wsdl/TestService.wsdl"/>
+ </metainf>
+ </jar>
+ <jar destfile="${build.test.dir}/libs/jbossws-jbws1011-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1011/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jbws1011/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbossws-jaxws-provider-jaxb -->
<war warfile="${build.test.dir}/libs/jbossws-jaxws-provider-jaxb.war" webxml="${build.test.dir}/resources/jaxws/provider/jaxb/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/build.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -113,7 +113,7 @@
<condition property="tests.excludesfile" value="${tests.noexcludes.file}">
<isset property="jbossws.target.server.jboss"/>
</condition>
- <condition property="tests.excludesfile" value="${test.resources.dir}/samples/samples-tomcat-excludes.txt">
+ <condition property="tests.excludesfile" value="${test.resources.dir}/tests-tomcat-excludes.txt">
<isset property="jbossws.target.server.tomcat"/>
</condition>
Modified: trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1010/JBWS1010TestCase.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -30,6 +30,11 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jbws231.JBWS231TestCase;
+/**
+ *
+ * @author dar...@jb...
+ * @since 27-June-2006
+ */
public class JBWS1010TestCase extends JBossWSTest
{
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jbws1011;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test case to test that a deployment containg a stateless session bean exposed
+ * as a web service and a CMP entity bean (exposed using local interfaces) can be
+ * correctly deployed.
+ *
+ * @author dar...@jb...
+ * @since 03-July-2006
+ */
+public class JBWS1011TestCase extends JBossWSTest
+{
+
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1011TestCase.class, "jbossws-jbws1011.jar, jbossws-jbws1011-client.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+
+ public void testCall() throws Exception
+ {
+ String response = port.echoString("Hello");
+ assertEquals("Hello", response);
+ }
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/JBWS1011TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jbws1011;
+
+import javax.ejb.CreateException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 03-July-2006
+ */
+public abstract class SimpleEntityBean implements EntityBean
+{
+
+ private EntityContext context;
+
+ public String ejbCreate(final String id) throws CreateException
+ {
+ setId(id);
+ return null;
+ }
+
+ public void ejbPostCreate(final String id)
+ {
+ }
+
+ public abstract void setId(final String id);
+
+ public abstract String getId();
+
+ public void setEntityContext(final EntityContext context)
+ {
+ this.context = context;
+ }
+
+ public void unsetEntityContext()
+ {
+ context = null;
+ }
+
+ public void ejbRemove()
+ {
+ }
+
+ public void ejbActivate()
+ {
+ }
+
+ public void ejbPassivate()
+ {
+ }
+
+ public void ejbLoad()
+ {
+ }
+
+ public void ejbStore()
+ {
+ }
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jbws1011;
+
+import java.util.Collection;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.FinderException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 03-July-2006
+ */
+public interface SimpleEntityHome extends EJBLocalHome
+{
+
+ public SimpleEntityLocal create(String id) throws CreateException;
+
+ public SimpleEntityLocal findByPrimaryKey(String id) throws FinderException;
+
+ public Collection findAll() throws FinderException;
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityHome.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jbws1011;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 03-July-2006
+ */
+public interface SimpleEntityLocal extends EJBLocalObject
+{
+
+ public String getId();
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/SimpleEntityLocal.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jbws1011;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dar...@jb...
+ * @since 03-July-2006
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoString(final String message) throws RemoteException;
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,40 @@
+package org.jboss.test.ws.jbws1011;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+public class TestEndpointBean implements SessionBean
+{
+
+ /** */
+ private static final long serialVersionUID = 4273529627421651843L;
+
+ private SessionContext context;
+
+ public void ejbCreate()
+ {
+ }
+
+ public String echoString(final String message)
+ {
+ return message;
+ }
+
+ public void setSessionContext(final SessionContext context)
+ {
+ this.context = context;
+ }
+
+ public void ejbRemove()
+ {
+ }
+
+ public void ejbActivate()
+ {
+ }
+
+ public void ejbPassivate()
+ {
+ }
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jbws1011/TestEndpointBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/application-client.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/application-client.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>TestService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Property changes on: trunk/src/test/resources/jbws1011/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
+ version="2.1">
+ <enterprise-beans>
+
+ <entity>
+ <ejb-name>SimpleEntityBean</ejb-name>
+ <local-home>
+ org.jboss.test.ws.jbws1011.SimpleEntityHome
+ </local-home>
+ <local>org.jboss.test.ws.jbws1011.SimpleEntityLocal</local>
+ <ejb-class>
+ org.jboss.test.ws.jbws1011.SimpleEntityBean
+ </ejb-class>
+ <persistence-type>Container</persistence-type>
+ <prim-key-class>java.lang.String</prim-key-class>
+ <reentrant>False</reentrant>
+ <cmp-version>2.x</cmp-version>
+ <abstract-schema-name>Simple</abstract-schema-name>
+ <cmp-field>
+ <field-name>id</field-name>
+ </cmp-field>
+ <primkey-field>id</primkey-field>
+ </entity>
+
+ <session>
+ <ejb-name>TestEndpointBean</ejb-name>
+ <service-endpoint>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint>
+ <ejb-class>org.jboss.test.ws.jbws1011.TestEndpointBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
\ No newline at end of file
Property changes on: trunk/src/test/resources/jbws1011/META-INF/ejb-jar.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws1011</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1011/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jbws1011.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1011'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1011'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1011'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoString</java-method-name>
+ <wsdl-operation>echoString</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1011'>wsdlMsgNS:TestEndpoint_echoString</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1011'>wsdlMsgNS:TestEndpoint_echoStringResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: trunk/src/test/resources/jbws1011/META-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jbossws-jbws1011/TestEndpointBean?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Property changes on: trunk/src/test/resources/jbws1011/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jbosscmp-jdbc PUBLIC
+ "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
+
+<jbosscmp-jdbc>
+ <defaults>
+ <create-table>true</create-table>
+ <remove-table>true</remove-table>
+ </defaults>
+
+ <enterprise-beans>
+ <entity>
+ <ejb-name>SimpleEntityBean</ejb-name>
+ <table-name>Simple</table-name>
+ </entity>
+ </enterprise-beans>
+</jbosscmp-jdbc>
Property changes on: trunk/src/test/resources/jbws1011/META-INF/jbosscmp-jdbc.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/webservices.xml
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/webservices.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/webservices.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1011' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port>impl:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1011.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>TestEndpointBean</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: trunk/src/test/resources/jbws1011/META-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
===================================================================
--- trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1011' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1011' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoString'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoStringResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoString' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoString'/>
+ <output message='tns:TestEndpoint_echoStringResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoString'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1011' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1011' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/src/test/resources/jbws1011/META-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/resources/jbws1011/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jbws1011/wstools-config.xml 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/jbws1011/wstools-config.xml 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../output/tests/classes -dest ./META-INF -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jbws1011.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1011" type-namespace="http://org.jboss.test.ws/jbws1011/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices ejb-link="TestEndpointBean"/>
+ </java-wsdl>
+</configuration>
Property changes on: trunk/src/test/resources/jbws1011/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/src/test/resources/samples/samples-tomcat-excludes.txt
===================================================================
--- trunk/src/test/resources/samples/samples-tomcat-excludes.txt 2006-07-03 11:13:21 UTC (rev 540)
+++ trunk/src/test/resources/samples/samples-tomcat-excludes.txt 2006-07-03 13:16:02 UTC (rev 541)
@@ -1,5 +0,0 @@
-org/jboss/test/ws/samples/dynamichandler/**
-org/jboss/test/ws/samples/jmstransport/**
-org/jboss/test/ws/samples/jsr109ejb/**
-org/jboss/test/ws/samples/jsr181ejb/**
-org/jboss/test/ws/samples/secureejb/**
Copied: trunk/src/test/resources/tests-tomcat-excludes.txt (from rev 538, trunk/src/test/resources/samples/samples-tomcat-excludes.txt)
===================================================================
--- trunk/src/test/resources/samples/samples-tomcat-excludes.txt 2006-06-30 16:54:45 UTC (rev 538)
+++ trunk/src/test/resources/tests-tomcat-excludes.txt 2006-07-03 13:16:02 UTC (rev 541)
@@ -0,0 +1,6 @@
+org/jboss/test/ws/samples/dynamichandler/**
+org/jboss/test/ws/samples/jmstransport/**
+org/jboss/test/ws/samples/jsr109ejb/**
+org/jboss/test/ws/samples/jsr181ejb/**
+org/jboss/test/ws/samples/secureejb/**
+org/jboss/test/ws/jbws1011/**
|
|
From: <jbo...@li...> - 2006-07-03 11:13:29
|
Author: tho...@jb... Date: 2006-07-03 07:13:21 -0400 (Mon, 03 Jul 2006) New Revision: 540 Added: trunk/src/main/java/org/jboss/ws/jbossxb/ Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JAXBConstants.java trunk/src/main/java/org/jboss/ws/jbossxb/JAXBMarshallerImpl.java trunk/src/main/java/org/jboss/ws/jbossxb/JAXBUnmarshallerImpl.java trunk/src/main/java/org/jboss/ws/jbossxb/MarshalException.java trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java trunk/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java Log: move to package jbossxb Copied: trunk/src/main/java/org/jboss/ws/jbossxb (from rev 533, trunk/src/main/java/org/jboss/ws/jaxb) Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JAXBConstants.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/JAXBConstants.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/JAXBConstants.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; // $Id$ Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JAXBMarshallerImpl.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/JAXBMarshallerImpl.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/JAXBMarshallerImpl.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; // $Id$ @@ -59,7 +59,7 @@ { // provide logging - private static final Logger log = Logger.getLogger(JAXBMarshallerImpl.class); + private static final Logger log = Logger.getLogger(JBossXBMarshallerImpl.class); // The marshaller properties private HashMap properties = new HashMap(); Modified: trunk/src/main/java/org/jboss/ws/jbossxb/JAXBUnmarshallerImpl.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/JAXBUnmarshallerImpl.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/JAXBUnmarshallerImpl.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; // $Id$ Modified: trunk/src/main/java/org/jboss/ws/jbossxb/MarshalException.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/MarshalException.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/MarshalException.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; /** * A marshal exception. Modified: trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/SchemaBindingBuilder.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; // $Id$ Modified: trunk/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java =================================================================== --- trunk/src/main/java/org/jboss/ws/jaxb/UnmarshalException.java 2006-06-30 10:19:14 UTC (rev 533) +++ trunk/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java 2006-07-03 11:13:21 UTC (rev 540) @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.ws.jaxb; +package org.jboss.ws.jbossxb; /** * A marshal exception. |
|
From: <jbo...@li...> - 2006-07-03 10:25:00
|
Author: hei...@jb...
Date: 2006-07-03 06:24:56 -0400 (Mon, 03 Jul 2006)
New Revision: 539
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxb/SchemaBindingBuilder.java
Log:
imports
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxb/SchemaBindingBuilder.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxb/SchemaBindingBuilder.java 2006-06-30 16:54:45 UTC (rev 538)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxb/SchemaBindingBuilder.java 2006-07-03 10:24:56 UTC (rev 539)
@@ -45,18 +45,7 @@
import org.jboss.xb.binding.metadata.PackageMetaData;
import org.jboss.xb.binding.metadata.PropertyMetaData;
import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
+import org.jboss.xb.binding.sunday.unmarshalling.*;
import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
@@ -332,7 +321,9 @@
String qnameScope = typeMapping.getQnameScope();
QName anonymousTypeQName = typeMapping.getAnonymousTypeQName();
if (anonymousTypeQName != null)
+ {
return getAnonymousTypeBinding(schemaBinding, anonymousTypeQName);
+ }
QName xmlType = typeMapping.getRootTypeQName();
@@ -422,7 +413,7 @@
}
schemaBinding.addElement(xmlName, typeBinding);
-
+
}
else if (xmlType.equals(Constants.TYPE_LITERAL_ANYTYPE) == false)
{
|
|
From: <jbo...@li...> - 2006-07-02 16:18:10
|
Author: mfrandsen Date: 2006-07-02 12:18:04 -0400 (Sun, 02 Jul 2006) New Revision: 4900 Modified: labs/jbossrules/trunk/drools-jsr94/src/test/java/org/drools/jsr94/rules/StatelessRuleSessionTest.java Log: tests for support for reading xml from Reader/Stream added Modified: labs/jbossrules/trunk/drools-jsr94/src/test/java/org/drools/jsr94/rules/StatelessRuleSessionTest.java =================================================================== --- labs/jbossrules/trunk/drools-jsr94/src/test/java/org/drools/jsr94/rules/StatelessRuleSessionTest.java 2006-07-02 16:17:08 UTC (rev 4899) +++ labs/jbossrules/trunk/drools-jsr94/src/test/java/org/drools/jsr94/rules/StatelessRuleSessionTest.java 2006-07-02 16:18:04 UTC (rev 4900) @@ -2,13 +2,13 @@ /* * Copyright 2005 JBoss Inc - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,13 +19,21 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; +import java.rmi.RemoteException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.rules.ConfigurationException; import javax.rules.ObjectFilter; +import javax.rules.RuleServiceProvider; +import javax.rules.RuleServiceProviderManager; import javax.rules.StatelessRuleSession; +import javax.rules.admin.LocalRuleExecutionSetProvider; +import javax.rules.admin.RuleExecutionSet; +import javax.rules.admin.RuleExecutionSetCreateException; +import javax.rules.admin.RuleExecutionSetRegisterException; import junit.framework.TestCase; @@ -44,6 +52,7 @@ private final String bindUri = "sisters.drl"; private final String bindUri_drl = "sisters_expander.drl"; private final String bindUri_dsl = "sisters_expander.dsl"; + private final String bindUri_xml = "sisters.xml"; private final String bindUri_globals = "sisters_globals.drl"; /** @@ -64,11 +73,18 @@ this.sessionBuilder.addRuleExecutionSet( this.bindUri_drl, StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_drl ), map ); + final Map map_xml = new HashMap(); + map_xml.put( "xml", "xml" ); + this.sessionBuilder.addRuleExecutionSet( this.bindUri_xml, + StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_xml ), + map_xml ); + this.sessionBuilder.addRuleExecutionSet( this.bindUri_globals, StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_globals ) ); } + /* * Taken from DRLParser @@ -87,6 +103,59 @@ return text; } + public void testCreateRuleExecutionSetFromStreamWithXml(){ + + try { + final Map map_xml = new HashMap(); + map_xml.put( "xml", "xml" ); + + RuleServiceProvider ruleServiceProvider; + RuleServiceProviderManager.registerRuleServiceProvider( "http://drools.org/", + RuleServiceProviderImpl.class ); + + ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( "http://drools.org/" ); + + LocalRuleExecutionSetProvider ruleSetProvider = ruleServiceProvider.getRuleAdministrator().getLocalRuleExecutionSetProvider( null ); + final RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_xml ), + map_xml ); + assertNotNull(ruleExecutionSet); + } catch (RemoteException e) { + fail(); + } catch (ConfigurationException e) { + fail(); + } catch (RuleExecutionSetCreateException e) { + fail(); + } catch (IOException e) { + fail(); + } + } +public void testCreateRuleExecutionSetFromStreamReaderWithXml(){ + try { + final Map map_xml = new HashMap(); + map_xml.put( "xml", "xml" ); + + RuleServiceProvider ruleServiceProvider; + RuleServiceProviderManager.registerRuleServiceProvider( "http://drools.org/", + RuleServiceProviderImpl.class ); + + ruleServiceProvider = RuleServiceProviderManager.getRuleServiceProvider( "http://drools.org/" ); + + LocalRuleExecutionSetProvider ruleSetProvider = ruleServiceProvider.getRuleAdministrator().getLocalRuleExecutionSetProvider( null ); + final Reader ruleReader = new InputStreamReader( StatelessRuleSessionTest.class.getResourceAsStream( this.bindUri_xml ) ); + final RuleExecutionSet ruleExecutionSet = ruleSetProvider.createRuleExecutionSet( ruleReader, + map_xml ); + assertNotNull(ruleExecutionSet); + + } catch (RemoteException e) { + fail(); + } catch (ConfigurationException e) { + fail(); + } catch (RuleExecutionSetCreateException e) { + fail(); + } catch (IOException e) { + fail(); + } + } /** * Test executeRules with globals. */ @@ -194,7 +263,50 @@ statelessSession.release(); } + /** + * Test executeRules with normal drl. + */ + public void testExecuteRulesWithXml() throws Exception { + final StatelessRuleSession statelessSession = this.sessionBuilder.getStatelessRuleSession( this.bindUri_xml ); + final List inObjects = new ArrayList(); + + final Person bob = new Person( "bob" ); + inObjects.add( bob ); + + final Person jeannie = new Person( "jeannie" ); + jeannie.addSister( "rebecca" ); + inObjects.add( jeannie ); + + final Person rebecca = new Person( "rebecca" ); + rebecca.addSister( "jeannie" ); + inObjects.add( rebecca ); + + // execute the rules + final List outList = statelessSession.executeRules( inObjects ); + + assertEquals( "incorrect size", + 5, + outList.size() ); + + assertContains( outList, + bob ); + + assertContains( outList, + rebecca ); + + assertContains( outList, + jeannie ); + + assertContains( outList, + "rebecca and jeannie are sisters" ); + + assertContains( outList, + "jeannie and rebecca are sisters" ); + + statelessSession.release(); + } + /** * Test executeRules drl with dsl. */ |
|
From: <jbo...@li...> - 2006-07-02 16:17:14
|
Author: mfrandsen Date: 2006-07-02 12:17:08 -0400 (Sun, 02 Jul 2006) New Revision: 4899 Modified: labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/admin/LocalRuleExecutionSetProviderImpl.java Log: Support for reading xml from Reader/Stream added Modified: labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/admin/LocalRuleExecutionSetProviderImpl.java =================================================================== --- labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/admin/LocalRuleExecutionSetProviderImpl.java 2006-07-01 13:38:00 UTC (rev 4898) +++ labs/jbossrules/trunk/drools-jsr94/src/main/java/org/drools/jsr94/rules/admin/LocalRuleExecutionSetProviderImpl.java 2006-07-02 16:17:08 UTC (rev 4899) @@ -2,13 +2,13 @@ /* * Copyright 2005 JBoss Inc - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,9 +37,9 @@ * interface which defines <code>RuleExecutionSet</code> creation methods for * defining <code>RuleExecutionSet</code>s from local (non-serializable) * resources. - * + * * @see LocalRuleExecutionSetProvider - * + * * @author N. Alex Rupp (n_alex <at>codehaus.org) * @author <a href="mailto:tho...@so...">thomas diesler </a> * @author <a href="mailto:mic...@sy...">michael frandsen </a> @@ -59,17 +59,17 @@ * <code>createRuleExecutionSet</code> taking a Reader instance should be * used if the source is a character stream and encoding conversion should * be performed. - * + * * @param ruleExecutionSetStream * an input stream used to read the rule execution set. * @param properties * additional properties used to create the * <code>RuleExecutionSet</code> implementation. May be * <code>null</code>. - * + * * @throws RuleExecutionSetCreateException * on rule execution set creation error. - * + * * @return The created <code>RuleExecutionSet</code>. */ public RuleExecutionSet createRuleExecutionSet(final InputStream ruleExecutionSetStream, @@ -80,6 +80,8 @@ final Reader dsl = new StringReader( (String) properties.get( "dsl" ) ); builder.addPackageFromDrl( new InputStreamReader( ruleExecutionSetStream ), dsl ); + } else if (properties != null && properties.containsKey( "xml" ) ) { + builder.addPackageFromXml(new InputStreamReader( ruleExecutionSetStream ) ); } else { builder.addPackageFromDrl( new InputStreamReader( ruleExecutionSetStream ) ); } @@ -99,17 +101,17 @@ * Creates a <code>RuleExecutionSet</code> implementation using a supplied * character stream Reader and additional Drools-specific properties. A * Drools-specific rule execution set is read from the supplied Reader. - * + * * @param ruleExecutionSetReader * a Reader used to read the rule execution set. * @param properties * additional properties used to create the * <code>RuleExecutionSet</code> implementation. May be * <code>null</code>. - * + * * @throws RuleExecutionSetCreateException * on rule execution set creation error. - * + * * @return The created <code>RuleExecutionSet</code>. */ public RuleExecutionSet createRuleExecutionSet(final Reader ruleExecutionSetReader, @@ -120,6 +122,8 @@ final Reader dsl = new StringReader( (String) properties.get( "dsl" ) ); builder.addPackageFromDrl( ruleExecutionSetReader, dsl ); + } else if (properties != null && properties.containsKey( "xml" )) { + builder.addPackageFromXml( ruleExecutionSetReader ); } else { builder.addPackageFromDrl( ruleExecutionSetReader ); } @@ -139,17 +143,17 @@ /** * Creates a <code>RuleExecutionSet</code> implementation from a * Drools-specific AST representation and Drools-specific properties. - * + * * @param ruleExecutionSetAst * the vendor representation of a rule execution set * @param properties * additional properties used to create the * <code>RuleExecutionSet</code> implementation. May be * <code>null</code>. - * + * * @throws RuleExecutionSetCreateException * on rule execution set creation error. - * + * * @return The created <code>RuleExecutionSet</code>. */ public RuleExecutionSet createRuleExecutionSet(final Object ruleExecutionSetAst, @@ -165,17 +169,17 @@ /** * Creates a <code>RuleExecutionSet</code> implementation from a * <code>RuleSet</code> and Drools-specific properties. - * + * * @param pkg * a Drools <code>org.drools.rule.Package</code> representation * of a rule execution set. * @param properties * additional properties used to create the RuleExecutionSet * implementation. May be <code>null</code>. - * + * * @throws RuleExecutionSetCreateException * on rule execution set creation error. - * + * * @return The created <code>RuleExecutionSet</code>. */ private RuleExecutionSet createRuleExecutionSet(final Package pkg, |
Author: tirelli
Date: 2006-07-01 09:38:00 -0400 (Sat, 01 Jul 2006)
New Revision: 4898
Added:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_JoinNodeModifyObject.drl
Removed:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectMatches.java
Log:
JBRULES-318:
* Fixing JoinNode.modifyTuple() to keep matches ordering
* Added integration test
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-07-01 01:37:10 UTC (rev 4897)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-07-01 13:38:00 UTC (rev 4898)
@@ -2493,8 +2493,8 @@
return bytes;
}
- public void FIXME_testEval2() throws Exception {
- final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "test_Eval.drl" ) );
+ public void testJoinNodeModifyObject() throws Exception {
+ final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "test_JoinNodeModifyObject.drl" ) );
final PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( reader );
@@ -2504,12 +2504,26 @@
ruleBase.addPackage( pkg1 );
final WorkingMemory workingMemory = ruleBase.newWorkingMemory();
- final int MAX = 3;
+ final List orderedFacts = new ArrayList();
+ final List errors = new ArrayList();
+
+ workingMemory.setGlobal( "orderedNumbers", orderedFacts );
+ workingMemory.setGlobal( "errors", errors );
+
+ final int MAX = 5;
for (int i=1 ; i<=MAX; i++) {
IndexedNumber n = new IndexedNumber(i, MAX - i + 1);
workingMemory.assertObject(n);
}
workingMemory.fireAllRules();
+
+ Assert.assertTrue( "Processing generated errors: "+errors.toString(),
+ errors.isEmpty());
+
+ for(int i=1 ; i<=MAX; i++) {
+ IndexedNumber n = (IndexedNumber) orderedFacts.get( i-1 );
+ Assert.assertEquals( "Fact is out of order", i, n.getIndex() );
+ }
}
}
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl 2006-07-01 01:37:10 UTC (rev 4897)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl 2006-07-01 13:38:00 UTC (rev 4898)
@@ -1,45 +0,0 @@
-#created on: 12 juin 2006
-package Number
-
-import org.drools.IndexedNumber;
-
-rule "Order"
-salience 200
- when
- #Doesnt work
- n1 : IndexedNumber($nb1 : number);
- n2 : IndexedNumber(number < $nb1);
- eval(n1.getIndex() < n2.getIndex());
-
- #Works great
- #n1 : IndexedNumber($nb1 : number, $index1 : index);
- #n2 : IndexedNumber($nb2 : number -> ($nb2.compareTo($nb1) < 0), index > $index1);
- then
- System.out.println("Swapping " + n1 + " with " + n2);
- check(n1, n2);
- swap(n1, n2);
- modify(n1);
- modify(n2);
-end
-
-rule "Debug"
-salience 10
- when
- n : IndexedNumber($idx : index);
- not IndexedNumber(index < $idx);
- then
- System.out.println("Number is " + n);
- retract(n);
-end
-
-function void check(IndexedNumber n1, IndexedNumber n2) {
- if ( ! (n1.getIndex() < n2.getIndex())) {
- System.out.println("Shouldn't come here... " + n1 + " " + n2);
- }
-}
-
-function void swap(IndexedNumber n1, IndexedNumber n2) {
- int tmp = n1.getIndex();
- n1.setIndex(n2.getIndex());
- n2.setIndex(tmp);
-}
\ No newline at end of file
Copied: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_JoinNodeModifyObject.drl (from rev 4897, labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl)
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Eval.drl 2006-07-01 01:37:10 UTC (rev 4897)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_JoinNodeModifyObject.drl 2006-07-01 13:38:00 UTC (rev 4898)
@@ -0,0 +1,41 @@
+#created on: 12 juin 2006
+package Number
+
+import org.drools.IndexedNumber;
+import java.util.List;
+
+global java.util.List orderedNumbers;
+global java.util.List errors;
+
+rule "Order"
+salience 200
+ when
+ #Doesnt work
+ n1 : IndexedNumber($nb1 : number);
+ n2 : IndexedNumber(number < $nb1);
+ eval(n1.getIndex() < n2.getIndex());
+
+ then
+ if ( ! (n1.getIndex() < n2.getIndex())) {
+ errors.add("Shouldn't fire for: " + n1 + " " + n2);
+ }
+ swap(n1, n2);
+ modify(n1);
+ modify(n2);
+end
+
+rule "Debug"
+salience 10
+ when
+ n : IndexedNumber($idx : index);
+ not IndexedNumber(index < $idx);
+ then
+ orderedNumbers.add(n);
+ retract(n);
+end
+
+function void swap(IndexedNumber n1, IndexedNumber n2) {
+ int tmp = n1.getIndex();
+ n1.setIndex(n2.getIndex());
+ n2.setIndex(tmp);
+}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java 2006-07-01 01:37:10 UTC (rev 4897)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java 2006-07-01 13:38:00 UTC (rev 4898)
@@ -273,6 +273,10 @@
workingMemory ) ) {
TupleMatch tupleMatch = (TupleMatch) leftTuple.getTupleMatches().get( handle );
if ( tupleMatch != null ) {
+ // ensures tupleMatch will be in the appropriate order
+ objectMatches.remove( tupleMatch );
+ objectMatches.add( tupleMatch );
+
propagateModifyTuple( tupleMatch,
context,
workingMemory );
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectMatches.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectMatches.java 2006-07-01 01:37:10 UTC (rev 4897)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectMatches.java 2006-07-01 13:38:00 UTC (rev 4898)
@@ -61,6 +61,10 @@
return tupleMatch;
}
+
+ void add(final TupleMatch tupleMatch) {
+ this.list.add( tupleMatch );
+ }
/**
* Removes the <code>TupleMatch</code> as the underlying <code>ReteTuple</code> has been retracted and no longer matches.
|
Author: unibrew
Date: 2006-06-30 21:37:10 -0400 (Fri, 30 Jun 2006)
New Revision: 4897
Modified:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/classes/ResourceJSF.properties
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml
Log:
[JBFORUMS-54] Working on TopicSplit actions. Debugging. Commenting.
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-07-01 01:37:10 UTC (rev 4897)
@@ -44,6 +44,9 @@
import org.jboss.portlet.forums.ui.view.PageNavigator;
/**
+ * ModeratorAction class is a managed bean used for getting, keeping, transforming
+ * all data and invoking moderator actions for Moderator's Control Panel.
+ *
* @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a>
*/
public class ModeratorAction extends BaseController
@@ -60,7 +63,6 @@
private Collection page = new ArrayList();
private Map topicNavigator = new HashMap();
private Map checkboxes;
-
private ResourceBundle bundle;
@@ -133,6 +135,11 @@
//ui actions supported by this bean----------------------------------------------------------------------------------------------------
+ /**
+ * UI Action for deleting topic(s) from the forum.
+ *
+ * @return
+ */
public String deleteTopic ()
{
Iterator it = checkboxes.keySet().iterator();
@@ -168,11 +175,16 @@
return "success";
}
+ /**
+ * UI Action for moveing topic(s) from one forum to other.
+ *
+ * @return
+ */
public String moveTopic ()
{
String message="";
String forum_to_id = ForumUtil.getParameter(Constants.p_forum_to_id);
- if (forum_to_id==null || forum_to_id.trim().compareToIgnoreCase("-1")==0)
+ if (forum_to_id==null || forum_to_id.trim().length()==0 || forum_to_id.trim().compareToIgnoreCase("-1")==0)
{
message = bundle.getString("ERR_NO_DEST_FORUM");
FacesContext.getCurrentInstance().addMessage("message",
@@ -222,6 +234,11 @@
return "success";
}
+ /**
+ * UI Action for locking selected topic(s).
+ *
+ * @return
+ */
public String lockTopic ()
{
if (isAnyCheckboxSelected())
@@ -269,6 +286,11 @@
}
+ /**
+ * UI Action for unlocking selected topic(s).
+ *
+ * @return
+ */
public String unlockTopic ()
{
if (isAnyCheckboxSelected())
@@ -314,6 +336,12 @@
}
}
+ /**
+ * Action checking if user selected at least one topic and forwards him to
+ * delete confirmation view.
+ *
+ * @return
+ */
public String deleteConfirm()
{
if (isAnyCheckboxSelected())
@@ -327,7 +355,13 @@
return "";
}
}
-
+
+ /**
+ * Action checking if user selected at least one topic and forwards him to
+ * move topic view.
+ *
+ * @return
+ */
public String moveConfirm()
{
if (isAnyCheckboxSelected())
@@ -342,6 +376,12 @@
}
}
+ /**
+ * Method checks if user selected at least one topic from checkboxes or
+ * there is topic id sent in request.
+ *
+ * @return
+ */
private boolean isAnyCheckboxSelected()
{
// Looking for selected topicId's in checkboxes Map
@@ -367,6 +407,8 @@
return false;
}
+ // ---------- Initialization -----------------------------------------------
+
/**
*
*/
@@ -387,12 +429,14 @@
private void execute() throws Exception
{
- // Getting ResourceBundle with current Locale
- FacesContext ctx = FacesContext.getCurrentInstance();
- UIViewRoot uiRoot = ctx.getViewRoot();
- Locale locale = uiRoot.getLocale();
- ClassLoader ldr = Thread.currentThread().getContextClassLoader();
- this.bundle = ResourceBundle.getBundle("ResourceJSF", locale, ldr);
+ if (this.bundle == null) {
+ // Getting ResourceBundle with current Locale
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ UIViewRoot uiRoot = ctx.getViewRoot();
+ Locale locale = uiRoot.getLocale();
+ ClassLoader ldr = Thread.currentThread().getContextClassLoader();
+ this.bundle = ResourceBundle.getBundle("ResourceJSF", locale, ldr);
+ }
int currentPage = 0;
//parse the input parameters
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/SplitTopic.java 2006-07-01 01:37:10 UTC (rev 4897)
@@ -22,25 +22,45 @@
package org.jboss.portlet.forums.ui.action;
-import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
+import java.util.ResourceBundle;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.jboss.portlet.forums.model.Forum;
+import org.jboss.portlet.forums.model.Post;
import org.jboss.portlet.forums.model.Topic;
import org.jboss.portlet.forums.ui.BaseController;
import org.jboss.portlet.forums.ui.Constants;
import org.jboss.portlet.forums.ui.ForumUtil;
import org.jboss.portlet.forums.ui.JSFUtil;
-import org.jboss.portlet.forums.ui.view.PageNavigator;
/**
+ * SplitTopic is a bean which keeps data and has actions needed to achieve
+ * spltting topic into two separate topics.
+ *
* @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a>
*/
public class SplitTopic extends BaseController {
+ // Title for newly created topic
private String newTopicTitle;
+
+ // Map containing Integer:Boolean pairs with TopicId:IsSelected states
private Map checkboxes;
+
+ // Topic to split
private Topic topic;
+ private ResourceBundle bundle;
+ // ---------- Getters And Setters for bean's attributes --------------------
+
public void setNewTopicTitle(String newTopicTitle) {
this.newTopicTitle = newTopicTitle;
}
@@ -63,10 +83,230 @@
return topic;
}
+ // ---------- UI Actions supported by this bean ----------------------------
/**
- *
+ * This user interface action is spliting topic after post selected by user.
+ *
+ * @return
*/
+ public String splitAfter () {
+
+ // Temporary variable for bunlde message
+ String message = "";
+
+ // Removing all not slected posts
+ Iterator selectIt = checkboxes.keySet().iterator();
+ while (selectIt.hasNext()) {
+ Boolean postFlag = (Boolean)checkboxes.get(selectIt.next());
+ if (!postFlag.booleanValue()) {
+ selectIt.remove();
+ }
+ }
+
+ // Checking whether topic has only one post, so it can't be splitted
+ if (topic.getPosts().size()==1) {
+ message = bundle.getString("ERR_SPLIT_ONE_POST_TOPIC");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Checking if user selected anything.
+ if (checkboxes.size()==0) {
+ message = bundle.getString("ERR_NO_POST_SELECTED");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // User can't select more than one post for this action.
+ if (checkboxes.size()!=1) {
+ message = bundle.getString("Too_many_error");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ //check if user selected first post
+ if (topic.getFirstPost().getId().equals((Integer)(checkboxes.keySet().iterator().next()))) {
+ message = bundle.getString("ERR_SPLIT_ALL");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Trying to get destination forum for new topic.
+ String toForumId = ForumUtil.getParameter(Constants.p_forum_to_id);
+ if (toForumId == null ||
+ toForumId.trim().compareToIgnoreCase("-1")==0 ||
+ toForumId.trim().length()==0) {
+ message = bundle.getString("ERR_DEST_FORUM");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Checking if user gave subject for new topic.
+ if (newTopicTitle == null ||
+ newTopicTitle.trim().compareToIgnoreCase("-1")==0 ||
+ newTopicTitle.trim().length()==0) {
+ message = bundle.getString("ERR_NO_SUBJECT_GIVEN");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ try {
+ Forum destForum = getForumsModule().findForumById(new Integer(toForumId));
+
+ // Creating new topic in destination forum.
+ Topic newTopic = getForumsModule().createTopic(destForum,
+ topic.getPoster().getUserId(),
+ newTopicTitle, topic.getType());
+
+ // Getting post id after which the topic must be splitted.
+ Integer selectedPostId = (Integer)checkboxes.keySet().iterator().next();
+
+ // Searching for the split pointing post in topic.
+ Iterator it = topic.getPosts().iterator();
+ Post tempPost = null;
+ while( it.hasNext() )
+ {
+ tempPost = (Post)it.next();
+ // searching for post to split after
+ if (tempPost.getId().equals(selectedPostId))
+ {
+ break;
+ }
+ }
+
+ // Adding splitting post and all which are after him to new topic.
+ if (tempPost != null)
+ {
+ newTopic.addPost(tempPost);
+ }
+ while (it.hasNext())
+ {
+ newTopic.addPost((Post)it.next());
+ }
+ newTopic.setLastPostDate(newTopic.getLastPost().getCreateDate());
+ } catch (Exception e) {
+ e.printStackTrace();
+ message = bundle.getString("ERR_INTERNAL");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Setting message that everything went smooth.
+ message = bundle.getString("SUCC_TOPIC_SPLITTED");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
+ return "";
+ }
+
+ /**
+ * This user interface action is spliting topic bh=y moving all selected
+ * by user posts into newly created topic.
+ *
+ * @return
+ */
+ public String splitPosts () {
+
+ // Temporary variable for bunlde message
+ String message = "";
+
+ // Removing all not slected posts
+ Iterator selectIt = checkboxes.keySet().iterator();
+ while (selectIt.hasNext()) {
+ Boolean postFlag = (Boolean)checkboxes.get(selectIt.next());
+ if (!postFlag.booleanValue()) {
+ selectIt.remove();
+ }
+ }
+
+ // Checking whether topic has only one post, so it can't be splitted
+ if (topic.getPosts().size()==1) {
+ message = bundle.getString("ERR_SPLIT_ONE_POST_TOPIC");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Checking if user selected anything.
+ if (checkboxes.size()==0) {
+ message = bundle.getString("ERR_NO_POST_SELECTED");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Checking if user didn't select all posts.
+ if (checkboxes.size()==topic.getPosts().size()) {
+ message = bundle.getString("ERR_SPLIT_ALL");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Trying to get destination forum for new topic.
+ String toForumId = ForumUtil.getParameter(Constants.p_forum_to_id);
+ if (toForumId == null ||
+ toForumId.trim().compareToIgnoreCase("-1")==0 ||
+ toForumId.trim().length()==0) {
+ message = bundle.getString("ERR_DEST_FORUM");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Checking if user gave subject for new topic.
+ if (newTopicTitle == null ||
+ newTopicTitle.trim().compareToIgnoreCase("-1")==0 ||
+ newTopicTitle.trim().length()==0) {
+ message = bundle.getString("ERR_NO_SUBJECT_GIVEN");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+ try {
+
+ Forum destForum = getForumsModule().findForumById(new Integer(toForumId));
+
+ // Creating new topic in selected destination forum.
+ Topic newTopic = getForumsModule().createTopic(destForum,
+ topic.getPoster().getUserId(),
+ newTopicTitle, topic.getType());
+
+ // Moving all selected posts to new topic.
+ selectIt = checkboxes.keySet().iterator();
+ Post movedPost=null;
+ while (selectIt.hasNext()) {
+ movedPost = getForumsModule().findPostById((Integer)selectIt.next());
+ newTopic.addPost(movedPost);
+ }
+ newTopic.setLastPostDate(newTopic.getLastPost().getCreateDate());
+ } catch (Exception e) {
+ e.printStackTrace();
+ message = bundle.getString("ERR_INTERNAL");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
+ return "";
+ }
+
+ // Setting message that everything went smooth.
+ message = bundle.getString("SUCC_TOPIC_SPLITTED");
+ FacesContext.getCurrentInstance().addMessage("message",
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
+ return "";
+ }
+
+ // ---------- Initializing -------------------------------------------------
+
+ /**
+ * Called at every page refresh, manages bean's initialization.
+ */
public boolean isInitialized()
{
boolean initialized = false;
@@ -82,8 +322,22 @@
return initialized;
}
+ /**
+ * Bean's attributes initialization.
+ *
+ * @throws Exception
+ */
private void execute() throws Exception
{
+ if ( this.bundle == null ) {
+ // Getting ResourceBundle with current Locale
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ UIViewRoot uiRoot = ctx.getViewRoot();
+ Locale locale = uiRoot.getLocale();
+ ClassLoader ldr = Thread.currentThread().getContextClassLoader();
+ this.bundle = ResourceBundle.getBundle("ResourceJSF", locale, ldr);
+ }
+
//parse input data
int topicId = -1;
String t = ForumUtil.getParameter(Constants.p_topicId);
@@ -96,6 +350,9 @@
if (topicId != -1) {
this.topic = BaseController.getForumsModule().findTopicById(new Integer(topicId));
}
+ if (checkboxes==null || checkboxes.size()!=topic.getPosts().size()) {
+ checkboxes = new HashMap();
+ }
}
}
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/classes/ResourceJSF.properties
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/classes/ResourceJSF.properties 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/classes/ResourceJSF.properties 2006-07-01 01:37:10 UTC (rev 4897)
@@ -1125,10 +1125,10 @@
ERR_DEST_FORUM=You have to select destination forum!
ERR_PERMISSION_VIOLATION=You don't have proper perrmisions - STOP HACKING!!!
ERR_NO_POST_SELECTED=You have not selected any posts to split.
+ERR_NO_SUBJECT_GIVEN=You have to give subject for new topic.
-
#
# Timezones ... for display on each page
#
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-07-01 01:37:10 UTC (rev 4897)
@@ -303,6 +303,7 @@
<managed-bean-class>org.jboss.portlet.forums.ui.action.SplitTopic</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+
<navigation-rule>
<from-view-id>/views/moderator/modcp_body.xhtml</from-view-id>
<navigation-case>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-07-01 01:37:10 UTC (rev 4897)
@@ -28,6 +28,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb">
+
<ui:composition template="/views/common/common.xhtml">
<ui:define name="mainContent">
<c:if test="#{moderator.initialized && moderator.forum!=null && moderator.forum.id!=-1}">
@@ -177,6 +178,7 @@
<table width="100%" cellspacing="2" border="0"
align="center" cellpadding="2">
<tr>
+
<!-- the current page number information -->
<c:if test="#{moderator.pageNavigator.totalPages gt 1}">
<td align="left" colspan="3">
@@ -191,6 +193,7 @@
</span>
</td>
</c:if>
+
<!-- page navigation -->
<c:if test="#{moderator.pageNavigator.totalPages gt 1}">
<td align="right" valign="middle" nowrap="nowrap">
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-06-30 19:41:00 UTC (rev 4896)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_split.xhtml 2006-07-01 01:37:10 UTC (rev 4897)
@@ -106,16 +106,18 @@
<td width="50%" align="center">
<h:commandButton action="${splitTopic.splitPosts}"
type="submit"
- class="liteoption"
- name="split_type_all"
- value="${resource.L_SPLIT_POSTS}"/>
+ class="liteoption"
+ value="${resource.L_SPLIT_POSTS}">
+ <f:param name="t" value="#{splitTopic.topic.id}"/>
+ </h:commandButton>
</td>
<td width="50%" align="center">
<h:commandButton action="${splitTopic.splitAfter}"
type="submit"
class="liteoption"
- name="split_type_beyond"
- value="${resource.L_SPLIT_AFTER}"/>
+ value="${resource.L_SPLIT_AFTER}">
+ <f:param name="t" value="#{splitTopic.topic.id}"/>
+ </h:commandButton>
</td>
</tr>
</table>
@@ -162,7 +164,7 @@
</table>
</td>
<td width="5%" align="center" class='${(status.index%2==0)?"row1":"row2"}'>
- <h:selectBooleanCheckbox value="#{splitTopic.checkboxes[postrow.id]}"/>
+ <h:selectBooleanCheckbox value="${splitTopic.checkboxes[postrow.id]}"/>
</td>
</tr>
<tr>
@@ -176,27 +178,35 @@
<table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="50%" align="center">
- <input class="liteoption" type="submit" name="split_type_all"
- value="${resource.L_SPLIT_POSTS}"/>
+ <h:commandButton action="${splitTopic.splitPosts}"
+ type="submit"
+ class="liteoption"
+ value="${resource.L_SPLIT_POSTS}">
+ <f:param name="t" value="#{splitTopic.topic.id}"/>
+ </h:commandButton>
</td>
<td width="50%" align="center">
- <input class="liteoption" type="submit" name="split_type_beyond"
- value="${resource.L_SPLIT_AFTER}"/>
+ <h:commandButton action="${splitTopic.splitAfter}"
+ type="submit"
+ class="liteoption"
+ value="${resource.L_SPLIT_AFTER}">
+ <f:param name="t" value="#{splitTopic.topic.id}"/>
+ </h:commandButton>
</td>
</tr>
</table>
</td>
</tr>
</table>
- <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
- <tr>
- <!-- integrate jumpbox here -->
- <td align="right" valign="top" nowrap="nowrap">
- <ui:include src="/views/jumpbox.xhtml"/>
- </td>
- </tr>
- </table>
</h:form>
+<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
+ <tr>
+ <!-- integrate jumpbox here -->
+ <td align="right" valign="top" nowrap="nowrap">
+ <ui:include src="/views/jumpbox.xhtml"/>
+ </td>
+ </tr>
+</table>
</forums:isAllowed>
</c:if>
|
|
From: <jbo...@li...> - 2006-06-30 19:41:08
|
Author: estebanschifman
Date: 2006-06-30 15:41:00 -0400 (Fri, 30 Jun 2006)
New Revision: 4896
Added:
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java
Modified:
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java
Log:
Added a utility class to drain queues and/or topics
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java 2006-06-30 19:15:02 UTC (rev 4895)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/Controller.java 2006-06-30 19:41:00 UTC (rev 4896)
@@ -37,10 +37,11 @@
Class[] oaTest =
{
- TestNotification.class
// TestParamsRepository.class
// ,TestPersonAddrPhone.class
// ,TestObjStore.class
+// ,TestNotification.class
+ DrainQueuesAndTopics.class
};
for (Class oCls : oaTest)
Added: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java 2006-06-30 19:15:02 UTC (rev 4895)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java 2006-06-30 19:41:00 UTC (rev 4896)
@@ -0,0 +1,92 @@
+package org.jboss.soa.esb.tests;
+
+import javax.jms.*;
+import javax.naming.*;
+
+import org.jboss.soa.esb.helpers.*;
+
+public class DrainQueuesAndTopics
+{
+ private static final int MAX_TIMES_NOMSG = 10;
+ private static final String JNDI_URL = "localhost";
+ private static final String JNDI_TYPE
+ = AppServerContext.SERVER_TYPE.jboss.toString();
+
+ private Context m_oCtx;
+
+ public DrainQueuesAndTopics() throws Exception
+ {
+ purgeQueueTopic("queue/A");
+ purgeQueueTopic("queue/B");
+ purgeQueueTopic("topic/testTopic");
+ } //__________________________________
+
+ public int purgeQueueTopic(String p_sName) throws Exception
+ {
+ int iRet = 0;
+ m_oCtx = AppServerContext.getServerContext(JNDI_TYPE,JNDI_URL);
+
+ System.out.println(p_sName);
+ MessageConsumer oCns = null;
+ switch(p_sName.toLowerCase().charAt(0))
+ { case 't' : oCns = getTopic(p_sName); break;
+ case 'q' : oCns = getQueue(p_sName); break;
+ }
+ if (null==oCns)
+ return 0;
+
+ for (int iNoRcv=0; iNoRcv < MAX_TIMES_NOMSG; )
+ { Message oMsg = oCns.receive(200);
+ if (null==oMsg)
+ { iNoRcv++;
+ System.out.print(".");
+ continue;
+ }
+ iRet++;
+ dumpMessage(oMsg);
+ iNoRcv = 0;
+ }
+ System.out.println();
+ return iRet;
+ } //__________________________________
+
+ void dumpMessage(Message pM)
+ {
+ System.out.println(pM);
+ } //__________________________________
+
+ QueueReceiver getQueue(String p_sJndi) throws Exception
+ {
+ QueueConnection oQconn = null;
+ QueueSession oQsess = null;
+ QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx
+ .lookup("ConnectionFactory");
+
+ oQconn = qcf.createQueueConnection();
+ oQsess = oQconn.createQueueSession(false
+ ,QueueSession.AUTO_ACKNOWLEDGE);
+ javax.jms.Queue oQueue
+ = (javax.jms.Queue) m_oCtx.lookup(p_sJndi);
+
+ QueueReceiver oRcv = oQsess.createReceiver(oQueue);
+ oQconn.start();
+ return oRcv;
+ } //__________________________________
+
+ TopicSubscriber getTopic(String p_sJndi) throws Exception
+ {
+ TopicConnection oTconn = null;
+ TopicSession oTsess = null;
+ TopicConnectionFactory qcf = (TopicConnectionFactory) m_oCtx
+ .lookup("ConnectionFactory");
+
+ oTconn = qcf.createTopicConnection();
+ oTsess = oTconn.createTopicSession(false
+ ,QueueSession.AUTO_ACKNOWLEDGE);
+ Topic oT = (Topic) m_oCtx.lookup(p_sJndi);
+
+ TopicSubscriber oRcv = oTsess.createSubscriber(oT);
+ oTconn.start();
+ return oRcv;
+ } //__________________________________
+} //____________________________________________________________________________
|
|
From: <jbo...@li...> - 2006-06-30 19:15:07
|
Author: estebanschifman
Date: 2006-06-30 15:15:02 -0400 (Fri, 30 Jun 2006)
New Revision: 4895
Modified:
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestObjStore.java
Log:
Changed to new format of calls to AppServerContext.getServerContext()
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-30 19:11:47 UTC (rev 4894)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-06-30 19:15:02 UTC (rev 4895)
@@ -24,6 +24,7 @@
import java.util.*;
import java.text.SimpleDateFormat;
+import org.jboss.soa.esb.common.EsbSysProps;
import org.jboss.soa.esb.helpers.*;
import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
import org.jboss.soa.esb.notification.*;
@@ -37,7 +38,6 @@
public class TestNotification
{
- private static final String JNDI_SERVER = "localhost";
private static InotificationHandler m_oH;
public TestNotification () throws Exception
@@ -46,7 +46,11 @@
static void performTest() throws Exception
{
// get a handle to your business delegate
- m_oH = NotificationHandlerFactory.getNotifHandler("remote",JNDI_SERVER);
+ m_oH = NotificationHandlerFactory.getNotifHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
DomElement oEl = new DomElement("MyFileList");
oEl.setAttr(NotificationList.TYPE,"OK");
Modified: labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestObjStore.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestObjStore.java 2006-06-30 19:11:47 UTC (rev 4894)
+++ labs/jbossesb/trunk/ESBCore/Tests/src/org/jboss/soa/esb/tests/TestObjStore.java 2006-06-30 19:15:02 UTC (rev 4895)
@@ -21,6 +21,7 @@
*/
package org.jboss.soa.esb.tests;
+import org.jboss.soa.esb.common.EsbSysProps;
import org.jboss.soa.esb.common.bizclasses.*;
import org.jboss.soa.esb.services.*;
@@ -30,7 +31,6 @@
public class TestObjStore
{
- private static final String JNDI_SERVER = "localhost";
private static IpersistHandler m_oH;
public TestObjStore () throws Exception
@@ -39,7 +39,11 @@
static void performTest() throws Exception
{
// get a handle to your business delegate
- m_oH = PersistHandlerFactory.getPersistHandler("remote",JNDI_SERVER);
+ m_oH = PersistHandlerFactory.getPersistHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
// request UID chunks for your own use
int[] ia = {10,20,30};
|
|
From: <jbo...@li...> - 2006-06-30 19:11:54
|
Author: estebanschifman
Date: 2006-06-30 15:11:47 -0400 (Fri, 30 Jun 2006)
New Revision: 4894
Modified:
labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/BatchHandlerFactory.java
labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java
labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/PersistHandlerFactory.java
Log:
Changed calls to new AppServerContext.GetServerContext() methods
Modified: labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/BatchHandlerFactory.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/BatchHandlerFactory.java 2006-06-30 19:09:30 UTC (rev 4893)
+++ labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/BatchHandlerFactory.java 2006-06-30 19:11:47 UTC (rev 4894)
@@ -33,20 +33,18 @@
private final static int LCL=0;
private final static int REM=1;
- public static IbatchHandler getBatchHandler(String p_sType, String p_sJndiServer)
- throws Exception
- { AppServerContext.SERVER_TYPE oSrvType
- = AppServerContext.SERVER_TYPE.JBoss;
-
- int iIndex = Arrays.binarySearch(s_saTypes,p_sType.toLowerCase());
+ public static IbatchHandler getBatchHandler
+ (String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
+ {
+ int iIndex = Arrays.binarySearch(s_saTypes,p_sLocRem.toLowerCase());
if (iIndex < 0) return null;
switch (iIndex)
{
case REM: return getBatchHandler
- (AppServerContext.getServerContext(oSrvType,p_sJndiServer));
+ (AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
case LCL: return new BatchHandlerBsDelegateLocal(new InitialContext());
}
- throw new Exception("Invalid Batch Handler Delegate <" + p_sType + ">");
+ throw new Exception("Invalid Batch Handler Delegate <" + p_sLocRem + ">");
} //__________________________________
public static IbatchHandler getBatchHandler(Context p_oCtx) throws Exception
Modified: labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java 2006-06-30 19:09:30 UTC (rev 4893)
+++ labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/NotificationHandlerFactory.java 2006-06-30 19:11:47 UTC (rev 4894)
@@ -36,19 +36,17 @@
private final static int REM=1;
public static InotificationHandler getNotifHandler
- (String p_sType, String p_sJndiServer) throws Exception
- { AppServerContext.SERVER_TYPE oSrvType
- = AppServerContext.SERVER_TYPE.JBoss;
-
- int iIndex = Arrays.binarySearch(s_saTypes,p_sType.toLowerCase());
+ (String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
+ {
+ int iIndex = Arrays.binarySearch(s_saTypes,p_sLocRem.toLowerCase());
if (iIndex < 0) return null;
switch (iIndex)
{
- case REM: return getNotifHandler(AppServerContext
- .getServerContext(oSrvType,p_sJndiServer));
+ case REM: return getNotifHandler
+ (AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
case LCL: return new NotifHandlerBsDelegateLocal(new InitialContext());
}
- throw new Exception("Invalid Notification Handler Delegate <" + p_sType + ">");
+ throw new Exception("Invalid Notification Handler Delegate <" + p_sLocRem + ">");
} //__________________________________
public static InotificationHandler getNotifHandler(Context p_oCtx) throws Exception
Modified: labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/PersistHandlerFactory.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/PersistHandlerFactory.java 2006-06-30 19:09:30 UTC (rev 4893)
+++ labs/jbossesb/trunk/ESBCore/EsbServices/src/org/jboss/soa/esb/services/PersistHandlerFactory.java 2006-06-30 19:11:47 UTC (rev 4894)
@@ -35,18 +35,17 @@
private final static int REM=1;
public static IpersistHandler getPersistHandler
- (String p_sType, String p_sJndiServer) throws Exception
- { AppServerContext.SERVER_TYPE oSrvType
- = AppServerContext.SERVER_TYPE.JBoss;
- int iIndex = Arrays.binarySearch(s_saTypes,p_sType.toLowerCase());
+ (String p_sLocRem, String p_sJndiType, String p_sJndiServer) throws Exception
+ {
+ int iIndex = Arrays.binarySearch(s_saTypes,p_sLocRem.toLowerCase());
if (iIndex < 0) return null;
switch (iIndex)
{
- case REM: return getPersistHandler(AppServerContext
- .getServerContext(oSrvType,p_sJndiServer));
+ case REM: return getPersistHandler
+ (AppServerContext.getServerContext(p_sJndiType,p_sJndiServer));
case LCL: return new PersistHandlerBsDelegateLocal(new InitialContext());
}
- throw new Exception("Invalid Persist Handler Delegate <" + p_sType + ">");
+ throw new Exception("Invalid Persist Handler Delegate <" + p_sLocRem + ">");
} //__________________________________
public static IpersistHandler getPersistHandler(Context p_oCtx) throws Exception
|
|
From: <jbo...@li...> - 2006-06-30 19:09:34
|
Author: estebanschifman
Date: 2006-06-30 15:09:30 -0400 (Fri, 30 Jun 2006)
New Revision: 4893
Modified:
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/helpers/AppServerContext.java
Log:
more server types added to the SERVER_TYPE typed enum.
TODO: Methods to obtain the JNDI context for these new types
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/helpers/AppServerContext.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/helpers/AppServerContext.java 2006-06-30 19:07:05 UTC (rev 4892)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/helpers/AppServerContext.java 2006-06-30 19:09:30 UTC (rev 4893)
@@ -47,7 +47,10 @@
public enum SERVER_TYPE
{
- JBoss
+ jboss
+ ,weblogic
+ ,websphere
+ ,oracle
};
// No public default constructor
@@ -57,8 +60,11 @@
* Equivalent to calling getServerContext(CTX_JBOSS);
*/
public static Context getServerContext(String p_sJndiServer)
- { return getServerContext(SERVER_TYPE.JBoss,p_sJndiServer); }
+ { return getServerContext(SERVER_TYPE.jboss,p_sJndiServer); }
+ public static Context getServerContext(String pType , String p_sJndiServer)
+ { return getServerContext(SERVER_TYPE.valueOf(pType),p_sJndiServer); }
+
/**
* Searches a predefined table of 'well known' app server types, and returns
* the corresponding naming context
@@ -67,7 +73,7 @@
public static Context getServerContext(SERVER_TYPE pType , String p_sJndiServer)
{
switch (pType)
- { case JBoss : return jbossContext(p_sJndiServer);
+ { case jboss : return jbossContext(p_sJndiServer);
}
return null;
|
|
From: <jbo...@li...> - 2006-06-30 19:07:12
|
Author: estebanschifman
Date: 2006-06-30 15:07:05 -0400 (Fri, 30 Jun 2006)
New Revision: 4892
Modified:
labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/common/EsbSysProps.java
Log:
Some getters renamed and the JNDI_SERVER_TYPE mnemonic
added to the org.jboss.soa.esb.common.EsbSysProps class
Modified: labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/common/EsbSysProps.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/common/EsbSysProps.java 2006-06-30 19:05:12 UTC (rev 4891)
+++ labs/jbossesb/trunk/ESBCore/EsbCommon/src/org/jboss/soa/esb/common/EsbSysProps.java 2006-06-30 19:07:05 UTC (rev 4892)
@@ -25,40 +25,47 @@
public class EsbSysProps
{
public static final String SMTP_HOST = "jbossEsb.mail.smtp.host";
+ public static final String SMTP_USERNAME = "jbossEsb.mail.smtp.user";
+ public static final String SMTP_PASSWORD = "jbossEsb.mail.smtp.password";
+ public static final String SMTP_PORT = "jbossEsb.mail.smtp.port";
+
+ public static final String JNDI_SERVER_TYPE = "jbossEsb.jndi.server.type";
+ public static final String JNDI_SERVER_URL = "jbossEsb.jndi.server.url";
+
+ public static final String PARAMS_REPOS_FACTORY_CLASS
+ = "jbossEsb.paramsRepository.factoryClass";
+ public static final String OBJECT_STORE_CONFIG_FILE
+ = "jbossEsb.objStore.configfile";
+
+
public static String getSmtpHost()
{ return System.getProperty(SMTP_HOST,"localhost");
}
- public static final String SMTP_USERNAME = "jbossEsb.mail.smtp.user";
public static String getSmtpUsername()
{ return System.getProperty(SMTP_USERNAME,"");
}
- public static final String SMTP_PASSWORD = "jbossEsb.mail.smtp.password";
public static String getSmtpPassword()
{ return System.getProperty(SMTP_PASSWORD,"");
}
- public static final String SMTP_PORT = "jbossEsb.mail.smtp.port";
public static String getSmtpPort()
{ return System.getProperty(SMTP_PORT,"25");
}
+ public static String getJndiServerType()
+ { return System.getProperty(JNDI_SERVER_TYPE,"jboss"); }
- public static final String JNDI_SERVER_URL = "jbossEsb.jndi.server";
- public static String getDefaultJndiServer()
+ public static String getJndiServerURL()
{ return System.getProperty(JNDI_SERVER_URL,"localhost"); }
- public static final String PARAMS_REPOS_FACTORY_CLASS
- = "jbossEsb.paramsRepository.factoryClass";
public static String getParamsReposFactoryClass()
{ return System.getProperty(PARAMS_REPOS_FACTORY_CLASS
- ,"org.jboss.soa.esb.parameters.DefaultReposFactory");
+ ,"org.jboss.soa.esb.parameters.DefaultReposFactory");
}
- public static final String OBJECT_STORE_CONFIG_FILE
- = "jbossEsb.objStore.configfile";
public static String getObjStoreConfigFile()
{ return System.getProperty(OBJECT_STORE_CONFIG_FILE);
}
|
|
From: <jbo...@li...> - 2006-06-30 19:05:18
|
Author: estebanschifman
Date: 2006-06-30 15:05:12 -0400 (Fri, 30 Jun 2006)
New Revision: 4891
Modified:
labs/jbossesb/trunk/ESBCore/EsbProcessors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java
Log:
Update calls to change Factory methods for Rosetta services.
J2EE container types have been added (weblogic,websphere,oracle)
to the org.jboss.soa.esb.helpers.AppServerContext class
Modified: labs/jbossesb/trunk/ESBCore/EsbProcessors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/EsbProcessors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java 2006-06-30 18:44:10 UTC (rev 4890)
+++ labs/jbossesb/trunk/ESBCore/EsbProcessors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java 2006-06-30 19:05:12 UTC (rev 4891)
@@ -72,9 +72,11 @@
private InotificationHandler m_oNotifH;
protected InotificationHandler getNotifHandler() throws Exception
{ if (null == m_oNotifH)
- { String sJndiServer = EsbSysProps.getDefaultJndiServer();
+ {
+ String sJndiType= EsbSysProps.getJndiServerType();
+ String sJndiURL = EsbSysProps.getJndiServerURL();
m_oNotifH = NotificationHandlerFactory.getNotifHandler
- ("remote",sJndiServer);
+ ("remote",sJndiType,sJndiURL);
}
return m_oNotifH;
} //________________________________
@@ -139,7 +141,10 @@
protected void postProcess() throws Exception
{ InotificationHandler oNH =
NotificationHandlerFactory.getNotifHandler
- ("remote",EsbSysProps.getDefaultJndiServer());
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
DomElement[] oaPost = m_oParms.getElementChildren(POSTPRC_ELEMENT);
for (int i1=0; i1<oaPost.length;i1++)
{ DomElement oCpy = oaPost[i1].cloneObj();
@@ -292,7 +297,11 @@
private IpersistHandler getPersistHandler() throws Exception
{ if (null == m_oPHandler)
m_oPHandler = PersistHandlerFactory
- .getPersistHandler("remote",EsbSysProps.getDefaultJndiServer());
+ .getPersistHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
return m_oPHandler;
} //________________________________
@@ -333,7 +342,11 @@
private IbatchHandler getBatchHandler() throws Exception
{ if (null == m_oBHandler)
m_oBHandler = BatchHandlerFactory
- .getBatchHandler("remote",EsbSysProps.getDefaultJndiServer());
+ .getBatchHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
return m_oBHandler;
} //________________________________
|
|
From: <jbo...@li...> - 2006-06-30 18:44:16
|
Author: estebanschifman Date: 2006-06-30 14:44:10 -0400 (Fri, 30 Jun 2006) New Revision: 4890 Added: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java Log: Better version of the DirListener class This one extends AbstractPoller. Several methods and parameters of the old DirListener have been moved to AbstractPoller Added: labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java =================================================================== --- labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java 2006-06-30 18:43:05 UTC (rev 4889) +++ labs/jbossesb/trunk/ESBCore/EsbListeners/src/org/jboss/soa/esb/listeners/BetterDirListener.java 2006-06-30 18:44:10 UTC (rev 4890) @@ -0,0 +1,215 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2006, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + + +package org.jboss.soa.esb.listeners; + +import java.io.*; +import java.net.*; +import org.jboss.soa.esb.util.*; +import org.jboss.soa.esb.helpers.*; +import org.jboss.soa.esb.processors.*; + +public class BetterDirListener extends AbstractPoller +{ + public static void main(String[] args) throws Exception + { + new BetterDirListener(args[0]); + } //________________________________ + + public static final String PARM_FILE_PROCESSOR_CLASS = "fileProcessorClass"; + public static final String PARM_INPUT_DIR = "inputDirURI"; + public static final String PARM_SUFFIX = "inputSuffix"; + + public BetterDirListener(String p_sParamsUid) throws Exception + { + super(p_sParamsUid); +// See superclass - It provides ability to request end by subscribing to a Topic + runUntilEndRequested(); + } //__________________________________ + + @Override + protected void executeOneCycle() throws Exception + { + String sAtt = m_oParms.getAttr(PARM_RELOAD_LTCY); + long lNewLoad = System.currentTimeMillis() + + ( (null != sAtt) ? (1000 * Integer.parseInt(sAtt)) : 180000); + DomElement[] oaParms = m_oParms.getAllElemChildren(); + + sAtt = m_oParms.getAttr(PARM_POLL_LTCY); + long lPollLtcy = (null != sAtt) + ? (1000 * Integer.parseInt(sAtt)) + : 20000; // if poll latency was not there, do it every 20 secs + + if (lPollLtcy < 3000) + lPollLtcy = 3000; // but not too often + + boolean bFirst = true; + while (System.currentTimeMillis() <= lNewLoad) + { + for (DomElement oCurr : oaParms) + { + super.oneScan(oCurr, bFirst); + } + long lSlack = lNewLoad - System.currentTimeMillis(); + if (lSlack < 0) + { + break; + } + if (waitForQuiesce(Math.min(lSlack, lPollLtcy))) + { m_bEndRequested = true; + return; + } + bFirst = false; + } + } //_________________________________________ + + @Override + protected GroupOfChilds newChildGroup(ThreadGroup pThG) throws Exception + { + return new MyChildGroup(pThG); + } //_________________________________________ + + private class MyChildGroup extends AbstractPoller.GroupOfChilds + { + private File m_oInpDir; + private FileFilter m_oFFilt; + + private MyChildGroup(ThreadGroup p_oThrGrp) throws Exception + { super(p_oThrGrp); + } //________________________________ + + @Override + protected void doYourJob(DomElement p_oP) throws Exception + { m_sb.setLength(m_iSbIni); + if (m_bError) + { + m_oLogger.warn(formatLogMsg(" Skipping execution due to previous errors")); + return; + } + checkParms(p_oP); + + File[] oaF = m_oInpDir.listFiles(m_oFFilt); + + for (File oFcurr : oaF) + { + if (m_iQthr >= m_iMaxThr) + { + m_oLogger.info(m_sb.append("Waiting for available threads").toString()); + Thread.sleep(5000); + break; + } + m_oChParms.rmvChildsByName(EsbAbstractProcessor.PARMS_THIS_INSTANCE); + DomElement oThisProc = new DomElement(EsbAbstractProcessor.PARMS_THIS_INSTANCE); + oThisProc.setAttr(ParamsFileProcessor.FPRC_FILENAME, oFcurr.getName()); + m_oChParms.addElemChild(oThisProc); + + new Thread(m_oThrGrp, + new OneChildProcess(m_oExecClass, this, m_oChParms)).start(); + Thread.sleep(500); + } + } + + protected void checkParms(DomElement p_oP) throws Exception + { + super.checkParms(p_oP); + String sAtt = p_oP.getAttr(PARM_MAX_THREADS); + + sAtt = m_oChParms.getAttr(PARM_INPUT_DIR); + if (null == sAtt) + { throw new Exception(formatLogMsg( + m_sb.append("Missing ").append(PARM_INPUT_DIR) + .append(" attribute in -parameters ") + .toString())); + } + m_oInpDir = new File(new URI(sAtt)); + if (!m_oInpDir.isDirectory()) + { throw new Exception(formatLogMsg( + m_sb.append(sAtt).append(" is not a directory").toString())); + } + if (!m_oInpDir.canRead()) + { throw new Exception(formatLogMsg( + m_sb.append("Can't read directory ").append(sAtt). + toString())); + } + + sAtt = m_oChParms.getAttr(PARM_SUFFIX); + if (null == sAtt) + { throw new Exception(formatLogMsg( + m_sb.append("Missing ").append(PARM_SUFFIX) + .append(" attribute in -parameters ") + .toString())); + } + + m_oFFilt = new FileEndsWith(sAtt); + + do + { + sAtt = p_oP.getAttr(PARM_FILE_PROCESSOR_CLASS); + m_oExecClass = null; + if (null == sAtt) + { throw new Exception(formatLogMsg( + m_sb.append("Missing actionClass attribute"). + toString())); + } + try + { + m_oExecClass = Class.forName(sAtt); + } + catch (ClassNotFoundException e) + { throw new Exception(formatLogMsg( + m_sb.append("Class ").append(sAtt) + .append(" not found in classpath").toString())); + } + try + { + m_oExecClass.getConstructor(new Class[] {DomElement.class}); + } + catch (NoSuchMethodException eN) + { throw new Exception(formatLogMsg( + m_sb.append("No appropriate constructor") + .append(" (DomElement) found for class").toString())); + } + } + while (false); + } //________________________________ + + + private class FileEndsWith implements FileFilter + { + String m_sSuffix; + FileEndsWith(String p_sEnd) throws Exception + { + m_sSuffix = p_sEnd; + if (EsbUtil.isNullString(m_sSuffix)) + throw new Exception("Must specify file extension"); + } //_________________________________________ + + public boolean accept(File p_f) + { return (p_f.isFile()) + ? p_f.toString().endsWith(m_sSuffix) + : false; + } //_________________________________________ + } //___________________________________________________ + } //______________________________________________________ + +} //____________________________________________________________________________ |