[jbossws-commits] JBossWS SVN: r3163 - in branches/tdiesler/trunk: integration/xfire/ant-import and 7 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Mon May 21 10:50:29 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-05-21 10:50:29 -0400 (Mon, 21 May 2007)
New Revision: 3163
Added:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerJBWS.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDService.java
Removed:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoint.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoints.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandler.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandlerChain.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/
Modified:
branches/tdiesler/trunk/integration/xfire/.classpath
branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ModifyWebMetaDataDeployer.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletJBWS.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EJB3Bean.java
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/JSEBean.java
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/TestEndpoint.java
branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/web.xml
branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
Log:
xfire
Modified: branches/tdiesler/trunk/integration/xfire/.classpath
===================================================================
--- branches/tdiesler/trunk/integration/xfire/.classpath 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/.classpath 2007-05-21 14:50:29 UTC (rev 3163)
@@ -10,5 +10,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/integration-spi"/>
<classpathentry kind="lib" path="/integration-spi/thirdparty/dom4j.jar"/>
<classpathentry kind="lib" path="thirdparty/xfire-all.jar" sourcepath="thirdparty/xfire-distribution-sources.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxws-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/xfire-jsr181-api.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml 2007-05-21 14:50:29 UTC (rev 3163)
@@ -41,7 +41,23 @@
Init the various classpaths
-->
<target name="tests-init" depends="tests-prepare,thirdparty">
+
+ <!--
+ Cannot use XFire client
+ [JBWS-1654] - ServiceDelegate requires non portable method getPortClassMap
+ -->
+ <path id="jbossws.classpath">
+ <pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
+ <pathelement location="${core.dir}/output/lib/jboss-jaxrpc.jar"/>
+ <pathelement location="${core.dir}/output/lib/jboss-jaxws.jar"/>
+ <pathelement location="${core.dir}/output/lib/jboss-saaj.jar"/>
+ <pathelement location="${core.dir}/output/lib/jbossws-core.jar"/>
+ <pathelement location="${core.dir}/output/lib/jbossws-client.jar"/>
+ <pathelement location="${core.dir}/thirdparty/jboss-xml-binding.jar"/>
+ <pathelement location="${core.dir}/thirdparty/wsdl4j.jar"/>
+ </path>
+
<path id="sunri.classpath">
<pathelement location="${int.sunri.dir}/thirdparty/FastInfoset.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/http.jar"/>
@@ -59,9 +75,6 @@
<pathelement location="${int.sunri.dir}/thirdparty/streambuffer.jar"/>
</path>
- <!--
- [JBWS-1654] - ServiceDelegate requires non portable method getPortClassMap
- -->
<path id="xfire.classpath">
<pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
<pathelement location="${thirdparty.dir}/jdom.jar"/>
@@ -74,7 +87,7 @@
<!-- The combined compile classpath -->
<path id="javac.classpath">
- <path refid="sunri.classpath"/>
+ <path refid="xfire.classpath"/>
<pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
<pathelement location="${jboss.client}/jboss-common-core.jar"/>
<pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -0,0 +1,76 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.codehaus.xfire.MessageContext;
+import org.codehaus.xfire.fault.XFireFault;
+import org.codehaus.xfire.service.invoker.Invoker;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * An XFire invoker for EJB3
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-May-2007
+ */
+public class InvokerEJB3 implements Invoker
+{
+ public Object invoke(Method m, Object[] params, MessageContext context) throws XFireFault
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+ InvocationHandler invHandler = ep.getInvocationHandler();
+
+ EndpointInvocation inv = invHandler.createInvocation();
+ inv.getInvocationContext().addAttachment(MessageContext.class, context);
+ inv.setJavaMethod(m);
+ inv.setArgs(params);
+
+ Object retObj = null;
+ try
+ {
+ invHandler.invoke(ep, null, inv);
+ retObj = inv.getReturnValue();
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ }
+
+ return retObj;
+ }
+
+ private void handleException(Exception ex) throws XFireFault
+ {
+ if (ex instanceof InvocationTargetException)
+ throw XFireFault.createFault(((InvocationTargetException)ex).getTargetException());
+
+ throw XFireFault.createFault(ex);
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -0,0 +1,83 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.codehaus.xfire.MessageContext;
+import org.codehaus.xfire.fault.XFireFault;
+import org.codehaus.xfire.service.invoker.Invoker;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * An XFire invoker for JSE
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-May-2007
+ */
+public class InvokerJSE implements Invoker
+{
+ public Object invoke(Method m, Object[] params, MessageContext context) throws XFireFault
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+ InvocationHandler invHandler = ep.getInvocationHandler();
+
+ EndpointInvocation inv = invHandler.createInvocation();
+ inv.getInvocationContext().addAttachment(MessageContext.class, context);
+ inv.setJavaMethod(m);
+ inv.setArgs(params);
+
+ Object retObj = null;
+ try
+ {
+ Object targetBean = getTargetBean(ep);
+ invHandler.invoke(ep, targetBean, inv);
+ retObj = inv.getReturnValue();
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ }
+
+ return retObj;
+ }
+
+ private Object getTargetBean(Endpoint ep) throws InstantiationException, IllegalAccessException
+ {
+ Class beanClass = ep.getTargetBeanClass();
+ return beanClass.newInstance();
+ }
+
+ private void handleException(Exception ex) throws XFireFault
+ {
+ if (ex instanceof InvocationTargetException)
+ throw XFireFault.createFault(((InvocationTargetException)ex).getTargetException());
+
+ throw XFireFault.createFault(ex);
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/InvokerJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ModifyWebMetaDataDeployer.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ModifyWebMetaDataDeployer.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/ModifyWebMetaDataDeployer.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -29,7 +29,7 @@
import org.jboss.metadata.web.ParamValue.ParamType;
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDBeans;
+import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
/**
* A deployer that modifies the web.xml meta data
Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -32,6 +32,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.codehaus.xfire.transport.http.XFireServletController;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -42,16 +43,20 @@
* A request handler
*
* @author Thomas.Diesler at jboss.org
- * @since 21-Mai-2007
+ * @since 21-May-2007
*/
public class RequestHandlerImpl implements RequestHandler
{
// provide logging
private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
- public void handleHttpRequest(Endpoint endpoint, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
+ public void handleHttpRequest(Endpoint ep, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
{
- throw new NotImplementedException();
+ XFireServletController controller = ep.getAttachment(XFireServletController.class);
+ if (controller == null)
+ throw new IllegalStateException("Cannot obtain XFire servlet controller");
+
+ controller.doService(req, res);
}
public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext context)
Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -28,7 +28,7 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
-import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDBeans;
+import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
/**
* Modifies web.xml for jbossws
Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletJBWS.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletJBWS.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletJBWS.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -23,13 +23,26 @@
//$Id$
+import java.io.IOException;
import java.net.URL;
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
import org.codehaus.xfire.XFire;
import org.codehaus.xfire.transport.http.XFireConfigurableServlet;
+import org.codehaus.xfire.transport.http.XFireServletController;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
/**
* An extension to the XFire servlet
@@ -43,6 +56,20 @@
private final static String CONFIG_FILE = "/WEB-INF/classes/META-INF/xfire/services.xml";
+ protected Endpoint endpoint;
+ protected EndpointRegistry epRegistry;
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+
+ // Init the Endpoint
+ epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+ String contextPath = servletConfig.getServletContext().getContextPath();
+ initServiceEndpoint(contextPath);
+ endpoint.addAttachment(XFireServletController.class, controller);
+ }
+
public XFire createXFire() throws ServletException
{
XFire xfire;
@@ -69,4 +96,50 @@
return xfire;
}
+
+ public XFireServletController createController() throws ServletException
+ {
+ return new XFireServletControllerJBWS(xfire, getServletContext());
+ }
+
+ public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ try
+ {
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ finally
+ {
+ EndpointAssociation.removeEndpoint();
+ }
+ }
+
+ /** Initialize the service endpoint
+ */
+ protected void initServiceEndpoint(String contextPath)
+ {
+ if (contextPath.startsWith("/"))
+ contextPath = contextPath.substring(1);
+
+ String servletName = getServletName();
+ for (ObjectName sepId : epRegistry.getEndpoints())
+ {
+ String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
+ {
+ endpoint = epRegistry.getEndpoint(sepId);
+ break;
+ }
+ }
+
+ if (endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
+ + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+ throw new WebServiceException("Cannot obtain endpoint for: " + oname);
+ }
+ }
}
Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -26,8 +26,9 @@
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDBeans;
-import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDService;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
+import org.jboss.wsf.stack.xfire.metadata.services.DDService;
/**
* A deployer that generates xfire services.xml
@@ -37,9 +38,32 @@
*/
public class XFireServicesDeployer extends AbstractDeployer
{
+ private String serviceFactory;
+ private String invokerEJB3;
+ private String invokerJSE;
+
+ public void setServiceFactory(String serviceFactory)
+ {
+ this.serviceFactory = serviceFactory;
+ }
+
+ public void setInvokerEJB3(String invokerEJB3)
+ {
+ this.invokerEJB3 = invokerEJB3;
+ }
+
+ public void setInvokerJSE(String invokerJSE)
+ {
+ this.invokerJSE = invokerJSE;
+ }
+
@Override
public void create(Deployment dep)
{
+ DeploymentType depType = dep.getType();
+ if (depType != DeploymentType.JAXWS_EJB3 && depType != DeploymentType.JAXWS_JSE)
+ throw new IllegalStateException("Unsupported deployment type: " + depType);
+
DDBeans dd = new DDBeans();
for (Endpoint ep : dep.getService().getEndpoints())
{
@@ -47,6 +71,14 @@
String targetBean = ep.getTargetBean();
DDService ddser = new DDService(epName, targetBean);
+ ddser.setServiceFactory(serviceFactory);
+
+ if (depType == DeploymentType.JAXWS_EJB3 && invokerEJB3 != null)
+ ddser.setInvoker(invokerEJB3);
+
+ if (depType == DeploymentType.JAXWS_JSE && invokerJSE != null)
+ ddser.setInvoker(invokerJSE);
+
log.info("Add " + ddser);
dd.addService(ddser);
}
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerJBWS.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerJBWS.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerJBWS.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -0,0 +1,53 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.codehaus.xfire.XFire;
+import org.codehaus.xfire.transport.http.XFireServletController;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointAssociation;
+
+/**
+ * An extension to the XFire servlet controller
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Apr-2007
+ */
+public class XFireServletControllerJBWS extends XFireServletController
+{
+ public XFireServletControllerJBWS(XFire xfire, ServletContext servletContext)
+ {
+ super(xfire, servletContext);
+ }
+
+ protected String getService(HttpServletRequest request)
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+ String serviceName = ep.getShortName();
+ return serviceName;
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServletControllerJBWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services (from rev 3156, branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws)
Copied: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java (from rev 3162, branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDBeans.java)
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -0,0 +1,102 @@
+/*
+ * 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.wsf.stack.xfire.metadata.services;
+
+//$Id$
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+//$Id$
+
+/**
+ * Metadata model for xfire services.xml
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-May-2007
+ */
+public class DDBeans
+{
+ private List<DDService> services = new ArrayList<DDService>();
+ private File tmpFile;
+
+ public List<DDService> getServices()
+ {
+ return services;
+ }
+
+ public void addService(DDService service)
+ {
+ services.add(service);
+ }
+
+ public URL createFileURL()
+ {
+ destroyFileURL();
+
+ ServerConfig serverConfig = ServerConfigFactory.getInstance().getServerConfig();
+ File tmpDir = serverConfig.getServerTempDir();
+ try
+ {
+ tmpFile = File.createTempFile("jbossws-xfire-services", ".xml", tmpDir);
+ Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
+ writeTo(writer);
+ writer.close();
+
+ return tmpFile.toURL();
+ }
+ catch (IOException ex)
+ {
+ throw new WSDeploymentException(ex);
+ }
+ }
+
+ public void destroyFileURL()
+ {
+ if (tmpFile != null)
+ {
+ tmpFile.delete();
+ tmpFile = null;
+ }
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<beans xmlns='http://xfire.codehaus.org/config/1.0'>");
+ for (DDService service : services)
+ {
+ service.writeTo(writer);
+ }
+ writer.write("</beans>");
+ }
+
+}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoint.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDEndpoint.java 2007-05-20 11:37:37 UTC (rev 3156)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoint.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -1,192 +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.wsf.stack.xfire.metadata.sunjaxws;
-
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.soap.SOAPBinding;
-
-//$Id$
-
-/**
- * Metadata model for sun-jaxws.xml
- *
- * @author Thomas.Diesler at jboss.org
- * @since 10-May-2007
- */
-public class DDEndpoint
-{
- // Name of the endpoint
- private String name;
- // Primary wsdl file location in the WAR file.
- private String wsdl;
- //QName of WSDL service.
- private QName service;
- //QName of WSDL port.
- private QName port;
- // Endpoint implementation class name.
- private String implementation;
- // Should match <url-pattern> in web.xml
- private String urlPattern;
- // Binding id defined in the JAX-WS API
- private String binding;
- // Enables MTOM optimization.
- private boolean enableMTOM;
- // Optional handler chain
- private DDHandlerChain handlerChain;
-
- public DDEndpoint(String name, String impl, String urlPattern)
- {
- if (name == null || name.length() == 0)
- throw new IllegalArgumentException("name cannot be null");
- if (impl == null || impl.length() == 0)
- throw new IllegalArgumentException("implementation cannot be null");
- if (urlPattern == null || urlPattern.length() == 0)
- throw new IllegalArgumentException("urlPattern cannot be null");
-
- this.name = name;
- this.implementation = impl;
- this.urlPattern = urlPattern;
- this.binding = SOAPBinding.SOAP11HTTP_BINDING;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getImplementation()
- {
- return implementation;
- }
-
- public String getUrlPattern()
- {
- return urlPattern;
- }
-
- public String getBinding()
- {
- return binding;
- }
-
- public void setBinding(String binding)
- {
- if (!SOAPBinding.SOAP11HTTP_BINDING.equals(binding) && !SOAPBinding.SOAP12HTTP_BINDING.equals(binding))
- throw new IllegalArgumentException("Invalid binding: " + binding);
-
- this.binding = binding;
- }
-
- public boolean isEnableMTOM()
- {
- return enableMTOM;
- }
-
- public void setEnableMTOM(boolean enableMTOM)
- {
- this.enableMTOM = enableMTOM;
- }
-
- public QName getPort()
- {
- return port;
- }
-
- public void setPort(QName port)
- {
- this.port = port;
- }
-
- public QName getService()
- {
- return service;
- }
-
- public void setService(QName service)
- {
- this.service = service;
- }
-
- public String getWsdl()
- {
- return wsdl;
- }
-
- public void setWsdl(String wsdl)
- {
- this.wsdl = wsdl;
- }
-
- public DDHandlerChain getHandlerChain()
- {
- return handlerChain;
- }
-
- public void setHandlerChain(DDHandlerChain handlerChain)
- {
- this.handlerChain = handlerChain;
- }
-
- public void writeTo(Writer writer) throws IOException
- {
- writer.write("<endpoint");
- writer.write(" name='" + name + "'");
- writer.write(" implementation='" + implementation + "'");
- writer.write(" url-pattern='" + urlPattern + "'");
- if (service != null)
- writer.write(" service='" + service + "'");
- if (port != null)
- writer.write(" port='" + port + "'");
- if (wsdl != null)
- writer.write(" wsdl='" + wsdl + "'");
- if (binding != null)
- writer.write(" binding='" + binding + "'");
- writer.write(" enable-mtom='" + enableMTOM + "'");
- writer.write(">");
-
- if (handlerChain != null)
- handlerChain.writeTo(writer);
-
- writer.write("</endpoint>");
- }
-
- public String toString()
- {
- StringBuilder str = new StringBuilder("Endpoint");
- str.append("\n name=" + name);
- str.append("\n implementation=" + implementation);
- str.append("\n url-pattern=" + urlPattern);
- if (service != null)
- str.append("\n service=" + service);
- if (port != null)
- str.append("\n port=" + port);
- if (wsdl != null)
- str.append("\n wsdl=" + wsdl);
- if (binding != null)
- str.append("\n binding=" + binding);
- str.append("\n enable-mtom=" + enableMTOM);
- return str.toString();
- }
-}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoints.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDEndpoints.java 2007-05-20 11:37:37 UTC (rev 3156)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDEndpoints.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -1,100 +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.wsf.stack.xfire.metadata.sunjaxws;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-
-//$Id$
-
-/**
- * Metadata model for sun-jaxws.xml
- *
- * @author Thomas.Diesler at jboss.org
- * @since 10-May-2007
- */
-public class DDEndpoints
-{
- private List<DDEndpoint> endpoints = new ArrayList<DDEndpoint>();
- private File tmpFile;
-
- public List<DDEndpoint> getEndpoints()
- {
- return endpoints;
- }
-
- public void addEndpoint(DDEndpoint ep)
- {
- endpoints.add(ep);
- }
-
- public URL createFileURL()
- {
- destroyFileURL();
-
- ServerConfig serverConfig = ServerConfigFactory.getInstance().getServerConfig();
- File tmpDir = serverConfig.getServerTempDir();
- try
- {
- tmpFile = File.createTempFile("jbossws-sun-jaxws", ".xml", tmpDir);
- Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
- writeTo(writer);
- writer.close();
-
- return tmpFile.toURL();
- }
- catch (IOException ex)
- {
- throw new WSDeploymentException(ex);
- }
- }
-
- public void destroyFileURL()
- {
- if (tmpFile != null)
- {
- tmpFile.delete();
- tmpFile = null;
- }
- }
-
- public void writeTo(Writer writer) throws IOException
- {
- writer.write("<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>");
- for (DDEndpoint ep : endpoints)
- {
- ep.writeTo(writer);
- }
- writer.write("</endpoints>");
- }
-
-}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandler.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDHandler.java 2007-05-20 11:37:37 UTC (rev 3156)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandler.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -1,63 +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.wsf.stack.xfire.metadata.sunjaxws;
-
-import java.io.IOException;
-import java.io.Writer;
-
-//$Id$
-
-/**
- * Metadata model for sun-jaxws.xml
- *
- * @author Thomas.Diesler at jboss.org
- * @since 10-May-2007
- */
-public class DDHandler
-{
- private String handlerName;
- private String handlerClass;
-
- public DDHandler(String handlerName, String handlerClass)
- {
- this.handlerName = handlerName;
- this.handlerClass = handlerClass;
- }
-
- public String getHandlerName()
- {
- return handlerName;
- }
-
- public String getHandlerClass()
- {
- return handlerClass;
- }
-
- public void writeTo(Writer writer) throws IOException
- {
- writer.write("<handler>");
- writer.write("<handler-name>" + handlerName + "</handler-name>");
- writer.write("<handler-class>" + handlerClass + "</handler-class>");
- writer.write("</handler>");
- }
-}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandlerChain.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDHandlerChain.java 2007-05-20 11:37:37 UTC (rev 3156)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDHandlerChain.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -1,74 +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.wsf.stack.xfire.metadata.sunjaxws;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-
-//$Id$
-
-/**
- * Metadata model for sun-jaxws.xml
- *
- * @author Thomas.Diesler at jboss.org
- * @since 10-May-2007
- */
-public class DDHandlerChain
-{
- // Name of the endpoint
- private String name;
-
- private List<DDHandler> handlers = new ArrayList<DDHandler>();
-
- public DDHandlerChain(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public List<DDHandler> getEndpoints()
- {
- return handlers;
- }
-
- public void addEndpoint(DDHandler handler)
- {
- handlers.add(handler);
- }
-
- public void writeTo(Writer writer) throws IOException
- {
- writer.write("<handler-chain>");
- writer.write("<handler-chain-name>" + name + "</handler-chain-name>");
- for (DDHandler handler : handlers)
- {
- handler.writeTo(writer);
- }
- writer.write("</handler-chain>");
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDService.java (from rev 3162, branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/sunjaxws/DDService.java)
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDService.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDService.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -0,0 +1,131 @@
+/*
+ * 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.wsf.stack.xfire.metadata.services;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * Metadata model for services.xml
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-May-2007
+ */
+public class DDService
+{
+ // This will be the name of the service as exposed to the world. Required.
+ private String name;
+ // The class name of the object you wish to make into a service. Required.
+ private String serviceClass;
+ // The class name of the implementation which you wish to use when the service is invoked. Optional.
+ private String implementationClass;
+ // The ServiceFactory controls how the Service is built and configured. Optional.
+ private String serviceFactory;
+ // The invoker element is optional. It can be used to set a non-default Invoker for a service.
+ private String invoker;
+
+ public DDService(String name, String serviceClass)
+ {
+ this.name = name;
+ this.serviceClass = serviceClass;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getServiceClass()
+ {
+ return serviceClass;
+ }
+
+ public void setServiceClass(String serviceClass)
+ {
+ this.serviceClass = serviceClass;
+ }
+
+ public String getImplementationClass()
+ {
+ return implementationClass;
+ }
+
+ public void setImplementationClass(String implementationClass)
+ {
+ this.implementationClass = implementationClass;
+ }
+
+ public String getServiceFactory()
+ {
+ return serviceFactory;
+ }
+
+ public void setServiceFactory(String serviceFactory)
+ {
+ this.serviceFactory = serviceFactory;
+ }
+
+ public String getInvoker()
+ {
+ return invoker;
+ }
+
+ public void setInvoker(String invoker)
+ {
+ this.invoker = invoker;
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<service>");
+ writer.write("<name>" + name + "</name>");
+ writer.write("<serviceClass>" + serviceClass + "</serviceClass>");
+ if (implementationClass != null)
+ writer.write("<implementationClass>" + implementationClass + "</implementationClass>");
+ if (serviceFactory != null)
+ writer.write("<serviceFactory>" + serviceFactory + "</serviceFactory>");
+ if (invoker != null)
+ writer.write("<invoker>" + invoker + "</invoker>");
+ writer.write("</service>");
+ }
+
+ public String toString()
+ {
+ StringBuilder str = new StringBuilder("Service");
+ str.append("\n name=" + name);
+ str.append("\n serviceClass=" + serviceClass);
+ if (implementationClass != null)
+ str.append("\n implementationClass=" + implementationClass);
+ if (serviceFactory != null)
+ str.append("\n serviceFactory=" + serviceFactory);
+ if (invoker != null)
+ str.append("\n invoker=" + invoker);
+ return str.toString();
+ }
+}
\ No newline at end of file
Modified: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-21 14:50:29 UTC (rev 3163)
@@ -149,7 +149,11 @@
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
</bean>
- <bean name="WSXFireServicesDeployer" class="org.jboss.wsf.stack.xfire.XFireServicesDeployer"/>
+ <bean name="WSXFireServicesDeployer" class="org.jboss.wsf.stack.xfire.XFireServicesDeployer">
+ <property name="serviceFactory">org.codehaus.xfire.jaxws.JAXWSServiceFactory</property>
+ <property name="invokerEJB3">org.jboss.wsf.stack.xfire.InvokerEJB3</property>
+ <property name="invokerJSE">org.jboss.wsf.stack.xfire.InvokerJSE</property>
+ </bean>
<!-- Deployer helper beans -->
<bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EJB3Bean.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EJB3Bean.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EJB3Bean.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -1,28 +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.
- */
+ * 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.eardeployment;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@@ -30,16 +32,17 @@
import org.jboss.wsf.spi.annotation.WebContext;
// Test that the wsdl can be read from the nested deployment
- at WebService(name="TestEndpoint", serviceName="TestEndpointService", wsdlLocation="META-INF/wsdl/TestEndpoint.wsdl")
+ at WebService(name = "TestEndpoint", serviceName = "TestEndpointService", targetNamespace="http://eardeployment.jaxws/", wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
- at WebContext(contextRoot="/earejb3")
+ at WebContext(contextRoot = "/earejb3")
@Stateless
-public class EJB3Bean
+public class EJB3Bean
{
private static Logger log = Logger.getLogger(EJB3Bean.class);
@WebMethod
- public String echo(String input)
+ @WebResult(name = "return")
+ public String echo(@WebParam(name = "arg0") String input)
{
log.info("echo: " + input);
return input;
Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -24,6 +24,7 @@
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
@@ -48,23 +49,32 @@
public void testEJB3Endpoint() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earejb3/EJB3Bean?wsdl");
- QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
+ String soapAddress = "http://" + getServerHost() + ":8080/earejb3/EJB3Bean";
+ QName serviceName = new QName("http://eardeployment.jaxws/", "TestEndpointService");
+ Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
TestEndpoint port = service.getPort(TestEndpoint.class);
+ // [JBWS-1655] Add support for endpoint address rewriting
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
+
String helloWorld = "Hello world!";
String retObj = port.echo(helloWorld);
assertEquals(helloWorld, retObj);
}
- public void testJSEEndpoint() throws Exception
+ public void _testJSEEndpoint() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/earjse/JSEBean?wsdl");
- QName serviceName = new QName("http://eardeployment.jaxws.ws.test.jboss.org/", "TestEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
+ //String endpointAddress = "http://" + getServerHost() + ":8080/earjse/JSEBean";
+ String soapAddress = "http://" + getServerHost() + ":8080/jaxws-eardeployment/JSEBean";
+ QName serviceName = new QName("http://eardeployment.jaxws/", "TestEndpointService");
+ Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
TestEndpoint port = service.getPort(TestEndpoint.class);
+ // [JBWS-1655] Add support for endpoint address rewriting
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
+
String helloWorld = "Hello world!";
String retObj = port.echo(helloWorld);
assertEquals(helloWorld, retObj);
Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/JSEBean.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/JSEBean.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/JSEBean.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -22,20 +22,23 @@
package org.jboss.test.ws.jaxws.eardeployment;
import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.logging.Logger;
//Test that the wsdl can be read from the nested deployment
- at WebService(name="TestEndpoint", serviceName="TestEndpointService", wsdlLocation="WEB-INF/wsdl/TestEndpoint.wsdl")
+ at WebService(name="TestEndpoint", serviceName="TestEndpointService", targetNamespace="http://eardeployment.jaxws/", wsdlLocation="WEB-INF/wsdl/TestEndpoint.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class JSEBean
{
private static Logger log = Logger.getLogger(JSEBean.class);
@WebMethod
- public String echo(String input)
+ @WebResult(name="return")
+ public String echo(@WebParam(name="arg0") String input)
{
log.info("echo: " + input);
return input;
Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/TestEndpoint.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/TestEndpoint.java 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/TestEndpoint.java 2007-05-21 14:50:29 UTC (rev 3163)
@@ -14,7 +14,7 @@
* Generated source version: 2.1
*
*/
- at WebService(name = "TestEndpoint", targetNamespace = "http://eardeployment.jaxws.ws.test.jboss.org/")
+ at WebService(name = "TestEndpoint", targetNamespace = "http://eardeployment.jaxws/")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface TestEndpoint {
Modified: branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/web.xml 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/web.xml 2007-05-21 14:50:29 UTC (rev 3163)
@@ -12,7 +12,7 @@
<servlet-mapping>
<servlet-name>TestService</servlet-name>
- <url-pattern>/JSEBean</url-pattern>
+ <url-pattern>/JSEBean/*</url-pattern>
</servlet-mapping>
</web-app>
Modified: branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl 2007-05-21 10:53:58 UTC (rev 3162)
+++ branches/tdiesler/trunk/testsuite/src/resources/jaxws/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl 2007-05-21 14:50:29 UTC (rev 3163)
@@ -6,9 +6,9 @@
$Id$
-->
<definitions name="TestEndpointService"
- targetNamespace="http://eardeployment.jaxws.ws.test.jboss.org/"
+ targetNamespace="http://eardeployment.jaxws/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://eardeployment.jaxws.ws.test.jboss.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://eardeployment.jaxws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Test a schema import -->
<types>
@@ -32,16 +32,16 @@
<operation name="echo">
<soap:operation soapAction=""/>
<input>
- <soap:body namespace="http://eardeployment.jaxws.ws.test.jboss.org/" use="literal"/>
+ <soap:body namespace="http://eardeployment.jaxws/" use="literal"/>
</input>
<output>
- <soap:body namespace="http://eardeployment.jaxws.ws.test.jboss.org/" use="literal"/>
+ <soap:body namespace="http://eardeployment.jaxws/" use="literal"/>
</output>
</operation>
</binding>
<service name="TestEndpointService">
<port binding="tns:TestEndpointBinding" name="TestEndpointPort">
- <soap:address location="REPLACE_ON_DEPLOY"/>
+ <soap:address location="http://REPLACE_ON_DEPLOY"/>
</port>
</service>
</definitions>
\ No newline at end of file
More information about the jbossws-commits
mailing list