[jbossws-commits] JBossWS SVN: r9133 - in stack/metro/trunk/modules/server/src/main: resources/jbossws-metro-server.jar/META-INF/services and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Jan 27 13:45:15 EST 2009


Author: alessio.soldano at jboss.com
Date: 2009-01-27 13:45:15 -0500 (Tue, 27 Jan 2009)
New Revision: 9133

Added:
   stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
   stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
Log:
[JBWS-2491] Providing WebServiceContextFactoryImpl (as it's not in container integration anymore)


Added: stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
===================================================================
--- stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java	                        (rev 0)
+++ stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java	2009-01-27 18:45:15 UTC (rev 9133)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.metro;
+
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+
+/**
+ * 
+ * @author alessio.soldano at jboss.com
+ * 
+ */
+public class WebServiceContextFactoryImpl extends WebServiceContextFactory
+{
+   public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
+   {
+      ExtensibleWebServiceContext context = null;
+
+      //checking for a provided WebServiceContext in the MessageContext; to be removed after EJBTHREE-1604 (the whole class should not be required anymore for Metro integration)
+      WebServiceContext providedContext = (WebServiceContext)messageContext.get(WebServiceContext.class.toString());
+      if (providedContext != null)
+         context = new WebServiceContextDelegate(providedContext);
+      else 
+        throw new WebServiceException("Cannot find Metro WebServiceContext in the MessageContext");
+      
+      return context;
+   }
+}


Property changes on: stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
===================================================================
--- stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory	                        (rev 0)
+++ stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory	2009-01-27 18:45:15 UTC (rev 9133)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.metro.WebServiceContextFactoryImpl
\ No newline at end of file




More information about the jbossws-commits mailing list