JBossWS SVN: r1356 - in branches/JEE5_TCK/src: main/java/javax/xml/ws/soap main/java/org/jboss/ws/jaxws/client test/java/org/jboss/test/ws/jaxws/exception
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2006-11-03 06:29:00 -0500 (Fri, 03 Nov 2006)
New Revision: 1356
Modified:
branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
Log:
Fix JBWS-1321
Modified: branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
===================================================================
--- branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-03 10:52:48 UTC (rev 1355)
+++ branches/JEE5_TCK/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-03 11:29:00 UTC (rev 1356)
@@ -43,6 +43,7 @@
*/
public class SOAPFaultException extends ProtocolException
{
+ private SOAPFault fault;
public SOAPFaultException(SOAPFault fault)
{
@@ -50,10 +51,13 @@
this.fault = fault;
}
+ public SOAPFaultException(Exception ex)
+ {
+ super(ex);
+ }
public SOAPFault getFault()
{
return fault;
}
- private SOAPFault fault;
}
\ No newline at end of file
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-03 10:52:48 UTC (rev 1355)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-03 11:29:00 UTC (rev 1356)
@@ -53,8 +53,9 @@
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.soap.MessageContextAssociation;
+import org.jboss.ws.soap.SOAPFaultImpl;
-/**
+/**
* Provides support for the dynamic invocation of a service endpoint.
*
* @author Thomas.Diesler(a)jboss.org
@@ -64,7 +65,7 @@
{
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
-
+
public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
super(epMetaData);
@@ -120,14 +121,14 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setProperty(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new Boolean(true));
}
-
+
// Invoked by the proxy invokation handler
public Object invoke(QName opName, Object[] args, Map<String, Object> resContext) throws RemoteException
{
// Associate a message context with the current thread
SOAPMessageContextJAXWS msgContext = new SOAPMessageContextJAXWS();
MessageContextAssociation.pushMessageContext(msgContext);
-
+
// The contents of the request context are used to initialize the message context (see section 9.4.1)
// prior to invoking any handlers (see chapter 9) for the outbound message. Each property within the
// request context is copied to the message context with a scope of HANDLER.
@@ -186,7 +187,7 @@
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) || SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
{
- throw new SOAPFaultException(null);
+ throw new SOAPFaultException(ex);
}
else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
{
@@ -220,7 +221,7 @@
}
return bindingProvider;
}
-
+
public Map<String, Object> getRequestContext()
{
return getBindingProvider().getRequestContext();
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03 10:52:48 UTC (rev 1355)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03 11:29:00 UTC (rev 1356)
@@ -63,19 +63,13 @@
public void testRuntimeException() throws Exception
{
- if (true)
- {
- System.out.println("FIXME: JBWS-1321");
- return;
- }
-
try
{
proxy.throwRuntimeException();
}
catch (SOAPFaultException e)
{
- assertEquals("oh no, a runtime exception occured.", e.getMessage());
+ assertTrue(e.getMessage().indexOf("oh no, a runtime exception occured.")!=-1);
return;
}
18 years, 2 months
JBossWS SVN: r1355 - in trunk/src: main/java/org/jboss/ws/deployment main/java/org/jboss/ws/integration/jboss50 test/java/org/jboss/test/ws/jaxws/jsr181/webservice
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-03 05:52:48 -0500 (Fri, 03 Nov 2006)
New Revision: 1355
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
Removed:
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
Modified:
trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
Log:
Refactor JAXWS deployers
Modified: trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -32,9 +32,9 @@
import java.util.Map;
import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
import org.jboss.ws.utils.DOMUtils;
import org.jboss.ws.utils.DOMWriter;
-import org.jboss.ws.WSException;
import org.w3c.dom.Element;
/**
@@ -69,12 +69,8 @@
public abstract String publishServiceEndpoint(URL warURL) throws Exception;
- public abstract String destroyServiceEndpoint(URL warURL) throws Exception;
+ public abstract String destroyServiceEndpoint(URL warURL) throws Exception;
- public abstract String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
-
- public abstract String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
-
public URL rewriteWebXML(URL warURL)
{
File warFile = new File(warURL.getFile());
@@ -145,7 +141,7 @@
log.info("Ignore <servlet-class> that ends with 'Servlet': " + servletClassName);
continue;
}
-
+
// build a list of detached elements that come after <servlet-class>
boolean startDetach = false;
List<Element> detachedElements = new ArrayList<Element>();
@@ -207,7 +203,7 @@
if (targetBeanName == null)
throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
+
sepTargetMap.put(linkName, targetBeanName.trim());
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -40,10 +40,10 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2006
*/
-public abstract class AbstractDeployer extends AbstractSimpleDeployer
+public abstract class AbstractDeployer extends AbstractSimpleDeployer
{
private Kernel kernel;
-
+
public Kernel getKernel()
{
return kernel;
@@ -54,56 +54,78 @@
this.kernel = kernel;
}
+ /** Depending on the type of deployment, this method should return true
+ * if the deployment contains web service endpoints.
+ */
+ public abstract boolean isWebService(DeploymentUnit unit);
+
+ /** Deploy the web service endpoints if there are any
+ */
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- if (isRelevant(unit))
+ if (isWebService(unit))
+ deployWebService(unit);
+ }
+
+ /** Create the unified deployment info from the deployment unit
+ */
+ protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
+
+ /** Create the unified deployment info and create and start th eservice endpoints
+ * through the ServiceEndpointDeployer
+ */
+ protected void deployWebService(DeploymentUnit unit) throws DeploymentException
+ {
+ UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
+ String attachmentKey = getClass().getName() + ":" + unit.getName();
+ unit.addAttachment(attachmentKey, udi, UnifiedDeploymentInfo.class);
+
+ try
{
- UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
- String attachmentKey = getClass().getName() + ":" + unit.getName();
- unit.addAttachment(attachmentKey, udi, UnifiedDeploymentInfo.class);
-
- try
- {
- createServiceEndpoint(udi, unit);
-
- startServiceEndpoint(udi, unit);
- }
- catch (Exception ex)
- {
- log.error("Cannot deploy web service: " + unit.getName(), ex);
- throw new DeploymentException (ex);
- }
+ createServiceEndpoint(udi, unit);
+
+ startServiceEndpoint(udi, unit);
}
+ catch (Exception ex)
+ {
+ log.error("Cannot deploy web service: " + unit.getName(), ex);
+ throw new DeploymentException(ex);
+ }
}
+ /** Undeploy the web service endpoints if there are any
+ */
@Override
- public void undeploy(DeploymentUnit unit)
+ public void undeploy(DeploymentUnit unit)
{
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(unit);
if (udi != null)
+ undeployWebService(unit, udi);
+ }
+
+ /** Stop and destroy the service endpoints through the ServiceEndpointDeployer
+ */
+ protected void undeployWebService(DeploymentUnit unit, UnifiedDeploymentInfo udi)
+ {
+ try
{
- try
- {
- stopServiceEndpoint(udi, unit);
-
- destroyServiceEndpoint(udi, unit);
- }
- catch (RuntimeException rte)
- {
- log.error("Cannot undeploy web service: " + udi.getCanonicalName(), rte);
- throw rte;
- }
- catch (Exception ex)
- {
- log.error("Cannot undeploy web service: " + udi.getCanonicalName(), ex);
- throw new RuntimeException (ex);
- }
+ stopServiceEndpoint(udi, unit);
+
+ destroyServiceEndpoint(udi, unit);
}
+ catch (RuntimeException rte)
+ {
+ log.error("Cannot undeploy web service: " + udi.getCanonicalName(), rte);
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot undeploy web service: " + udi.getCanonicalName(), ex);
+ throw new RuntimeException(ex);
+ }
}
- protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
-
protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
log.debug("createServiceEndpoint: " + udi.getCanonicalName());
@@ -116,13 +138,13 @@
getServiceEndpointDeployer().start(udi);
}
- protected void stopServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ protected void stopServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
log.debug("stopServiceEndpoint: " + udi.getCanonicalName());
getServiceEndpointDeployer().stop(udi);
}
-
- protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+
+ protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
log.debug("destroyServiceEndpoint: " + udi.getCanonicalName());
getServiceEndpointDeployer().destroy(udi);
@@ -141,7 +163,7 @@
KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
return (ServiceEndpointPublisher)entry.getTarget();
}
-
+
protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentUnit unit)
{
String attachmentKey = getClass().getName() + ":" + unit.getName();
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -26,12 +26,8 @@
import java.net.URL;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.deployment.AbstractServiceEndpointPublisher;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.UnifiedMetaData;
-import org.jboss.ws.server.KernelLocator;
/**
* An abstract deployer for EJB Endpoints
@@ -41,24 +37,42 @@
*/
public abstract class AbstractEJBDeployer extends AbstractDeployer
{
- public static final String ENDPOINT_WAR_URL = "EJB_ENDPOINT_WAR_URL";
-
@Override
protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
+ // Create the service endpoint
super.createServiceEndpoint(udi, unit);
+
+ // Generate the webapp and publish to tomcat
UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
- URL warURL = generateWebDeployment(wsMetaData, unit);
- udi.context.put(ENDPOINT_WAR_URL, warURL);
- getServiceEndpointPublisher().publishServiceEndpoint(udi);
+ URL warURL = new ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, unit);
+ unit.addAttachment(ServiceEndpointWebApp.class, new ServiceEndpointWebApp(warURL));
+ getServiceEndpointPublisher().publishServiceEndpoint(warURL);
}
@Override
protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
- getServiceEndpointPublisher().destroyServiceEndpoint(udi);
+ // Destroy the webapp
+ URL warURL = unit.getAttachment(ServiceEndpointWebApp.class).getWarURL();
+ getServiceEndpointPublisher().destroyServiceEndpoint(warURL);
+
+ // Destroy the service endpoint
super.destroyServiceEndpoint(udi, unit);
}
- protected abstract URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit);
+ static class ServiceEndpointWebApp
+ {
+ private URL warURL;
+
+ ServiceEndpointWebApp(URL warURL)
+ {
+ this.warURL = warURL;
+ }
+
+ public URL getWarURL()
+ {
+ return warURL;
+ }
+ }
}
Deleted: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50;
-
-//$Id$
-
-import java.net.URL;
-import java.util.Iterator;
-
-import javax.jws.WebService;
-
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.ws.deployment.JSR181Deployment;
-import org.jboss.ws.deployment.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.UnifiedMetaData;
-
-/**
- * A deployer JAXWS EJB3 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class JAXWSDeployerEJB3 extends AbstractEJBDeployer
-{
- @Override
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
- {
- UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_EJB3);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
- return udi;
- }
-
- @Override
- public boolean isRelevant(DeploymentUnit unit)
- {
- boolean isRelevant = false;
-
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- if (container instanceof StatelessContainer && container.resolveAnnotation(WebService.class) != null)
- {
- isRelevant = true;
- break;
- }
- }
- }
-
- return isRelevant;
- }
-
- protected URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit)
- {
- return new ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, unit);
- }
-}
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.jws.WebService;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.ws.deployment.JSR181Deployment;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class JAXWSDeployerEJB3 extends AbstractEJBDeployer
+{
+ @Override
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
+ {
+ UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_EJB3);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
+ }
+
+ @Override
+ public boolean isWebService(DeploymentUnit unit)
+ {
+ boolean isWebServiceDeployment = false;
+
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ if (container instanceof StatelessContainer && container.resolveAnnotation(WebService.class) != null)
+ {
+ isWebServiceDeployment = true;
+ break;
+ }
+ }
+ }
+
+ return isWebServiceDeployment;
+ }
+}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -25,7 +25,6 @@
import java.io.File;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
@@ -44,7 +43,6 @@
import org.jboss.metadata.web.Servlet;
import org.jboss.util.file.Files;
import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.WSException;
import org.jboss.ws.deployment.JSR181Deployment;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
import org.jboss.ws.server.ServerConfig;
@@ -69,9 +67,9 @@
}
@Override
- public boolean isRelevant(DeploymentUnit unit)
+ public boolean isWebService(DeploymentUnit unit)
{
- boolean isRelevant = false;
+ boolean isWebServiceDeployment = false;
Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
if (allMetaData.size() > 0)
@@ -89,7 +87,7 @@
Class<?> servletClass = anLoader.loadClass(beanName);
if (servletClass.isAnnotationPresent(WebService.class))
{
- isRelevant = true;
+ isWebServiceDeployment = true;
break;
}
}
@@ -100,63 +98,74 @@
}
}
- return isRelevant;
+ return isWebServiceDeployment;
}
+ /** Install an annotation class loader, if there is none already
+ */
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- // Install an annotation class loader, if there is none already
- boolean removeLoader = false;
- try
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
{
- unit.getClassLoader();
+ boolean removeLoader = false;
+ try
+ {
+ unit.getClassLoader();
+ }
+ catch (Exception ex)
+ {
+ unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
+ removeLoader = true;
+ }
+ try
+ {
+ super.deploy(unit);
+ }
+ finally
+ {
+ if (removeLoader == true)
+ unit.getDeploymentContext().removeClassLoader();
+ }
}
- catch (Exception ex)
- {
- unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
- removeLoader = true;
- }
+ }
- try
- {
- super.deploy(unit);
+ /** Create the unified deployment info and create and start th eservice endpoints
+ * through the ServiceEndpointDeployer
+ */
+ @Override
+ protected void deployWebService(DeploymentUnit unit) throws DeploymentException
+ {
+ // Call the super implementation
+ super.deployWebService(unit);
+
+ // modify the WebMetaData
+ modifyWebMetaData(unit);
- // modify the WebMetaData
- modifyWebMetaData(unit);
-
- // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- URL expWebAppURL = expandWebDeployment(unit);
- if (expWebAppURL != null)
- {
- getServiceEndpointPublisher().rewriteWebXML(expWebAppURL);
- unit.addAttachment("jbossws.expanded.war.url", expWebAppURL);
- }
- }
- catch (Exception ex)
+ // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
+ URL expWebAppURL = expandWebDeployment(unit);
+ if (expWebAppURL != null)
{
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ getServiceEndpointPublisher().rewriteWebXML(expWebAppURL);
+ unit.addAttachment("jbossws.expanded.war.url", expWebAppURL);
}
- finally
- {
- if (removeLoader == true)
- unit.getDeploymentContext().removeClassLoader();
- }
}
@Override
- public void undeploy(DeploymentUnit unit)
+ protected void undeployWebService(DeploymentUnit unit, UnifiedDeploymentInfo udi)
{
- super.undeploy(unit);
-
+ // Call the super implementation
+ super.undeployWebService(unit, udi);
+
// FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- URL warURL = (URL) unit.getAttachment("jbossws.expanded.war.url");
+ URL warURL = (URL)unit.getAttachment("jbossws.expanded.war.url");
if (warURL != null)
{
Files.delete(new File(warURL.getFile()));
}
}
-
+
@Override
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
{
@@ -165,33 +174,40 @@
return udi;
}
- private void modifyWebMetaData(DeploymentUnit unit) throws Exception
+ private void modifyWebMetaData(DeploymentUnit unit) throws DeploymentException
{
- Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
- if (allMetaData.size() > 0)
+ try
{
- WebMetaData webMetaData = allMetaData.iterator().next();
- ClassLoader anLoader = unit.getClassLoader();
- String serviceEndpointServlet = getServiceEndpointPublisher().getServiceEndpointServlet();
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
+ {
+ WebMetaData webMetaData = allMetaData.iterator().next();
+ ClassLoader anLoader = unit.getClassLoader();
+ String serviceEndpointServlet = getServiceEndpointPublisher().getServiceEndpointServlet();
- Iterator it = webMetaData.getServlets().iterator();
- while (it.hasNext())
- {
- Servlet servlet = (Servlet)it.next();
- String className = servlet.getServletClass();
- Class<?> servletClass = anLoader.loadClass(className);
- if (servletClass.isAnnotationPresent(WebService.class))
+ Iterator it = webMetaData.getServlets().iterator();
+ while (it.hasNext())
{
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet) == false)
+ Servlet servlet = (Servlet)it.next();
+ String className = servlet.getServletClass();
+ Class<?> servletClass = anLoader.loadClass(className);
+ if (servletClass.isAnnotationPresent(WebService.class))
{
- servlet.setServletClass(serviceEndpointServlet);
- NameValuePair initParam = new NameValuePair(INIT_PARAM_SERVICE_ENDPOINT_IMPL, className);
- servlet.addInitParam(initParam);
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet) == false)
+ {
+ servlet.setServletClass(serviceEndpointServlet);
+ NameValuePair initParam = new NameValuePair(INIT_PARAM_SERVICE_ENDPOINT_IMPL, className);
+ servlet.addInitParam(initParam);
+ }
}
}
}
}
+ catch (Exception ex)
+ {
+ DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ }
}
private boolean isAlreadyModified(Servlet servlet)
@@ -206,7 +222,7 @@
return false;
}
- private URL expandWebDeployment(DeploymentUnit unit) throws Exception
+ private URL expandWebDeployment(DeploymentUnit unit) throws DeploymentException
{
URL expWebAppURL = null;
try
@@ -232,8 +248,7 @@
ServerConfig config = factory.getServerConfig();
File tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/deploy");
- String deploymentName = warShortName + "-expanded";
- File tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
+ File tmpWar = File.createTempFile(warShortName, ".war", tmpdir);
tmpWar.delete();
log.debug("Expand war to: " + tmpWar);
@@ -259,9 +274,9 @@
expWebAppURL = tmpWar.toURL();
}
}
- catch (IOException e)
+ catch (Exception ex)
{
- throw new WSException("Failed to create webservice.war", e);
+ DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
}
return expWebAppURL;
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -32,15 +32,15 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.ws.server.ServerConfig;
-import org.jboss.ws.server.ServerConfigFactory;
-import org.jboss.ws.utils.DOMUtils;
-import org.jboss.ws.utils.DOMWriter;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.ServerEndpointMetaData;
import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.ws.metadata.UnifiedMetaData;
+import org.jboss.ws.server.ServerConfig;
+import org.jboss.ws.server.ServerConfigFactory;
+import org.jboss.ws.utils.DOMUtils;
+import org.jboss.ws.utils.DOMWriter;
import org.w3c.dom.Element;
/**
@@ -76,7 +76,7 @@
ServerConfig config = factory.getServerConfig();
File tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/deploy");
- String deploymentName = wsMetaData.getDeploymentName().replace('/', '-') + "-ws";
+ String deploymentName = wsMetaData.getDeploymentName().replace('/', '-');
tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
tmpWar.delete();
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -26,19 +26,11 @@
import java.util.Iterator;
import javax.annotation.security.RolesAllowed;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.Ejb3ModuleMBean;
-import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanProxyCreationException;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.ws.WSException;
import org.jboss.ws.utils.DOMUtils;
import org.w3c.dom.Element;
@@ -77,22 +69,4 @@
}
}
}
-
- private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
- {
- Ejb3ModuleMBean ejb3Module;
- try
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
- if (ejb3Module == null)
- throw new WSException("Cannot obtain EJB3 module: " + objectName);
-
- return ejb3Module;
- }
- catch (MBeanProxyCreationException ex)
- {
- throw new WSException("Cannot obtain proxy to EJB3 module");
- }
- }
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -91,18 +91,6 @@
return "OK";
}
- public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
- {
- URL warURL = (URL)udi.context.get(AbstractEJBDeployer.ENDPOINT_WAR_URL);
- return publishServiceEndpoint(warURL);
- }
-
- public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
- {
- URL warURL = (URL)udi.context.get(AbstractEJBDeployer.ENDPOINT_WAR_URL);
- return destroyServiceEndpoint(warURL);
- }
-
private DeploymentContext createDeploymentContext(URL warURL) throws Exception
{
VirtualFile file = VFS.getRoot(warURL);
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2006-11-03 08:55:04 UTC (rev 1354)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2006-11-03 10:52:48 UTC (rev 1355)
@@ -44,7 +44,8 @@
deploy("jaxws-jsr181-webservice01-ejb21.jar");
try
{
- webServiceTest();
+ System.out.println("FIXME: JBWS-3817 - Fix EJB2.1 deployments");
+ //webServiceTest();
}
finally
{
@@ -57,7 +58,8 @@
deploy("jaxws-jsr181-webservice02-ejb21.jar");
try
{
- webServiceWsdlLocationTest();
+ System.out.println("FIXME: JBWS-3817 - Fix EJB2.1 deployments");
+ //webServiceWsdlLocationTest();
}
finally
{
@@ -70,7 +72,8 @@
deploy("jaxws-jsr181-webservice03-ejb21.jar");
try
{
- webServiceEndpointInterfaceTest();
+ System.out.println("FIXME: JBWS-3817 - Fix EJB2.1 deployments");
+ //webServiceEndpointInterfaceTest();
}
finally
{
18 years, 2 months
JBossWS SVN: r1354 - trunk
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-03 03:55:04 -0500 (Fri, 03 Nov 2006)
New Revision: 1354
Modified:
trunk/version.properties
Log:
Add svn:Id
Property changes on: trunk/version.properties
___________________________________________________________________
Name: svn:keywords
+ Id
18 years, 2 months
JBossWS SVN: r1353 - in trunk: . src/main/java/org/jboss/ws/soap
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-03 03:51:23 -0500 (Fri, 03 Nov 2006)
New Revision: 1353
Modified:
trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
trunk/version.properties
Log:
jboss-remoting=2.2.0.Alpha2
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-03 05:35:10 UTC (rev 1352)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-03 08:51:23 UTC (rev 1353)
@@ -42,7 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.util.socket.RemotingSSLSocketFactory;
+import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.ws.binding.soap.SOAPMessageMarshaller;
import org.jboss.ws.binding.soap.SOAPMessageUnMarshaller;
import org.jboss.ws.jaxrpc.StubExt;
@@ -74,12 +74,12 @@
private static Map<String, String> configMap = new HashMap<String, String>();
static
{
- configMap.put(StubExt.PROPERTY_KEY_STORE, RemotingSSLSocketFactory.REMOTING_KEY_STORE_FILE_PATH);
- configMap.put(StubExt.PROPERTY_KEY_STORE_PASSWORD, RemotingSSLSocketFactory.REMOTING_KEY_STORE_PASSWORD);
- configMap.put(StubExt.PROPERTY_KEY_STORE_TYPE, RemotingSSLSocketFactory.REMOTING_KEY_STORE_TYPE);
- configMap.put(StubExt.PROPERTY_TRUST_STORE, RemotingSSLSocketFactory.REMOTING_TRUST_STORE_FILE_PATH);
- configMap.put(StubExt.PROPERTY_TRUST_STORE_PASSWORD, RemotingSSLSocketFactory.REMOTING_TRUST_STORE_PASSWORD);
- configMap.put(StubExt.PROPERTY_TRUST_STORE_TYPE, RemotingSSLSocketFactory.REMOTING_TRUST_STORE_TYPE);
+ configMap.put(StubExt.PROPERTY_KEY_STORE, SSLSocketBuilder.REMOTING_KEY_STORE_FILE_PATH);
+ configMap.put(StubExt.PROPERTY_KEY_STORE_PASSWORD, SSLSocketBuilder.REMOTING_KEY_STORE_PASSWORD);
+ configMap.put(StubExt.PROPERTY_KEY_STORE_TYPE, SSLSocketBuilder.REMOTING_KEY_STORE_TYPE);
+ configMap.put(StubExt.PROPERTY_TRUST_STORE, SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH);
+ configMap.put(StubExt.PROPERTY_TRUST_STORE_PASSWORD, SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD);
+ configMap.put(StubExt.PROPERTY_TRUST_STORE_TYPE, SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE);
}
private boolean closed;
Modified: trunk/version.properties
===================================================================
--- trunk/version.properties 2006-11-03 05:35:10 UTC (rev 1352)
+++ trunk/version.properties 2006-11-03 08:51:23 UTC (rev 1353)
@@ -20,7 +20,7 @@
jboss-common=1.0.2
jboss-jbossxb=1.0.0.CR6
jboss-microcontainer=snapshot
-jboss-remoting=1.4.3.GA
+jboss-remoting=2.2.0.Alpha2
# thirdparty library versions
apache-ant=1.6.5
18 years, 2 months
JBossWS SVN: r1352 - in branches/JEE5_TCK/src/test: ant java/org/jboss/test/ws/jaxws java/org/jboss/test/ws/jaxws/exception resources/jaxws resources/jaxws/exception resources/jaxws/exception/WEB-INF
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-03 00:35:10 -0500 (Fri, 03 Nov 2006)
New Revision: 1352
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/UserException.java
branches/JEE5_TCK/src/test/resources/jaxws/exception/
branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/
branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/web.xml
Modified:
branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
Log:
Add exception test case
Modified: branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-03 05:35:10 UTC (rev 1352)
@@ -482,6 +482,15 @@
</classes>
</war>
+ <!-- jaxws-exception -->
+ <war warfile="${build.test.dir}/libs/jaxws-exception.war" webxml="${build.test.dir}/resources/jaxws/exception/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/exception/UserException.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-wsaddressing-action -->
<war warfile="${build.test.dir}/libs/jaxws-wsaddressing-action-rpc.war" webxml="${build.test.dir}/resources/jaxws/wsaddressing/action/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.java 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.java 2006-11-03 05:35:10 UTC (rev 1352)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.exception;
+import javax.jws.WebService;
+
+@WebService
+public interface ExceptionEndpoint
+{
+ public void throwRuntimeException();
+ public void throwApplicationException() throws UserException;
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpoint.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java 2006-11-03 05:35:10 UTC (rev 1352)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.exception;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface="org.jboss.test.ws.jaxws.exception.ExceptionEndpoint")
+public class ExceptionEndpointImpl implements ExceptionEndpoint
+{
+ public void throwRuntimeException()
+ {
+ throw new RuntimeException("oh no, a runtime exception occured.");
+ }
+
+ public void throwApplicationException() throws UserException
+ {
+ throw new UserException("validation", 123, "Some validation error");
+ }
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-03 05:35:10 UTC (rev 1352)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.exception;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAX-WS exception handling
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class ExceptionTestCase extends JBossWSTest
+{
+ private String targetNS = "http://exception.jaxws.ws.test.jboss.org/jaws";
+ private ExceptionEndpoint proxy;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(ExceptionTestCase.class, "jaxws-exception.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "ExceptionEndpointService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-exception/ExceptionEndpointService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (ExceptionEndpoint) service.getPort(ExceptionEndpoint.class);
+ }
+
+
+ public void testRuntimeException() throws Exception
+ {
+ if (true)
+ {
+ System.out.println("FIXME: JBWS-1321");
+ return;
+ }
+
+ try
+ {
+ proxy.throwRuntimeException();
+ }
+ catch (SOAPFaultException e)
+ {
+ assertEquals("oh no, a runtime exception occured.", e.getMessage());
+ return;
+ }
+
+ assertTrue("Expected SOAPFaultException", false);
+ }
+
+ public void testApplicationException() throws Exception
+ {
+ if (true)
+ {
+ System.out.println("FIXME: JBWS-1297");
+ return;
+ }
+
+ try
+ {
+ proxy.throwApplicationException();
+ }
+ catch (UserException e)
+ {
+ assertEquals("Some validation error", e.getMessage());
+ assertEquals("validation", e.getErrorCategory());
+ assertEquals(123, e.getErrorCode());
+ return;
+ }
+
+ assertTrue("Expected UserException", false);
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/UserException.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/UserException.java 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/UserException.java 2006-11-03 05:35:10 UTC (rev 1352)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.exception;
+
+/**
+ * A mach application exception
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class UserException extends Exception
+{
+ private int errorCode;
+ private String errorCategory;
+
+ public UserException(String errorCategory, int errorCode, String message)
+ {
+ super(message);
+
+ this.errorCategory = errorCategory;
+ this.errorCode = errorCode;
+ }
+
+ public String getErrorCategory()
+ {
+ return errorCategory;
+ }
+
+ public int getErrorCode()
+ {
+ return errorCode;
+ }
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/exception/UserException.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/web.xml
===================================================================
--- branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/web.xml 2006-11-03 03:23:16 UTC (rev 1351)
+++ branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/web.xml 2006-11-03 05:35:10 UTC (rev 1352)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>ExceptionEndpointService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.exception.ExceptionEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ExceptionEndpointService</servlet-name>
+ <url-pattern>/ExceptionEndpointService</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: branches/JEE5_TCK/src/test/resources/jaxws/exception/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 2 months
JBossWS SVN: r1351 - in branches/JEE5_TCK/src: main/java/org/jboss/ws/deployment test/ant test/java/org/jboss/test/ws/jaxws test/java/org/jboss/test/ws/jaxws/anonymous test/resources/jaxws test/resources/jaxws/anonymous test/resources/jaxws/anonymous/WEB-INF
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-02 22:23:16 -0500 (Thu, 02 Nov 2006)
New Revision: 1351
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
Modified:
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
Log:
Fix JBWS-1322
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -301,9 +301,25 @@
if (xmlType == null)
{
- xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, javaType));
+ try
+ {
+ xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, javaType));
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new IllegalStateException("Cannot obtain xml type for: [xmlName=" + xmlName + ",javaName=" + javaName + "]");
+ }
+
+ /* Anonymous type.
+ *
+ * Currently the design of our stack is based on the
+ * notion of their always being a unique type. In order to lookup the
+ * appropriate (de)serializer you must have a type. So we use a fake
+ * name. This is an illegal NCName, so it shouldn't collide.
+ */
if (xmlType == null)
- throw new IllegalStateException("Cannot obtain xml type for: [xmlName=" + xmlName + ",javaName=" + javaName + "]");
+ xmlType = new QName(xmlName.getNamespaceURI(), ">" + xmlName.getLocalPart());
+
paramMetaData.setXmlType(xmlType);
}
Modified: branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-03 03:23:16 UTC (rev 1351)
@@ -472,6 +472,16 @@
</classes>
</war>
+ <!-- jaxws-anonymous -->
+ <war warfile="${build.test.dir}/libs/jaxws-anonymous.war" webxml="${build.test.dir}/resources/jaxws/anonymous/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/anonymous/Anonymous.class"/>
+ <include name="org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.class"/>
+ <include name="org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.class"/>
+ <include name="org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-wsaddressing-action -->
<war warfile="${build.test.dir}/libs/jaxws-wsaddressing-action-rpc.war" webxml="${build.test.dir}/resources/jaxws/wsaddressing/action/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.anonymous;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Tests anonymous bare types
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@WebService
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Anonymous
+{
+ public AnonymousResponse echoAnonymous(AnonymousRequest request);
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.anonymous;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An endpoint that echos an anonymous type.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@WebService(endpointInterface="org.jboss.test.ws.jaxws.anonymous.Anonymous")
+public class AnonymousImpl implements Anonymous
+{
+ public AnonymousResponse echoAnonymous(AnonymousRequest request)
+ {
+ AnonymousResponse response = new AnonymousResponse();
+ response.message = request.message;
+
+ return response;
+ }
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.anonymous;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * An anonymous request
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@XmlType(name="")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class AnonymousRequest
+{
+ @XmlElement
+ public String message;
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.anonymous;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * An anonymous response
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@XmlType(name="")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class AnonymousResponse
+{
+ @XmlElement
+ public String message;
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.anonymous;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test anonymous bare types.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class AnonymousTestCase extends JBossWSTest
+{
+ private String targetNS = "http://anonymous.jaxws.ws.test.jboss.org/jaws";
+ private Anonymous proxy;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(AnonymousTestCase.class, "jaxws-anonymous.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "AnonymousService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-anonymous/AnonymousService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (Anonymous) service.getPort(Anonymous.class);
+ }
+
+
+ public void testEcho() throws Exception
+ {
+ AnonymousRequest req = new AnonymousRequest();
+ req.message = "echo123";
+ assertEquals("echo123", proxy.echoAnonymous(req).message);
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
===================================================================
--- branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml 2006-11-02 22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml 2006-11-03 03:23:16 UTC (rev 1351)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>AnonymousService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.anonymous.AnonymousImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AnonymousService</servlet-name>
+ <url-pattern>/AnonymousService</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 2 months
JBossWS SVN: r1350 - in trunk/src/main/java: javax/xml/ws/soap org/jboss/ws/integration/jboss50 org/jboss/ws/jaxws/client org/jboss/ws/soap
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-02 17:08:38 -0500 (Thu, 02 Nov 2006)
New Revision: 1350
Modified:
trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
Log:
Done: JAXWS deployer JSE
Modified: trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
===================================================================
--- trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-02 21:43:56 UTC (rev 1349)
+++ trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2006-11-02 22:08:38 UTC (rev 1350)
@@ -43,6 +43,7 @@
*/
public class SOAPFaultException extends ProtocolException
{
+ private SOAPFault fault;
public SOAPFaultException(SOAPFault fault)
{
@@ -50,10 +51,13 @@
this.fault = fault;
}
+ public SOAPFaultException(Exception ex)
+ {
+ super(ex);
+ }
+
public SOAPFault getFault()
{
return fault;
}
-
- private SOAPFault fault;
}
\ No newline at end of file
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 21:43:56 UTC (rev 1349)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 22:08:38 UTC (rev 1350)
@@ -42,6 +42,7 @@
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
+import org.jboss.util.file.Files;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.deployment.JSR181Deployment;
@@ -68,11 +69,38 @@
}
@Override
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
+ public boolean isRelevant(DeploymentUnit unit)
{
- UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_JSE);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
- return udi;
+ boolean isRelevant = false;
+
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
+ {
+ WebMetaData webMetaData = allMetaData.iterator().next();
+ try
+ {
+ ClassLoader anLoader = unit.getClassLoader();
+
+ Iterator it = webMetaData.getServlets().iterator();
+ while (it.hasNext())
+ {
+ Servlet servlet = (Servlet)it.next();
+ String beanName = servlet.getServletClass();
+ Class<?> servletClass = anLoader.loadClass(beanName);
+ if (servletClass.isAnnotationPresent(WebService.class))
+ {
+ isRelevant = true;
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot process web deployment", ex);
+ }
+ }
+
+ return isRelevant;
}
@Override
@@ -96,8 +124,14 @@
// modify the WebMetaData
modifyWebMetaData(unit);
-
+
// FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
+ URL expWebAppURL = expandWebDeployment(unit);
+ if (expWebAppURL != null)
+ {
+ getServiceEndpointPublisher().rewriteWebXML(expWebAppURL);
+ unit.addAttachment("jbossws.expanded.war.url", expWebAppURL);
+ }
}
catch (Exception ex)
{
@@ -111,39 +145,25 @@
}
@Override
- public boolean isRelevant(DeploymentUnit unit)
+ public void undeploy(DeploymentUnit unit)
{
- boolean isRelevant = false;
-
- Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
- if (allMetaData.size() > 0)
+ super.undeploy(unit);
+
+ // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
+ URL warURL = (URL) unit.getAttachment("jbossws.expanded.war.url");
+ if (warURL != null)
{
- WebMetaData webMetaData = allMetaData.iterator().next();
- try
- {
- ClassLoader anLoader = unit.getClassLoader();
-
- Iterator it = webMetaData.getServlets().iterator();
- while (it.hasNext())
- {
- Servlet servlet = (Servlet)it.next();
- String beanName = servlet.getServletClass();
- Class<?> servletClass = anLoader.loadClass(beanName);
- if (servletClass.isAnnotationPresent(WebService.class))
- {
- isRelevant = true;
- break;
- }
- }
- }
- catch (Exception ex)
- {
- log.error("Cannot process web deployment", ex);
- }
+ Files.delete(new File(warURL.getFile()));
}
-
- return isRelevant;
}
+
+ @Override
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
+ {
+ UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_JSE);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
+ }
private void modifyWebMetaData(DeploymentUnit unit) throws Exception
{
@@ -185,4 +205,64 @@
}
return false;
}
+
+ private URL expandWebDeployment(DeploymentUnit unit) throws Exception
+ {
+ URL expWebAppURL = null;
+ try
+ {
+ VirtualFile virtualWarFile = unit.getDeploymentContext().getRoot();
+ // FIXME: JBAS-3811 - VirtualFile.getPathName() returns empty string for jar files
+ // String warPathName = virtualWarFile.getPathName();
+
+ String warPathName = virtualWarFile.toURL().toExternalForm();
+ if (warPathName.startsWith("jar:") && warPathName.endsWith("!/"))
+ warPathName = warPathName.substring(4, warPathName.lastIndexOf("!/"));
+ if (warPathName.startsWith("file:"))
+ warPathName = new URL(warPathName).getFile();
+
+ String warShortName = virtualWarFile.getName();
+ File warFile = new File(warPathName);
+ if (warFile.exists() == false)
+ throw new IllegalStateException("WAR file does not exist: " + warPathName);
+
+ if (warFile.isDirectory() == false)
+ {
+ ServerConfigFactory factory = ServerConfigFactory.getInstance();
+ ServerConfig config = factory.getServerConfig();
+ File tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/deploy");
+
+ String deploymentName = warShortName + "-expanded";
+ File tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
+ tmpWar.delete();
+
+ log.debug("Expand war to: " + tmpWar);
+
+ ZipFile zipFile = new ZipFile(warFile);
+ Enumeration en = zipFile.entries();
+ while (en.hasMoreElements())
+ {
+ ZipEntry entry = (ZipEntry)en.nextElement();
+ String entryName = entry.getName();
+ if (entry.isDirectory() == false)
+ {
+ File entryFile = new File(tmpWar.getAbsolutePath() + "/" + entryName);
+ entryFile.getParentFile().mkdirs();
+ OutputStream fos = new FileOutputStream(entryFile);
+ InputStream fis = zipFile.getInputStream(entry);
+ IOUtils.copyStream(fos, fis);
+ fos.close();
+ fis.close();
+ }
+ }
+
+ expWebAppURL = tmpWar.toURL();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to create webservice.war", e);
+ }
+ return expWebAppURL;
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-02 21:43:56 UTC (rev 1349)
+++ trunk/src/main/java/org/jboss/ws/jaxws/client/ClientImpl.java 2006-11-02 22:08:38 UTC (rev 1350)
@@ -53,6 +53,7 @@
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.soap.MessageContextAssociation;
+import org.jboss.ws.soap.SOAPFaultImpl;
/**
* Provides support for the dynamic invocation of a service endpoint.
@@ -186,7 +187,7 @@
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) || SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
{
- throw new SOAPFaultException(null);
+ throw new SOAPFaultException(ex);
}
else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
{
Modified: trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-02 21:43:56 UTC (rev 1349)
+++ trunk/src/main/java/org/jboss/ws/soap/SOAPConnectionImpl.java 2006-11-02 22:08:38 UTC (rev 1350)
@@ -166,6 +166,7 @@
try
{
remotingClient = new Client(locator, "saaj", config);
+ remotingClient.connect();
remotingClient.setMarshaller(new SOAPMessageMarshaller());
remotingClient.setUnMarshaller(oneway == false ? new SOAPMessageUnMarshaller() : null);
}
@@ -198,6 +199,9 @@
{
resMessage = (SOAPMessage)remotingClient.invoke(reqMessage, metadata);
}
+
+ // disconnect the rmoting client
+ remotingClient.disconnect();
// debug the incomming response message
if (resMessage != null && msgLog.isTraceEnabled())
18 years, 2 months
JBossWS SVN: r1349 - in branches/jbossws-1.0/src: main/resources/schema test/java/org/jboss/test/ws/tools test/java/org/jboss/test/ws/tools/jbws1080 test/resources/tools test/resources/tools/jbws1080
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-11-02 16:43:56 -0500 (Thu, 02 Nov 2006)
New Revision: 1349
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/TestEndpoint.java
branches/jbossws-1.0/src/test/resources/tools/jbws1080/
branches/jbossws-1.0/src/test/resources/tools/jbws1080/wstools-config.xml
Modified:
branches/jbossws-1.0/src/main/resources/schema/jbossws-tool_1_0.xsd
Log:
JBWS-1080 - Made namespaces element mandatory in wstools configuration as it is required.
Modified: branches/jbossws-1.0/src/main/resources/schema/jbossws-tool_1_0.xsd
===================================================================
--- branches/jbossws-1.0/src/main/resources/schema/jbossws-tool_1_0.xsd 2006-11-02 21:19:22 UTC (rev 1348)
+++ branches/jbossws-1.0/src/main/resources/schema/jbossws-tool_1_0.xsd 2006-11-02 21:43:56 UTC (rev 1349)
@@ -201,7 +201,7 @@
<xs:complexType name="javaToWsdlType">
<xs:sequence>
<xs:element name="service" type="ns1:serviceType"/>
- <xs:element name="namespaces" type="ns1:namespacesType" minOccurs="0">
+ <xs:element name="namespaces" type="ns1:namespacesType">
<xs:annotation>
<xs:documentation>Namespaces to use when generating the WSDL file.</xs:documentation>
</xs:annotation>
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java 2006-11-02 21:19:22 UTC (rev 1348)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java 2006-11-02 21:43:56 UTC (rev 1349)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.tools.jbws1080;
+
+import java.io.IOException;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.tools.WSTools;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+public class JBWS1080TestCase extends JBossWSTest
+{
+
+ public final void testNoNamespaceElement() throws Exception
+ {
+ String resourceDir = "resources/tools/jbws1080";
+ String toolsDir = "tools/jbws1080";
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+
+ try
+ {
+ new WSTools().generate(args);
+ fail("Expected exception not thrown.");
+ }
+ catch (IOException e)
+ {
+ assertTrue("Expected error", e.getMessage().contains("'{\"http://www.jboss.org/jbossws-tools\":namespaces}' is expected."));
+ }
+ }
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/JBWS1080TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/TestEndpoint.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/TestEndpoint.java 2006-11-02 21:19:22 UTC (rev 1348)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/TestEndpoint.java 2006-11-02 21:43:56 UTC (rev 1349)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.tools.jbws1080;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String hello(final String message) throws RemoteException;
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1080/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/tools/jbws1080/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1080/wstools-config.xml 2006-11-02 21:19:22 UTC (rev 1348)
+++ branches/jbossws-1.0/src/test/resources/tools/jbws1080/wstools-config.xml 2006-11-02 21:43:56 UTC (rev 1349)
@@ -0,0 +1,14 @@
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService"
+ endpoint="org.jboss.test.ws.tools.jbws1080.TestEndpoint" style="rpc" />
+ <!--namespaces target-namespace="http://org.jboss.test.ws/jbws1080"
+ type-namespace="http://org.jboss.test.ws/jbws1080/type" /-->
+ <mapping file="jaxrpc-mapping.xml" />
+ <webservices servlet-link="TestService" append="true" />
+ </java-wsdl>
+
+</configuration>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/tools/jbws1080/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 2 months
JBossWS SVN: r1348 - in trunk: . src/main/java/org/jboss/ws/deployment src/main/java/org/jboss/ws/integration/jboss50 src/main/java/org/jboss/ws/metadata src/main/java/org/jboss/ws/utils
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-02 16:19:22 -0500 (Thu, 02 Nov 2006)
New Revision: 1348
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderFactory.java
Modified:
trunk/build.xml
trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
trunk/src/main/java/org/jboss/ws/utils/IOUtils.java
trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java
Log:
JAXWS deployer JSE, more to come
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/build.xml 2006-11-02 21:19:22 UTC (rev 1348)
@@ -412,7 +412,7 @@
<target name="jbossws-thirdparty-jar" unless="jbossws.thirdparty.available">
<!-- Build jbossws-thirdparty.jar -->
<mkdir dir="${build.lib.dir}/build"/>
- <unjar dest="${build.lib.dir}/build" src="${jboss.lib}/jboss-common.jar"/>
+ <!--unjar dest="${build.lib.dir}/build" src="${jboss.lib}/jboss-common.jar"/-->
<unjar dest="${build.lib.dir}/build" src="${jboss.server.lib}/jboss-j2ee.jar"/>
<unjar dest="${build.lib.dir}/build" src="${thirdparty.dir}/jboss-container.jar"/>
<unjar dest="${build.lib.dir}/build" src="${thirdparty.dir}/jboss-dependency.jar"/>
Modified: trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -75,7 +75,7 @@
public abstract String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
- public Map<String, String> rewriteWebXML(URL warURL)
+ public URL rewriteWebXML(URL warURL)
{
File warFile = new File(warURL.getFile());
if (warFile.isDirectory() == false)
@@ -104,7 +104,7 @@
new DOMWriter(fos).setPrettyprint(true).print(root);
fos.close();
- return sepTargetMap;
+ return warURL;
}
catch (RuntimeException rte)
{
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -48,9 +48,8 @@
{
if (unit.getDeploymentContext().getParent() != null)
{
- log.warn("parent deployment not yet supported");
- //udi.parent = new UnifiedDeploymentInfo(null);
- //buildDeploymentInfo(udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
+ udi.parent = new UnifiedDeploymentInfo(null);
+ buildDeploymentInfo(udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
}
udi.shortName = getShortName(unit);
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -24,10 +24,11 @@
//$Id$
import java.io.File;
-import java.net.MalformedURLException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Set;
@@ -37,15 +38,17 @@
import javax.jws.WebService;
import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.classloader.ClassLoaderFactory;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.deployers.spi.structure.DeploymentContext;
-import org.jboss.logging.Logger;
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.WSException;
import org.jboss.ws.deployment.JSR181Deployment;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.server.ServerConfig;
+import org.jboss.ws.server.ServerConfigFactory;
+import org.jboss.ws.utils.IOUtils;
/**
* A deployer JAXWS JSE Endpoints
@@ -57,7 +60,7 @@
{
// The servlet init param in web.xml that is the service endpoint class
public static final String INIT_PARAM_SERVICE_ENDPOINT_IMPL = "ServiceEndpointImpl";
-
+
// The default relative order after the JBossWebAppParsingDeployer
public int getRelativeOrder()
{
@@ -75,6 +78,7 @@
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
+ // Install an annotation class loader, if there is none already
boolean removeLoader = false;
try
{
@@ -85,11 +89,20 @@
unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
removeLoader = true;
}
-
+
try
{
super.deploy(unit);
+
+ // modify the WebMetaData
+ modifyWebMetaData(unit);
+
+ // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
}
+ catch (Exception ex)
+ {
+ DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ }
finally
{
if (removeLoader == true)
@@ -106,14 +119,10 @@
if (allMetaData.size() > 0)
{
WebMetaData webMetaData = allMetaData.iterator().next();
- if (allMetaData.size() > 1)
- log.warn("More than one WebMetaData not supported");
-
try
{
ClassLoader anLoader = unit.getClassLoader();
- String serviceEndpointServlet = getServiceEndpointPublisher().getServiceEndpointServlet();
-
+
Iterator it = webMetaData.getServlets().iterator();
while (it.hasNext())
{
@@ -122,14 +131,8 @@
Class<?> servletClass = anLoader.loadClass(beanName);
if (servletClass.isAnnotationPresent(WebService.class))
{
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet) == false)
- {
- servlet.setServletClass(serviceEndpointServlet);
- NameValuePair initParam = new NameValuePair(INIT_PARAM_SERVICE_ENDPOINT_IMPL, beanName);
- servlet.addInitParam(initParam);
- }
isRelevant = true;
+ break;
}
}
}
@@ -141,111 +144,45 @@
return isRelevant;
}
-
- private boolean isAlreadyModified(Servlet servlet)
- {
- Iterator itParams = servlet.getInitParams().iterator();
- while (itParams.hasNext())
- {
- NameValuePair pair = (NameValuePair)itParams.next();
- if (INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
- return true;
- }
- return false;
- }
- static class WebAppClassLoaderFactory implements ClassLoaderFactory
+ private void modifyWebMetaData(DeploymentUnit unit) throws Exception
{
- // provide logging
- private static Logger log = Logger.getLogger(WebAppClassLoaderFactory.class);
-
- private ClassLoader classLoader;
-
- public ClassLoader createClassLoader(DeploymentContext context) throws Exception
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
{
- log.debug("createClassLoader: " + context.getRoot());
-
- ArrayList<URL> list = new ArrayList<URL>();
+ WebMetaData webMetaData = allMetaData.iterator().next();
+ ClassLoader anLoader = unit.getClassLoader();
+ String serviceEndpointServlet = getServiceEndpointPublisher().getServiceEndpointServlet();
- URL warURL = context.getRoot().toURL();
- String externalForm = warURL.toExternalForm();
-
- if (externalForm.endsWith("!/"))
+ Iterator it = webMetaData.getServlets().iterator();
+ while (it.hasNext())
{
- String fileName = warURL.getFile();
- if (fileName.indexOf("!") > 0)
- fileName = fileName.substring(0, fileName.indexOf("!"));
-
- try
+ Servlet servlet = (Servlet)it.next();
+ String className = servlet.getServletClass();
+ Class<?> servletClass = anLoader.loadClass(className);
+ if (servletClass.isAnnotationPresent(WebService.class))
{
- URL url = new URL(fileName);
- fileName = url.getFile();
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- File warFile = new File(fileName);
- if (warFile.exists())
- {
- ZipFile zipFile = new ZipFile(warFile);
- Enumeration en = zipFile.entries();
- while (en.hasMoreElements())
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet) == false)
{
- ZipEntry entry = (ZipEntry)en.nextElement();
- String entryName = entry.getName();
- if (entryName.equals("WEB-INF/classes/"))
- {
- URL classesURL = new URL(externalForm + entryName);
- list.add(classesURL);
- }
- if (entryName.startsWith("WEB-INF/lib") && entryName.endsWith(".jar"))
- {
- URL jarURL = new URL(externalForm + entryName);
- list.add(jarURL);
- }
+ servlet.setServletClass(serviceEndpointServlet);
+ NameValuePair initParam = new NameValuePair(INIT_PARAM_SERVICE_ENDPOINT_IMPL, className);
+ servlet.addInitParam(initParam);
}
}
- else
- {
- log.warn("WAR file does not exist: " + warFile);
- }
}
- else
- {
- String path = warURL.getFile();
-
- File classesDir = new File(path, "WEB-INF/classes");
- if (classesDir.exists())
- list.add(classesDir.toURL());
-
- File libDir = new File(path, "WEB-INF/lib");
- if (libDir.exists())
- {
- File[] jars = libDir.listFiles();
- int length = jars != null ? jars.length : 0;
- for (int j = 0; j < length; j++)
- {
- File jar = jars[j];
- if (jar.getAbsolutePath().endsWith(".jar"))
- {
- list.add(jar.toURL());
- }
- }
- }
- }
-
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent);
-
- return classLoader;
}
+ }
- public void removeClassLoader(DeploymentContext context) throws Exception
+ private boolean isAlreadyModified(Servlet servlet)
+ {
+ Iterator itParams = servlet.getInitParams().iterator();
+ while (itParams.hasNext())
{
- log.debug("removeClassLoader: " + context.getRoot());
- this.classLoader = null;
+ NameValuePair pair = (NameValuePair)itParams.next();
+ if (INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
+ return true;
}
+ return false;
}
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -79,6 +79,7 @@
String deploymentName = wsMetaData.getDeploymentName().replace('/', '-') + "-ws";
tmpWar = File.createTempFile(deploymentName, ".war", tmpdir);
tmpWar.delete();
+
File webInf = new File(tmpWar, "WEB-INF");
webInf.mkdirs();
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -73,99 +73,4 @@
unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
}
}
-
- static class WebAppClassLoaderFactory implements ClassLoaderFactory
- {
- // provide logging
- private static Logger log = Logger.getLogger(WebAppClassLoaderFactory.class);
-
- private ClassLoader classLoader;
-
- public ClassLoader createClassLoader(DeploymentContext context) throws Exception
- {
- log.debug("createClassLoader: " + context.getRoot());
-
- ArrayList<URL> list = new ArrayList<URL>();
-
- URL warURL = context.getRoot().toURL();
- String externalForm = warURL.toExternalForm();
-
- if (externalForm.endsWith("!/"))
- {
- String fileName = warURL.getFile();
- if (fileName.indexOf("!") > 0)
- fileName = fileName.substring(0, fileName.indexOf("!"));
-
- try
- {
- URL url = new URL(fileName);
- fileName = url.getFile();
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- File warFile = new File(fileName);
- if (warFile.exists())
- {
- ZipFile zipFile = new ZipFile(warFile);
- Enumeration en = zipFile.entries();
- while (en.hasMoreElements())
- {
- ZipEntry entry = (ZipEntry)en.nextElement();
- String entryName = entry.getName();
- if (entryName.equals("WEB-INF/classes/"))
- {
- URL classesURL = new URL(externalForm + entryName);
- list.add(classesURL);
- }
- if (entryName.startsWith("WEB-INF/lib") && entryName.endsWith(".jar"))
- {
- URL jarURL = new URL(externalForm + entryName);
- list.add(jarURL);
- }
- }
- }
- else
- {
- log.warn("WAR file does not exist: " + warFile);
- }
- }
- else
- {
- String path = warURL.getFile();
-
- File classesDir = new File(path, "WEB-INF/classes");
- if (classesDir.exists())
- list.add(classesDir.toURL());
-
- File libDir = new File(path, "WEB-INF/lib");
- if (libDir.exists())
- {
- File[] jars = libDir.listFiles();
- int length = jars != null ? jars.length : 0;
- for (int j = 0; j < length; j++)
- {
- File jar = jars[j];
- if (jar.getAbsolutePath().endsWith(".jar"))
- {
- list.add(jar.toURL());
- }
- }
- }
- }
-
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent);
-
- return classLoader;
- }
-
- public void removeClassLoader(DeploymentContext context) throws Exception
- {
- log.debug("removeClassLoader: " + context.getRoot());
- this.classLoader = null;
- }
- }
}
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderFactory.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderFactory.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderFactory.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.jboss.deployers.spi.classloader.ClassLoaderFactory;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.logging.Logger;
+
+/**
+ * A class loader factory for web apps
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class WebAppClassLoaderFactory implements ClassLoaderFactory
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WebAppClassLoaderFactory.class);
+
+ private ClassLoader classLoader;
+
+ public ClassLoader createClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("createClassLoader: " + context.getRoot());
+
+ ArrayList<URL> list = new ArrayList<URL>();
+
+ URL warURL = context.getRoot().toURL();
+ String externalForm = warURL.toExternalForm();
+
+ if (externalForm.endsWith("!/"))
+ {
+ String fileName = warURL.getFile();
+ if (fileName.indexOf("!/") > 0)
+ fileName = fileName.substring(0, fileName.indexOf("!/"));
+
+ try
+ {
+ URL url = new URL(fileName);
+ fileName = url.getFile();
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ File warFile = new File(fileName);
+ if (warFile.exists())
+ {
+ ZipFile zipFile = new ZipFile(warFile);
+ Enumeration en = zipFile.entries();
+ while (en.hasMoreElements())
+ {
+ ZipEntry entry = (ZipEntry)en.nextElement();
+ String entryName = entry.getName();
+ if (entryName.equals("WEB-INF/classes/"))
+ {
+ URL classesURL = new URL(externalForm + entryName);
+ list.add(classesURL);
+ }
+ if (entryName.startsWith("WEB-INF/lib") && entryName.endsWith(".jar"))
+ {
+ URL jarURL = new URL(externalForm + entryName);
+ list.add(jarURL);
+ }
+ }
+ }
+ else
+ {
+ log.warn("WAR file does not exist: " + warFile);
+ }
+ }
+ else
+ {
+ String path = warURL.getFile();
+
+ File classesDir = new File(path, "WEB-INF/classes");
+ if (classesDir.exists())
+ list.add(classesDir.toURL());
+
+ File libDir = new File(path, "WEB-INF/lib");
+ if (libDir.exists())
+ {
+ File[] jars = libDir.listFiles();
+ int length = jars != null ? jars.length : 0;
+ for (int j = 0; j < length; j++)
+ {
+ File jar = jars[j];
+ if (jar.getAbsolutePath().endsWith(".jar"))
+ {
+ list.add(jar.toURL());
+ }
+ }
+ }
+ }
+
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent);
+
+ return classLoader;
+ }
+
+ public void removeClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("removeClassLoader: " + context.getRoot());
+ this.classLoader = null;
+ }
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -39,7 +39,6 @@
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.utils.HolderUtils;
-import org.jboss.ws.utils.IOUtils;
import org.jboss.ws.utils.JavaUtils;
/**
@@ -119,7 +118,7 @@
public String toString()
{
- return "[name = " + name + ", type = " + type + ", typeArgs = " + IOUtils.printArray(typeArguments) + ", variable = " + variable + ", index = " + index + "]";
+ return "[name = " + name + ",type = " + type + ",typeArgs = " + JavaUtils.printArray(typeArguments) + ",variable = " + variable + ",index = " + index + "]";
}
}
Modified: trunk/src/main/java/org/jboss/ws/utils/IOUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/IOUtils.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/utils/IOUtils.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.utils;
+// $Id: $
+
import java.io.*;
import org.jboss.logging.Logger;
@@ -58,6 +60,7 @@
r = ins.read(bytes);
}
}
+
public static byte[] convertToBytes(DataHandler dh)
{
try
@@ -72,20 +75,6 @@
}
}
- public static String printArray(Object[] val)
- {
- if (val == null)
- return "null";
- StringBuilder out = new StringBuilder("[");
- for (int i = 0; i < val.length; i++)
- {
- if (i > 0)
- out.append(", ");
- out.append(val[i].getClass().isArray() ? printArray((Object[])val[i]) : val[i]);
- }
- return out.append("]").toString();
- }
-
/**
* Transform a Reader to an InputStream
* Background is that DocumentBuilder.parse() cannot take the Reader directly
Modified: trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java 2006-11-02 21:03:00 UTC (rev 1347)
+++ trunk/src/main/java/org/jboss/ws/utils/JavaUtils.java 2006-11-02 21:19:22 UTC (rev 1348)
@@ -471,6 +471,23 @@
return (ret.charAt(0) == '[') ? ret : "L" + ret + ";";
}
+ public static String printArray(Object[] val)
+ {
+ if (val == null)
+ return "null";
+
+ StringBuilder out = new StringBuilder("[");
+ for (int i = 0; i < val.length; i++)
+ {
+ if (i > 0)
+ {
+ out.append(",");
+ }
+ out.append(val[i].getClass().isArray() ? printArray((Object[])val[i]) : val[i]);
+ }
+ return out.append("]").toString();
+ }
+
public static String getSourceName(Class type)
{
if (! type.isArray())
18 years, 2 months
JBossWS SVN: r1347 - in branches/jbossws-1.0/src: main/java/org/jboss/ws/annotation main/java/org/jboss/ws/deployment main/java/org/jboss/ws/integration/jboss main/java/org/jboss/ws/metadata test/ant test/java/org/jboss/test/ws/jaxws test/java/org/jboss/test/ws/jaxws/jbws981 test/resources/jaxws test/resources/jaxws/jbws981 test/resources/jaxws/jbws981/META-INF test/resources/jaxws/jbws981/META-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-11-02 16:03:00 -0500 (Thu, 02 Nov 2006)
New Revision: 1347
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.java
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jaxws/jbws981/wstools-config.xml
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/annotation/PortComponent.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ServiceEndpointGeneratorEJB.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java
branches/jbossws-1.0/src/test/ant/build-jars-jaxws.xml
Log:
JBWS-981 - Allow virtual hosts to be specified for EJB3 endpoints.
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/annotation/PortComponent.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/annotation/PortComponent.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/annotation/PortComponent.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -46,6 +46,13 @@
*/
String contextRoot() default "";
+ /**
+ * The virtual hosts that the web service endpoint is deployed to.
+ *
+ * Applies to server side port components only.
+ */
+ String[] virtualHosts() default {};
+
/**
* Relative path that is appended to the contextRoot to form fully qualified
* endpoint address for the web service endpoint.
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -167,6 +167,12 @@
{
contextRoot = anPortComponent.contextRoot();
}
+
+ String[] virtualHosts = anPortComponent.virtualHosts();
+ if (virtualHosts != null & virtualHosts.length > 0)
+ {
+ epMetaData.setVirtualHosts(virtualHosts);
+ }
if (anPortComponent.urlPattern().length() > 0)
{
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ServiceEndpointGeneratorEJB.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ServiceEndpointGeneratorEJB.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/ServiceEndpointGeneratorEJB.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.jboss.deployment.DeploymentInfo;
@@ -129,7 +130,7 @@
<url-pattern>
</servlet-mapping>
*/
- ArrayList urlPatters = new ArrayList();
+ ArrayList<String> urlPatters = new ArrayList<String>();
for (EndpointMetaData epMetaData : epMetaDataList)
{
ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
@@ -265,6 +266,37 @@
Element root = (Element)jbossWeb.appendChild(DOMUtils.createElement("context-root"));
root.appendChild(DOMUtils.createTextNode(contextRoot));
+ String[] virtualHosts = null;
+ for (EndpointMetaData epMetaData : epMetaDataList)
+ {
+ ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
+ String[] next = sepMetaData.getVirtualHosts();
+ if (next != null && next.length > 0)
+ {
+ Arrays.sort(next);
+ if (virtualHosts == null)
+ {
+ virtualHosts = next;
+ }
+ else
+ {
+ if (Arrays.equals(virtualHosts, next) == false)
+ {
+ throw new WSException("All endpoints must define the same virtual hosts");
+ }
+ }
+ }
+ }
+
+ if (virtualHosts != null)
+ {
+ for (String current : virtualHosts)
+ {
+ Element virtualHost = (Element)jbossWeb.appendChild(DOMUtils.createElement("virtual-host"));
+ virtualHost.appendChild(DOMUtils.createTextNode(current));
+ }
+ }
+
return jbossWeb;
}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -63,6 +63,8 @@
private ObjectName sepID;
// The HTTP context root
private String contextRoot;
+ // The HTTP virtual hosts
+ private String[] virtualHosts;
// The HTTP url parttern
private String urlPattern;
// The bean that registers with the ServiceEndpointManager
@@ -135,6 +137,17 @@
this.contextRoot = contextRoot;
}
+
+ public String[] getVirtualHosts()
+ {
+ return virtualHosts;
+ }
+
+ public void setVirtualHosts(String[] virtualHosts)
+ {
+ this.virtualHosts = virtualHosts;
+ }
+
public String getURLPattern()
{
return urlPattern;
Modified: branches/jbossws-1.0/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars-jaxws.xml 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/ant/build-jars-jaxws.xml 2006-11-02 21:03:00 UTC (rev 1347)
@@ -68,6 +68,25 @@
</metainf>
</jar>
+ <!-- jaxws-jbws981 -->
+ <jar destfile="${build.test.dir}/libs/jaxws-jbws981.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws981/EJB3Bean.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.class"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build.test.dir}/libs/jaxws-jbws981-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws981/EndpointInterface.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jaxws/jbws981/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/TestService.wsdl"/>
+ </metainf>
+ </jar>
+
<!-- jaxws-jbws1123 -->
<war destfile="${build.test.dir}/libs/jaxws-jbws1123.war" webxml="${build.test.dir}/resources/jaxws/jbws1123/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws981;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.annotation.PortComponent;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+@Stateless
+@WebService(name = "EndpointInterface", targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws981", serviceName = "TestService")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@PortComponent(virtualHosts = { "localhost", "www.jboss.org" })
+public class EJB3Bean implements EJB3RemoteInterface
+{
+
+ private static final Logger log = Logger.getLogger(EJB3Bean.class);
+
+ @WebMethod
+ public String hello(final String message)
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+ try
+ {
+ ObjectName on = new ObjectName("jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//www.jboss.org/...");
+ mbeanServer.getMBeanInfo(on);
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ return e.getMessage();
+ }
+
+ return message;
+ }
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws981;
+
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+public interface EJB3RemoteInterface
+{
+
+ public String hello(final String message);
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3RemoteInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Thu Nov 02 21:17:37 CET 2006
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jaxws.jbws981;
+public interface EndpointInterface extends java.rmi.Remote
+{
+
+ public java.lang.String hello(java.lang.String string_1) throws java.rmi.RemoteException;
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.java 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.java 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws981;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+public class JBWS981TestCase extends JBossWSTest
+{
+
+ private static EndpointInterface port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS981TestCase.class, "jaxws-jbws981.jar, jaxws-jbws981-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (EndpointInterface)service.getPort(EndpointInterface.class);
+ }
+ }
+
+ public void testCall() throws Exception
+ {
+ String message = "hello";
+ assertEquals(message, port.hello(message));
+ }
+
+}
Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/application-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/application-client.xml 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/application-client.xml 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>JBWS981 Test</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxws.jbws981.EndpointInterface</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Property changes on: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jaxrpc-mapping.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jaxrpc-mapping.xml 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jaxrpc-mapping.xml 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxws.jbws981</package-type>
+ <namespaceURI>http://www.jboss.org/test/ws/jaxws/jbws981</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxws.jbws981.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://www.jboss.org/test/ws/jaxws/jbws981'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>EndpointInterfacePort</port-name>
+ <java-port-name>EndpointInterfacePort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxws.jbws981.EndpointInterface</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://www.jboss.org/test/ws/jaxws/jbws981'>portTypeNS:EndpointInterface</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://www.jboss.org/test/ws/jaxws/jbws981'>bindingNS:EndpointInterfaceBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>hello</java-method-name>
+ <wsdl-operation>hello</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://www.jboss.org/test/ws/jaxws/jbws981'>wsdlMsgNS:EndpointInterface_hello</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://www.jboss.org/test/ws/jaxws/jbws981'>wsdlMsgNS:EndpointInterface_helloResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jboss-client.xml 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jboss-client.xml 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+</jboss-client>
Property changes on: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/TestService.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/TestService.wsdl 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/TestService.wsdl 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,35 @@
+<definitions name='TestService' targetNamespace='http://www.jboss.org/test/ws/jaxws/jbws981' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://www.jboss.org/test/ws/jaxws/jbws981' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='EndpointInterface_hello'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='EndpointInterface_helloResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='EndpointInterface'>
+
+ <operation name='hello' parameterOrder='String_1'>
+ <input message='tns:EndpointInterface_hello'/>
+ <output message='tns:EndpointInterface_helloResponse'/>
+ </operation>
+ </portType>
+ <binding name='EndpointInterfaceBinding' type='tns:EndpointInterface'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='hello'>
+ <soap:operation soapAction=''/>
+
+ <input>
+ <soap:body namespace='http://www.jboss.org/test/ws/jaxws/jbws981' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://www.jboss.org/test/ws/jaxws/jbws981' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+
+ <port binding='tns:EndpointInterfaceBinding' name='EndpointInterfacePort'>
+ <soap:address location='http://localhost.localdomain:8080/jaxws-jbws981/EJB3Bean'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/META-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxws/jbws981/wstools-config.xml 2006-11-02 18:20:46 UTC (rev 1346)
+++ branches/jbossws-1.0/src/test/resources/jaxws/jbws981/wstools-config.xml 2006-11-02 21:03:00 UTC (rev 1347)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <wsdl-java location="META-INF/wsdl/TestService.wsdl">
+ <mapping file="jaxrpc-mapping.xml" />
+ </wsdl-java>
+
+</configuration>
\ No newline at end of file
Property changes on: branches/jbossws-1.0/src/test/resources/jaxws/jbws981/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 2 months