Author: richard.opalka(a)jboss.com
Date: 2011-09-10 10:08:21 -0400 (Sat, 10 Sep 2011)
New Revision: 14973
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/transport/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/io/
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.core.client.RemoteConnection.jms
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClient.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AsyncProcessRequest.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarJMSEndpoint.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarMessageBean.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarReplyEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarResponseMessageBean.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClient.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyToServlet.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/jmstransport/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/hornetq-jms.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/jboss-service.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/WEB-INF-jms/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/hornetq-jms.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/jboss-service.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wstools.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
Log:
[JBWS-3359] code review
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -47,8 +47,6 @@
targetAddress = targetAddress.toLowerCase();
if (targetAddress.startsWith("http"))
key = RemoteConnection.class.getName() + ".http";
- else if (targetAddress.startsWith("jms"))
- key = RemoteConnection.class.getName() + ".jms";
if (key == null)
throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_REMOTE_CONNETION", targetAddress));
Deleted:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/SOAPProtocolConnectionJMS.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-
-import javax.jms.BytesMessage;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import javax.xml.ws.addressing.EndpointReference;
-
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.soap.SOAPMessageMarshaller;
-import org.jboss.ws.core.soap.SOAPMessageUnMarshaller;
-
-/**
- * A SOAPConnection over JMS
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Jan-2008
- */
-public class SOAPProtocolConnectionJMS implements RemoteConnection
-{
- private static final ResourceBundle bundle =
BundleUtils.getBundle(SOAPProtocolConnectionJMS.class);
- private boolean waitForResponse;
-
- public UnMarshaller getUnmarshaller()
- {
- return new SOAPMessageUnMarshaller();
- }
-
- public Marshaller getMarshaller()
- {
- return new SOAPMessageMarshaller();
- }
-
- public MessageAbstraction invoke(MessageAbstraction reqMessage, Object endpoint,
boolean oneway) throws IOException
- {
- return this.invoke(reqMessage, endpoint, oneway, true);
- }
-
- public MessageAbstraction invoke(MessageAbstraction reqMessage, Object endpoint,
boolean oneway, boolean maintainSession) throws IOException
- {
- if (endpoint == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"GIVEN_ENDPOINT_CANNOT_BE_NULL"));
-
- // Get target address
- String targetAddress;
- if (endpoint instanceof EndpointInfo)
- {
- EndpointInfo epInfo = (EndpointInfo)endpoint;
- targetAddress = epInfo.getTargetAddress();
- }
- else if (endpoint instanceof EndpointReference)
- {
- EndpointReference epr = (EndpointReference)endpoint;
- targetAddress = epr.getAddress().toString();
- }
- else
- {
- targetAddress = endpoint.toString();
- }
-
- try
- {
- URI jmsURI = new URI(targetAddress);
- String uriHost = jmsURI.getHost();
- String uriPath = jmsURI.getPath();
-
- String reqQueueName = getURLProperty(jmsURI, "destinationName");
- if (reqQueueName == null)
- {
- reqQueueName = uriHost;
- if (uriPath != null && uriPath.length() > 0)
- reqQueueName += uriPath;
- }
-
- InitialContext context = new InitialContext();
- QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
- Queue reqQueue = (Queue)context.lookup(reqQueueName);
-
- QueueConnection con = connectionFactory.createQueueConnection();
- QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- con.start();
-
- ByteArrayOutputStream output = new ByteArrayOutputStream();
- getMarshaller().write(reqMessage, output);
- BytesMessage message = session.createBytesMessage();
- message.writeBytes(output.toByteArray());
-
- ResponseListener responseListener = null;
- if (oneway == false)
- {
- String resQueueName = getURLProperty(jmsURI, "replyToName");
- Queue resQueue = (Queue)context.lookup(resQueueName);
- QueueReceiver receiver = session.createReceiver(resQueue);
- responseListener = new ResponseListener();
- receiver.setMessageListener(responseListener);
- message.setJMSReplyTo(resQueue);
- waitForResponse = true;
- }
-
- QueueSender sender = session.createSender(reqQueue);
- sender.send(message);
- sender.close();
-
- MessageAbstraction resMessage = null;
- if (responseListener != null)
- {
- int timeout = 30000;
- while (waitForResponse && timeout > 0)
- {
- Thread.sleep(100);
- timeout -= 100;
- }
-
- ByteArrayInputStream bais = new
ByteArrayInputStream(responseListener.resMessage.getBytes());
- resMessage = (MessageAbstraction)getUnmarshaller().read(bais, null, null);
- }
-
- con.stop();
- session.close();
- con.close();
-
- return resMessage;
- }
- catch (RuntimeException ex)
- {
- throw ex;
- }
- catch (Exception ex)
- {
- IOException ioex = new IOException(ex.getMessage());
- ioex.initCause(ex);
- throw ioex;
- }
- }
-
- private String getURLProperty(URI uri, String key)
- {
- String retValue = null;
- String query = uri.getQuery();
- if (query != null)
- {
- StringTokenizer st = new StringTokenizer(query, "?:=");
- while (retValue == null && st.hasMoreTokens())
- {
- String propName = st.nextToken();
- String propValue = st.nextToken();
- if (propName.equals(key))
- retValue = propValue;
- }
- }
- return retValue;
- }
-
- public class ResponseListener implements MessageListener
- {
- public String resMessage;
-
- public void onMessage(Message msg)
- {
- TextMessage textMessage = (TextMessage)msg;
- try
- {
- resMessage = textMessage.getText();
- waitForResponse = false;
- }
- catch (Throwable t)
- {
- t.printStackTrace();
- }
- }
- }
-}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.core.jaxws.spi.http;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
+import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
+
import java.util.LinkedList;
import java.util.List;
@@ -46,7 +49,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect;
import org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect;
@@ -183,11 +185,12 @@
final ArchiveDeployment dep = (ArchiveDeployment)
NettyHttpServerAdapter.DEPLOYMENT_FACTORY.newDeployment(contextRoot, loader);
final org.jboss.wsf.spi.deployment.Endpoint endpoint =
NettyHttpServerAdapter.DEPLOYMENT_FACTORY.newHttpEndpoint(endpointClass.getName());
endpoint.setShortName(this.getEndpointRegistryPath(epImpl));
+ endpoint.setType(JAXWS_JSE);
((HttpEndpoint)endpoint).setURLPattern(epImpl.getPathWithoutContext());
dep.getService().addEndpoint(endpoint);
- endpoint.setType(EndpointType.JAXWS_JSE);
dep.setRootFile(new ResourceLoaderAdapter(loader));
- dep.setRuntimeClassLoader(loader);
+ dep.setRuntimeClassLoader(loader);
+ dep.setType(JAXWS);
dep.getService().setContextRoot(contextRoot);
// TODO: remove this properties hack
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.server;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsEndpoint;
+
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
@@ -74,7 +76,6 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
@@ -324,7 +325,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext instanceof SOAPMessageContextJAXWS)
{
- if ((EndpointType.JAXWS_JSE == ep.getType()) || (EndpointType.JAXWS_EJB3 ==
ep.getType()))
+ if (isJaxwsEndpoint(ep))
{
if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -34,7 +34,6 @@
import org.jboss.ws.core.client.HTTPRemotingConnection;
import org.jboss.ws.core.client.RemoteConnection;
import org.jboss.ws.core.client.SOAPProtocolConnectionHTTP;
-import org.jboss.ws.core.client.SOAPProtocolConnectionJMS;
/**
* SOAPConnection implementation
@@ -112,14 +111,6 @@
targetAddress = endpoint.toString();
}
- if (targetAddress.startsWith("jms"))
- {
- if (false == (remotingConnection instanceof SOAPProtocolConnectionJMS))
- {
- remotingConnection = new SOAPProtocolConnectionJMS();
- }
- }
-
return remotingConnection;
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.metadata.builder;
+import static org.jboss.ws.common.integration.WSHelper.isJseEndpoint;
+
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
@@ -46,7 +48,6 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ObjectNameFactory;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
@@ -73,15 +74,11 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
-import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
/** An abstract meta data builder.
*
@@ -202,27 +199,6 @@
idstr.append(ServerEndpointMetaData.SEPID_PROPERTY_CONTEXT + "=" +
context);
idstr.append("," + ServerEndpointMetaData.SEPID_PROPERTY_ENDPOINT +
"=" + linkName);
- // Add JMS destination JNDI name for MDB endpoints
- EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (apMetaData != null
- && (EndpointType.JAXWS_EJB3 == sepMetaData.getEndpoint().getType() ||
EndpointType.JAXRPC_EJB21 == sepMetaData.getEndpoint().getType()))
- {
- String ejbName = sepMetaData.getLinkName();
- if (ejbName == null)
- throw new WSException(BundleUtils.getMessage(bundle,
"CANNOT_GET_EJB_LINK"));
-
- EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
- if (beanMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle,
"CANNOT_GET_EJB_META_DATA", ejbName));
-
- if (beanMetaData instanceof MDBMetaData)
- {
- MDBMetaData mdMetaData = (MDBMetaData)beanMetaData;
- String jndiName = mdMetaData.getDestinationJndiName();
- idstr.append(",jms=" + jndiName);
- }
- }
-
return ObjectNameFactory.create(idstr.toString());
}
@@ -292,8 +268,7 @@
{
String transportGuarantee = null;
JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
- if (webMetaData != null
- && (EndpointType.JAXWS_JSE == sepMetaData.getEndpoint().getType() ||
EndpointType.JAXRPC_JSE == sepMetaData.getEndpoint().getType()))
+ if (webMetaData != null && isJseEndpoint(sepMetaData.getEndpoint()))
{
Map<String, String> servletMappings = webMetaData.getServletMappings();
String urlPattern = servletMappings.get(servletLink);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -139,7 +139,7 @@
serviceMetaData.setServiceName(wsdlEndpoint.getWsdlService().getName());
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- Endpoint ep = dep.getService().getEndpointByName(linkName);
+ Endpoint ep = dep.getService().getEndpointByName(linkName);
ServerEndpointMetaData sepMetaData = new
ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, Type.JAXRPC);
sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
sepMetaData.setLinkName(linkName);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -50,7 +50,7 @@
// provide logging
private final Logger log = Logger.getLogger(JAXWSMetaDataBuilderEJB3.class);
- protected Class annotatedClass;
+ protected Class<?> annotatedClass;
/** Build from webservices.xml
*/
@@ -69,9 +69,9 @@
ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
if (null == runtimeClassLoader)
throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"RUNTIME_LOADER_CANNOT_BE_NULL"));
- wsMetaData.setClassLoader(new DelegateClassLoader(runtimeClassLoader,
SecurityActions
- .getContextClassLoader()));
+ wsMetaData.setClassLoader(new DelegateClassLoader(runtimeClassLoader,
SecurityActions.getContextClassLoader()));
}
+
// The container objects below provide access to all of the ejb metadata
EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
Iterator<EJBMetaData> it = apMetaData.getEnterpriseBeans();
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.metadata.builder.jaxws;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
+
import java.util.ResourceBundle;
import org.jboss.logging.Logger;
@@ -30,8 +32,6 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
-import org.jboss.wsf.spi.deployment.EndpointTypeFilter;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -64,10 +64,10 @@
// For every bean
for (Endpoint ep : dep.getService().getEndpoints())
{
- if (EndpointType.JAXWS_JSE == ep.getType())
+ if (isJaxwsJseEndpoint(ep))
{
String shortName = ep.getShortName();
- Class beanClass = ep.getTargetBeanClass();
+ Class<?> beanClass = ep.getTargetBeanClass();
JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData,
beanClass, shortName);
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.metadata.builder.jaxws;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
+
import java.util.ResourceBundle;
import javax.jws.WebService;
@@ -29,7 +31,6 @@
import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.annotation.WebContext;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
@@ -104,7 +105,7 @@
if (anWebContext == null)
return;
- boolean isJSEEndpoint = WSHelper.isJaxwsJseDeployment(dep);
+ boolean isJSEEndpoint = isJaxwsJseDeployment(dep);
// context-root
if (anWebContext.contextRoot().length() > 0)
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -94,7 +94,7 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.deployment.EndpointState;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,10 +21,11 @@
*/
package org.jboss.wsf.stack.jbws;
+import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbEndpoint;
+
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInvokerEJB21;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -44,8 +45,7 @@
ServiceEndpointInvoker epInvoker =
ep.getAttachment(ServiceEndpointInvoker.class);
if (epInvoker == null)
{
-
- if (WSHelper.isJaxrpcEjbDeployment(dep))
+ if (isJaxrpcEjbEndpoint(ep))
{
epInvoker = new ServiceEndpointInvokerEJB21();
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -21,11 +21,16 @@
*/
package org.jboss.wsf.stack.jbws;
+import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxrpcJseDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
+
import java.util.ResourceBundle;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
@@ -52,27 +57,28 @@
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
{
- if (WSHelper.isJaxwsJseDeployment(dep))
+ if (isJaxwsJseDeployment(dep))
{
JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
umd = builder.buildMetaData((ArchiveDeployment)dep);
dep.addAttachment(UnifiedMetaData.class, umd);
}
- if (WSHelper.isJaxwsEjbDeployment(dep))
+ if (isJaxwsEjbDeployment(dep))
{
JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- if (WSHelper.isJaxrpcJseDeployment(dep) &&
!WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
+ if (isJaxrpcJseDeployment(dep) && !isJaxwsDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- else if (WSHelper.isJaxrpcEjbDeployment(dep) &&
!WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
+ else if (isJaxrpcEjbDeployment(dep) && !isJaxwsDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
+
dep.addAttachment(UnifiedMetaData.class, umd);
}
Deleted:
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.core.client.RemoteConnection.jms
===================================================================
---
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.core.client.RemoteConnection.jms 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.core.client.RemoteConnection.jms 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1 +0,0 @@
-org.jboss.ws.core.client.SOAPProtocolConnectionJMS
\ No newline at end of file
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wstools.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wstools.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wstools.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -33,7 +33,6 @@
<macro-wstools dest="jaxrpc/samples/exception/WEB-INF"
config="jaxrpc/samples/exception/wstools-config.xml"/>
<macro-wstools dest="jaxrpc/samples/handler/WEB-INF"
config="jaxrpc/samples/handler/wstools-config.xml"/>
<macro-wstools dest="jaxrpc/samples/holder/WEB-INF"
config="jaxrpc/samples/holder/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/jmstransport/META-INF"
config="jaxrpc/samples/jmstransport/wstools-config.xml"/>
<macro-wstools dest="jaxrpc/samples/jsr109ejb/doclit/META-INF"
config="jaxrpc/samples/jsr109ejb/doclit/wstools-config.xml"/>
<macro-wstools dest="jaxrpc/samples/jsr109ejb/rpclit/META-INF"
config="jaxrpc/samples/jsr109ejb/rpclit/wstools-config.xml"/>
<macro-wstools dest="jaxrpc/samples/jsr109pojo/doclit/WEB-INF"
config="jaxrpc/samples/jsr109pojo/doclit/wstools-config.xml"/>
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -191,52 +191,6 @@
</metainf>
</jar>
- <!-- jaxrpc-samples-jmstransport -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jmstransport.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxrpc/samples/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/samples/jmstransport/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jboss.xml"/>
- <include name="webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jmstransport-as6.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxrpc/samples/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/samples/jmstransport/META-INF">
- <include name="webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/samples/jmstransport/META-INF-AS6">
- <include name="ejb-jar.xml"/>
- <include name="jboss.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jmstransport.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-samples-jmstransport.jar"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/samples/jmstransport/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jmstransport-as6.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-samples-jmstransport-as6.jar"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/samples/jmstransport/META-INF-AS6">
- <include name="hornetq-jms.xml"/>
- </metainf>
- </jar>
-
<!-- jaxrpc-samples-jsr109ejb-rpc -->
<jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109ejb-rpc.jar">
<fileset dir="${tests.output.dir}/test-classes">
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -32,154 +32,6 @@
<include name="jboss.xml"/>
</metainf>
</jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/Client.class"/>
- </fileset>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-addressing.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/AsyncProcessRequest.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/dar/Bus.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarMessageBean.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarProcessor.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarRequest.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarResponse.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/Route.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ServiceRequest.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/dar/Stop.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/generated/reply/*.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
- <include name="jboss.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-queue-as6.sar">
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar">
- <include name="hornetq-jms.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-queue.sar">
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-addressing-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/AddressingClient.class"/>
- </fileset>
- </jar>
- <war
warfile="${tests.output.dir}/test-libs/jaxws-samples-dar-addressing-client.war"
webxml="${tests.output.dir}/test-resources/jaxws/samples/dar/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/generated/reply/*.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarReplyEndpointImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ReplyToServlet.class"/>
- </classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="wsdl/reply.wsdl"/>
- </webinf>
- </war>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/samples/dar/Bus.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarJMSEndpoint.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarProcessor.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarRequest.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarResponse.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/Route.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ServiceRequest.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/dar/Stop.class"/>
- </fileset>
- </jar>
- <war
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client.war"
webxml="${tests.output.dir}/test-resources/jaxws/samples/dar/WEB-INF-jms/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/dar/JMSClient.class"/>
- </classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/WEB-INF-jms">
- <include name="jboss-web.xml"/>
- </webinf>
- </war>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/dar/DarResponseMessageBean.class"/>
- </fileset>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-dar-jms-client.war"/>
- <include name="jaxws-samples-dar-jms-client.jar"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client-as6.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-dar-jms-client.war"/>
- <include name="jaxws-samples-dar-jms-client.jar"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
- <include name="hornetq-jms.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client-test.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-dar-jms-client.war"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client-test-as6.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-dar-jms-client.war"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
- <include name="hornetq-jms.xml"/>
- </metainf>
- </jar>
-
- <!-- jaxws-samples-jmstransport -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="wsdl/*.wsdl"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-jmstransport.jar"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport-as6.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJMSEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="wsdl/*.wsdl"/>
- <include name="hornetq-jms.xml"/>
- </metainf>
- </jar>
<!-- jaxws-samples-news -->
<jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-news-step1-newspaper.jar">
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClient.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClient.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClient.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,137 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Date;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Response;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.JAXWSAConstants;
-
-import org.jboss.test.ws.jaxws.samples.dar.generated.DarEndpoint;
-import org.jboss.test.ws.jaxws.samples.dar.generated.DarRequest;
-import org.jboss.test.ws.jaxws.samples.dar.generated.DarResponse;
-import org.jboss.test.ws.jaxws.samples.dar.generated.DarService;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-
-/**
- * DAR addressing client; invokes the DAR addressing endpoint (sync, asynch and oneway)
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-public class AddressingClient
-{
- protected DarEndpoint endpoint;
- protected String replyToHost;
-
- private static AddressingBuilder BUILDER;
- private static final String WSA_TO =
"http://org.jboss.test.ws.jaxws.samples.dar/server";
- private static final String WSA_ACTION =
"http://org.jboss.test.ws.jaxws.samples.dar/action/processIn";
- private static final String WSA_ACTION_ONEWAY =
"http://org.jboss.test.ws.jaxws.samples.dar/action/onewayProcessIn";
-
- static
- {
- BUILDER = AddressingBuilder.getAddressingBuilder();
- }
-
- public AddressingClient(URL url, String replyToHost)
- {
- DarService service = new DarService(url, new
QName("http://org.jboss.ws/samples/dar", "DarService"));
- endpoint = service.getDarEndpointPort();
- ((StubExt)endpoint).setConfigName("Standard WSAddressing Client");
- ClientHelper.setUsernamePassword((BindingProvider)endpoint, "kermit",
"thefrog");
- this.replyToHost = replyToHost;
- }
-
- public void run(boolean asynch) throws Exception
- {
- configureAddressingProperties((BindingProvider)endpoint, WSA_ACTION, WSA_TO,
"http://" + replyToHost + ":8080/dar-client/replyTo");
- DarRequest request = ClientHelper.getRequest();
- System.out.println(new Date() + " Sending request...");
- if (asynch)
- {
- Response<DarResponse> resp = endpoint.processAsync(request);
- System.out.println("Doing something interesting in the mean time... ;-)
");
- resp.get();
- }
- else
- {
- endpoint.process(request);
- }
- //don't care about the response: it is null since the real one went to the
replyTo address
- System.out.println(new Date() + " Done.");
- }
-
- public void runOneway() throws Exception
- {
- configureAddressingProperties((BindingProvider)endpoint, WSA_ACTION_ONEWAY, WSA_TO,
"http://" + replyToHost + ":8080/dar-client/replyService");
- DarRequest request = ClientHelper.getRequest();
- System.out.println(new Date() + " Sending request...");
- endpoint.onewayProcess(request);
- System.out.println(new Date() + " Done.");
- }
-
- private static void configureAddressingProperties(BindingProvider bp, String
wsaAction, String wsaTo, String replyTo) throws URISyntaxException
- {
- AddressingProperties requestProps =
AddressingClientUtil.createDefaultProps(wsaAction, wsaTo);
- AttributedURI messageId = AddressingClientUtil.createMessageID();
- System.out.println("Sent message ID: " + messageId.getURI());
- requestProps.setMessageID(messageId);
- requestProps.setReplyTo(BUILDER.newEndpointReference(new URI(replyTo)));
- bp.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
requestProps);
- }
-
- public static void main(String[] args)
- {
- try
- {
- if (args.length == 1)
- {
- AddressingClient client = new AddressingClient(new URL(args[0]),
"localhost");
- System.out.println("* Synchronous invocation: ");
- client.run(false);
- System.out.println("\n* Asynchronous invocation: ");
- client.run(true);
- System.out.println("\n* Oneway invocation: ");
- client.runOneway();
- }
- else
- {
- System.out.println("AddressingClient usage:");
- System.out.println("wsrunclient.sh -classpath AddressingClient.jar
org.jboss.test.ws.jaxws.samples.dar.AddressingClient
http://host:port/dar?wsdl");
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.net.URL;
-import java.util.Date;
-
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-
-import org.jboss.ws.common.ObjectNameFactory;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * DAR addressing client; invokes the DAR addressing endpoint (sync, asynch and oneway)
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Nov-2005
- */
-public class AddressingClientTestCase extends JBossWSTest
-{
- private static final int TEST_RUN_TIME = 6000;
-
- public static Test suite()
- {
- return new JBossWSTestSetup(AddressingClientTestCase.class,
JBossWSTestHelper.isTargetJBoss6()
- ?
"jaxws-samples-dar-queue-as6.sar,jaxws-samples-dar-addressing-client.war,jaxws-samples-dar-addressing.jar"
- :
"jaxws-samples-dar-queue.sar,jaxws-samples-dar-addressing-client.war,jaxws-samples-dar-addressing.jar");
- }
-
- public void testSync() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/dar?wsdl");
- AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
- Date start = new Date();
- try
- {
- client.run(true);
- }
- catch (Exception e)
- {
- if (e.getMessage().indexOf("return value can not be null") == -1)
- {
- throw e ;
- }
- // do nothing, ingore the expected WebServiceException, See JBWS2969
- }
- Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
- }
-
- public void testAsync() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/dar?wsdl");
- AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
- Date start = new Date();
- try
- {
- client.run(true);
- }
- catch (Exception e)
- {
- if (e.getMessage().indexOf("return value can not be null") == -1)
- {
- throw e ;
- }
- //do nothing, ingore the expected WebServiceException, See JBWS2969
- }
- Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
- }
-
- public void testOneWay() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/dar?wsdl");
- long count = getRequestCount("dar-client", "ReplyService");
- AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
- Date start = new Date();
- client.runOneway();
- Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() < TEST_RUN_TIME / 2);
- Thread.sleep(TEST_RUN_TIME);
- assertEquals(count + 1, getRequestCount("dar-client",
"ReplyService"));
- }
-
- private long getRequestCount(String context, String endpoint) throws Exception
- {
- ObjectName oname = ObjectNameFactory.create("jboss.ws:context=" + context
+ ",endpoint=" + endpoint);
- return (Long)getServer().getAttribute(oname, "RequestCount");
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AsyncProcessRequest.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AsyncProcessRequest.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AsyncProcessRequest.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.io.Serializable;
-import java.net.URI;
-
-public class AsyncProcessRequest implements Serializable
-{
- private DarRequest request;
- private URI replyTo;
- private URI messageId;
-
- public DarRequest getRequest()
- {
- return request;
- }
- public void setRequest(DarRequest request)
- {
- this.request = request;
- }
- public URI getReplyTo()
- {
- return replyTo;
- }
- public void setReplyTo(URI replyTo)
- {
- this.replyTo = replyTo;
- }
- public URI getMessageId()
- {
- return messageId;
- }
- public void setMessageId(URI messageId)
- {
- this.messageId = messageId;
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import javax.annotation.Resource;
-import javax.ejb.Stateless;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.naming.InitialContext;
-import javax.xml.ws.Action;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.annotation.EndpointConfig;
-import org.jboss.ws.api.annotation.AuthMethod;
-import org.jboss.ws.api.annotation.TransportGuarantee;
-import org.jboss.ws.api.annotation.WebContext;
-
-
-/**
- * Addressing endpoint; performs sync and async DAR route optimization
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-@Stateless
-@SOAPBinding
-(
- style = SOAPBinding.Style.RPC,
- use = SOAPBinding.Use.LITERAL
-)
-@WebService
-(
- name = "DarEndpoint",
- serviceName = "DarService",
- targetNamespace = "http://org.jboss.ws/samples/dar"
-)
-@WebContext
-(
- contextRoot = "/dar",
- urlPattern = "/*",
- authMethod = AuthMethod.BASIC,
- transportGuarantee = TransportGuarantee.NONE,
- secureWSDLAccess = false
-)
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
-public class DarAddressingEndpoint
-{
- @Resource
- private WebServiceContext ctx;
- private static Logger log = Logger.getLogger(DarAddressingEndpoint.class);
-
- @WebMethod(operationName = "process", action =
"http://org.jboss.test.ws.jaxws.samples.dar/action/processIn")
- @Action(input =
"http://org.jboss.test.ws.jaxws.samples.dar/action/processIn", output =
"http://org.jboss.test.ws.jaxws.samples.dar/action/processOut")
- public DarResponse process(DarRequest request)
- {
- DarProcessor processor = new DarProcessor();
- AddressingProperties props =
(AddressingProperties)ctx.getMessageContext().get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
- if (props!=null && props.getReplyTo()!=null)
- {
- System.out.println(props.getReplyTo().getAddress().getURI());
- }
- return processor.process(request);
- }
-
-
-
- @WebMethod(operationName = "onewayProcess", action =
"http://org.jboss.test.ws.jaxws.samples.dar/action/onewayProcessIn")
- @Action(input =
"http://org.jboss.test.ws.jaxws.samples.dar/action/onewayProcessIn")
- @Oneway
- public void onewayProcess(DarRequest request)
- {
- QueueConnection con = null;
- QueueSession queueSession =null;
- QueueSender sender = null;
- try {
- InitialContext context = new InitialContext();
- QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
- con = connectionFactory.createQueueConnection();
- queueSession = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- Queue queue = (Queue)context.lookup("queue/DarQueue");
- sender = queueSession.createSender(queue);
- AsyncProcessRequest asyncRequest = new AsyncProcessRequest();
- asyncRequest.setRequest(request);
- AddressingProperties props =
(AddressingProperties)ctx.getMessageContext().get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
- asyncRequest.setReplyTo(props.getReplyTo().getAddress().getURI());
- asyncRequest.setMessageId(props.getMessageID().getURI());
- ObjectMessage message = queueSession.createObjectMessage(asyncRequest);
- sender.send(message);
- log.info("AsyncProcessRequest sent...");
- } catch (Exception e) {
- throw new WebServiceException(e);
- } finally {
- try
- {
- sender.close();
- }
- catch(Exception e1) {}
- try
- {
- queueSession.close();
- }
- catch(Exception e1) {}
- try
- {
- con.close();
- }
- catch(Exception e1) {}
- }
-
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarJMSEndpoint.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarJMSEndpoint.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarJMSEndpoint.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.Message;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.transport.jms.JMSTransportSupportEJB3;
-import org.jboss.ws.api.annotation.WebContext;
-
-
-/**
- * Performs DAR route optimization
- *
- * @author alessio.soldano(a)jboss.com
- * @since 01-Feb-2008
- */
-@WebService (name = "DarEndpoint",
- targetNamespace = "http://org.jboss.ws/samples/dar",
- serviceName = "DarService")
-@WebContext(contextRoot="/dar")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-@MessageDriven(activationConfig = {
- @ActivationConfigProperty(propertyName = "destinationType", propertyValue
= "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/DarRequestQueue")
- },
- messageListenerInterface = javax.jms.MessageListener.class
-)
-public class DarJMSEndpoint extends JMSTransportSupportEJB3
-{
-
- private static final Logger log = Logger.getLogger(DarJMSEndpoint.class);
-
- @WebMethod(operationName = "process", action =
"http://org.jboss.test.ws.jaxws.samples.dar/action/processIn")
- public DarResponse process(DarRequest request)
- {
- DarProcessor processor = new DarProcessor();
- return processor.process(request);
- }
-
- @Override
- @WebMethod(exclude=true)
- public void onMessage(Message message)
- {
- log.debug("onMessage: " + message);
- super.onMessage(message);
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarMessageBean.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarMessageBean.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarMessageBean.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.net.URL;
-
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.Relationship;
-
-import org.jboss.logging.Logger;
-import org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-import org.jboss.ws.extensions.addressing.RelationshipImpl;
-
-/**
- * Get DAR requests from the queue, delegate to the DarProcessor and
- * send responses back to the client endpoints.
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-@MessageDriven( name="DarListener", activationConfig= {
-
@ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Queue"),
-
@ActivationConfigProperty(propertyName="destination",propertyValue="queue/DarQueue")}
-)
-public class DarMessageBean implements MessageListener
-{
- private static Logger log = Logger.getLogger(DarMessageBean.class);
- private static final String WSA_ACTION =
"http://org.jboss.test.ws.jaxws.samples.dar/action/receiveIn";
-
- public void onMessage(Message arg0)
- {
- try {
- ObjectMessage message = (ObjectMessage)arg0;
- AsyncProcessRequest asyncRequest = (AsyncProcessRequest)message.getObject();
- DarProcessor processor = new DarProcessor();
- DarResponse response = processor.process(asyncRequest.getRequest());
-
- //convert the response and send it to the client reply service
- org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse darResponse =
ReplyConverter.convertResponse(response);
- String replyTo = asyncRequest.getReplyTo().toURL().toString();
- log.info("Response will be sent to: " + replyTo);
- QName serviceName = new QName("http://org.jboss.ws/samples/dar",
"DarReplyService");
- Service service = Service.create(new URL(replyTo + "?wsdl"),
serviceName);
- DarReplyEndpoint endpoint =
(DarReplyEndpoint)service.getPort(DarReplyEndpoint.class);
-
- //setup addressing configuration and properties
- ((StubExt)endpoint).setConfigName("Standard WSAddressing Client");
-
((BindingProvider)endpoint).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
replyTo);
- AddressingProperties requestProps =
AddressingClientUtil.createOneWayProps(WSA_ACTION, replyTo);
- requestProps.setMessageID(AddressingClientUtil.createMessageID());
- Relationship[] relationships = new Relationship[1];
- relationships[0] = new RelationshipImpl(asyncRequest.getMessageId());
- requestProps.setRelatesTo(relationships);
-
((BindingProvider)endpoint).getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
requestProps);
-
- endpoint.receive(darResponse);
- log.info("Response sent.");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarReplyEndpointImpl.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarReplyEndpointImpl.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarReplyEndpointImpl.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.jws.soap.SOAPBinding.Use;
-import javax.xml.ws.Action;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-
-import org.jboss.logging.Logger;
-import org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint;
-import org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse;
-import org.jboss.test.ws.jaxws.samples.dar.generated.reply.Route;
-import org.jboss.test.ws.jaxws.samples.dar.generated.reply.Stop;
-import org.jboss.ws.api.annotation.EndpointConfig;
-
-/**
- * The client endpoint receiving DAR responses
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-@WebService(name = "DarReplyEndpoint",
- targetNamespace = "http://org.jboss.ws/samples/dar",
- endpointInterface =
"org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint",
- wsdlLocation = "/WEB-INF/wsdl/reply.wsdl",
- serviceName = "DarReplyService")
-@SOAPBinding(style = Style.RPC,
- use = Use.LITERAL)
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
-public class DarReplyEndpointImpl implements DarReplyEndpoint
-{
- @Resource
- private WebServiceContext ctx;
- private static Logger log = Logger.getLogger(DarReplyEndpointImpl.class);
-
- @WebMethod(action =
"http://org.jboss.test.ws.jaxws.samples.dar/action/receiveIn")
- @Oneway
- @Action(input =
"http://org.jboss.test.ws.jaxws.samples.dar/action/receiveIn")
- public void receive(DarResponse arg0)
- {
- AddressingProperties props =
(AddressingProperties)ctx.getMessageContext().get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
- log.info("Result received; relationship message id: " +
props.getRelatesTo()[0].getID());
- List<Route> routes = arg0.getRoutes();
- for (Route route : routes)
- {
- log.info(route.getBusId() + ": ");
- StringBuilder sb = new StringBuilder();
- for (Stop stop : route.getStops())
- {
- sb.append(stop.getNode() + " ");
- }
- log.info(sb.toString());
- }
- }
-
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarResponseMessageBean.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarResponseMessageBean.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarResponseMessageBean.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import org.jboss.logging.Logger;
-
-/**
- * Receives DAR responses through JMS
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-@MessageDriven(activationConfig = {
- @ActivationConfigProperty(propertyName = "destinationType", propertyValue
= "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/DarResponseQueue")
- },
- messageListenerInterface = javax.jms.MessageListener.class
-)
-public class DarResponseMessageBean
-{
- private Logger log = Logger.getLogger(DarResponseMessageBean.class);
-
- public void onMessage(Message arg0)
- {
- try
- {
- TextMessage textMessage = (TextMessage)arg0;
- String result = textMessage.getText();
- log.info("DAR response received: " + result);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClient.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClient.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClient.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,149 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.io.IOException;
-import java.io.PrintStream;
-
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-
-/**
- * DAR client; invokes the DAR JMS endpoint
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-public class JMSClient extends HttpServlet
-{
- private Logger log = Logger.getLogger(JMSClient.class);
-
- protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws ServletException, IOException {
- runMessageClient(new PrintStream(httpServletResponse.getOutputStream()));
- }
-
- private void runMessageClient(PrintStream ps)
- {
- String reqMessage = "<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- "<env:Header></env:Header>" +
- "<env:Body>" +
- "<ns1:process
xmlns:ns1='http://org.jboss.ws/samples/dar'>" +
- "<arg0>" +
- "<buses>" +
- "<capacity>10</capacity>" +
- "<id>Bus0</id>" +
- "</buses>" +
- "<buses>" +
- "<capacity>10</capacity>" +
- "<id>Bus1</id>" +
- "</buses>" +
- "<mapId>map1234</mapId>" +
- "<requests>" +
-
"<from><node>667</node><time>2008-02-01T14:25:12.114+01:00</time></from>"
+
- "<id>Req0</id>" +
- "<people>2</people>" +
-
"<to><node>17</node><time>2008-02-01T14:25:12.114+01:00</time></to>"
+
- "</requests>" +
- "<requests>" +
-
"<from><node>18</node><time>2008-02-01T14:25:12.114+01:00</time></from>"
+
- "<id>Req1</id>" +
- "<people>1</people>" +
-
"<to><node>575</node><time>2008-02-01T14:25:12.114+01:00</time></to>"
+
- "</requests>" +
- "<requests>" +
-
"<from><node>713</node><time>2008-02-01T14:25:12.114+01:00</time></from>"
+
- "<id>Req2</id>" +
- "<people>2</people>" +
-
"<to><node>845</node><time>2008-02-01T14:25:12.114+01:00</time></to>"
+
- "</requests>" +
- "<requests>" +
-
"<from><node>117</node><time>2008-02-01T14:25:12.114+01:00</time></from>"
+
- "<id>Req3</id>" +
- "<people>2</people>" +
-
"<to><node>140</node><time>2008-02-01T14:25:12.114+01:00</time></to>"
+
- "</requests>" +
- "<requests>" +
-
"<from><node>318</node><time>2008-02-01T14:25:12.114+01:00</time></from>"
+
- "<id>Req4</id>" +
- "<people>1</people>" +
-
"<to><node>57</node><time>2008-02-01T14:25:12.114+01:00</time></to>"
+
- "</requests>" +
- "</arg0>" +
- "</ns1:process>" +
- "</env:Body>" +
- "</env:Envelope>";
-
- QueueConnection con = null;
- QueueSession session = null;
- try
- {
- InitialContext context = new InitialContext();
- QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
- Queue reqQueue = (Queue)context.lookup("queue/DarRequestQueue");
- con = connectionFactory.createQueueConnection();
- session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- Queue resQueue = (Queue)context.lookup("queue/DarResponseQueue");
- con.start();
- TextMessage message = session.createTextMessage(reqMessage);
- message.setJMSReplyTo(resQueue);
- QueueSender sender = session.createSender(reqQueue);
- sender.send(message);
- sender.close();
- ps.println("Request message sent, doing something interesting in the mean
time... ;-) ");
- con.stop();
- }
- catch (Exception e)
- {
- e.printStackTrace(ps);
- }
- finally
- {
- try
- {
- session.close();
- }
- catch(Exception e1) {}
- try
- {
- con.close();
- }
- catch(Exception e1) {}
- }
- }
-
-
- protected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws ServletException, IOException {
- doGet(httpServletRequest,httpServletResponse);
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Date;
-
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Invokes the DAR JMS client
- *
- * @author alessio.soldano(a)jboss.org
- * @since 01-May-2008
- */
-public class JMSClientTestCase extends JBossWSTest
-{
- private static final int TEST_RUN_TIME = 6000;
-
- public static Test suite()
- {
- //TODO: replace isHornetQAvailable call with JBossWSTestHelper.isTargetJBoss6()
once AS 6 M3 is out and hence M2 is not supported anymore
- return new JBossWSTestSetup(JMSClientTestCase.class,
JBossWSTestHelper.isTargetJBoss6() ?
"jaxws-samples-dar-jms-client-test-as6.sar,jaxws-samples-dar-jms.jar" :
"jaxws-samples-dar-jms-client-test.sar,jaxws-samples-dar-jms.jar");
- }
-
- public void test() throws Exception
- {
- String url = "http://" + getServerHost() +
":8080/dar-jms-client/JMSClient";
- Date start = new Date();
- HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
- int responseCode = connection.getResponseCode();
- if (responseCode != HttpURLConnection.HTTP_OK)
- {
- fail("Cannot access JMSClient servlet, responseCode == " +
responseCode);
- }
- BufferedReader in = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
- StringBuffer buffer = new StringBuffer();
- String line;
- while ((line = in.readLine()) != null) {
- buffer.append(line + "\n");
- }
- assertTrue(buffer.toString().contains("Request message sent, doing something
interesting in the mean time... ;-) "));
- Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() < TEST_RUN_TIME / 2);
-
- //receive the message
- InitialContext context = new InitialContext();
- QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
- QueueConnection con = connectionFactory.createQueueConnection();
- QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- Queue resQueue = (Queue)context.lookup("queue/DarResponseQueue");
- con.start();
- MessageConsumer consumer = session.createConsumer(resQueue);
- TextMessage textMessage = (TextMessage)consumer.receive(TEST_RUN_TIME);
- String result = textMessage.getText();
- assertTrue(result != null);
- con.stop();
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-public class ReplyConverter
-{
- public static org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse
convertResponse(DarResponse response)
- {
- if (response == null)
- return null;
- org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse r = new
org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse();
- for (Route route : response.getRoutes())
- {
- r.getRoutes().add(convertRoute(route));
- }
- for (ServiceRequest request : response.getUnservedRequests())
- {
- r.getUnservedRequests().add(convertServiceRequest(request));
- }
- return r;
- }
-
- public static org.jboss.test.ws.jaxws.samples.dar.generated.reply.ServiceRequest
convertServiceRequest(ServiceRequest request)
- {
- if (request == null)
- return null;
- org.jboss.test.ws.jaxws.samples.dar.generated.reply.ServiceRequest s = new
org.jboss.test.ws.jaxws.samples.dar.generated.reply.ServiceRequest();
- s.setFrom(convertStop(request.getFrom()));
- s.setTo(convertStop(request.getTo()));
- s.setId(request.getId());
- s.setPeople(request.getPeople());
- return s;
- }
-
- public static org.jboss.test.ws.jaxws.samples.dar.generated.reply.Route
convertRoute(Route route)
- {
- if (route == null)
- return null;
- org.jboss.test.ws.jaxws.samples.dar.generated.reply.Route r = new
org.jboss.test.ws.jaxws.samples.dar.generated.reply.Route();
- r.setBusId(route.getBusId());
- for (Stop stop : route.getStops())
- {
- r.getStops().add(convertStop(stop));
- }
- return r;
- }
-
- public static org.jboss.test.ws.jaxws.samples.dar.generated.reply.Stop
convertStop(Stop stop)
- {
- if (stop == null)
- return null;
- org.jboss.test.ws.jaxws.samples.dar.generated.reply.Stop s = new
org.jboss.test.ws.jaxws.samples.dar.generated.reply.Stop();
- s.setNode(stop.getNode());
- GregorianCalendar cal = new GregorianCalendar();
- cal.setTime(stop.getTime());
- s.setTime(XMLGregorianCalendarHelper.convert(cal));
- return s;
- }
-}
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyToServlet.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyToServlet.java 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyToServlet.java 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.dar;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletException;
-import java.io.IOException;
-import java.io.BufferedReader;
-
-/**
- * A simple servlet sink receiving DAR responses.
- *
- * @author alessio.soldano(a)jboss.org
- * @since 31-Jan-2008
- */
-public class ReplyToServlet extends HttpServlet {
-
- protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws ServletException, IOException {
- dump(httpServletRequest, httpServletResponse);
- }
-
- protected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) throws ServletException, IOException {
- dump(httpServletRequest, httpServletResponse);
- }
-
- private void dump(HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) {
- System.out.println("ReplyTo sink:");
-
- try {
- BufferedReader reader = httpServletRequest.getReader();
- String inputLine;
-
- while ((inputLine = reader.readLine()) != null) {
- System.out.println(inputLine);
- }
- reader.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- httpServletResponse.setStatus(200);
- }
-}
-
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/hornetq-jms.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/hornetq-jms.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/hornetq-jms.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
- <queue name="DarRequestQueue">
- <entry name="/queue/DarRequestQueue"/>
- </queue>
- <queue name="DarResponseQueue">
- <entry name="/queue/DarResponseQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/jboss-service.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/jboss-service.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/META-INF/jboss-service.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server xmlns="urn:jboss:service:7.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
- <mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=DarRequestQueue">
- <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- </mbean>
- <mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=DarResponseQueue">
- <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- </mbean>
-</server>
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/hornetq-jms.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/hornetq-jms.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/hornetq-jms.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
- <queue name="DarQueue">
- <entry name="/queue/DarQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/jboss-service.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/jboss-service.xml 2011-09-10
13:49:46 UTC (rev 14972)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/dar/jboss-service.xml 2011-09-10
14:08:21 UTC (rev 14973)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server xmlns="urn:jboss:service:7.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
- <mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=DarQueue">
- <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- </mbean>
-</server>