ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r239224 - in /webservices/wsrf/trunk/src/java/org/apache/ws/util/platform: JaxRpcPlatform.java jboss/ jboss/JBossJaxRpcPlatform.java
Date Mon, 22 Aug 2005 19:18:01 GMT
Author: scamp
Date: Mon Aug 22 12:17:58 2005
New Revision: 239224

URL: http://svn.apache.org/viewcvs?rev=239224&view=rev
Log:
Added JBoss to JaxRpcPlatform.java

Added:
    webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/
    webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java
Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java?rev=239224&r1=239223&r2=239224&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java Mon Aug
22 12:17:58 2005
@@ -18,6 +18,7 @@
 import org.apache.ws.util.platform.axis.AxisJaxRpcPlatform;
 import org.apache.ws.util.platform.weblogic.WeblogicJaxRpcPlatform;
 import org.apache.ws.util.platform.websphere.WebsphereJaxRpcPlatform;
+import org.apache.ws.util.platform.jboss.JBossJaxRpcPlatform;
 import org.apache.ws.resource.handler.axis.AxisConstants;
 
 import javax.xml.soap.SOAPException;
@@ -47,6 +48,11 @@
     */
    private static final JaxRpcPlatform WEBSPHERE = new WebsphereJaxRpcPlatform();
 
+    /**
+     * JBoss JaxRpcPlatform instance.
+     */
+    private static final JaxRpcPlatform JBOSS = new JBossJaxRpcPlatform();
+
    /**
     * Represents the platform detected in this classloader.
     */
@@ -125,6 +131,11 @@
       {
          s_platformType = WEBSPHERE;
       }
+      else if (soapFactory.getClass(  ).getName(  ).equals( JBOSS.getSoapFactoryImpl(  )
))
+      {
+          s_platformType = JBOSS;
+      }
+       
       if ( s_platformType == null )
       {
          throw new RuntimeException( "Unsupported JAX-RPC platform." );

Added: webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java?rev=239224&view=auto
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java
(added)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java
Mon Aug 22 12:17:58 2005
@@ -0,0 +1,69 @@
+package org.apache.ws.util.platform.jboss;
+
+import org.apache.ws.util.platform.JaxRpcPlatform;
+
+
+/**
+ * @author Sal Campana
+ */
+public class JBossJaxRpcPlatform extends JaxRpcPlatform
+{
+    /**
+     * JBoss description.
+     */
+    private static final String JBOSS_DESC = "JBoss Server";
+
+    /**
+     * Class name of JBoss's impl of SAAJ {@link javax.xml.soap.SOAPFactory} interface.
+     */
+    private static final String IMPL_SOAP_FACTORY_JBOSS = "org.jboss.ws.soap.SOAPFactoryImpl";
+
+
+    /**
+     * Returns a short description of the platform.
+     *
+     * @return a short description of the platform
+     */
+    public String getDescription()
+    {
+        return JBOSS_DESC;
+    }
+
+    /**
+     * Returns the platform-specific endpoint url for a service on a given platform.
+     * <p/>
+     * An example of this would be:</br>
+     * baseWebappUrl = http://localhost:8080/wsrf</br>
+     * serviceName = filesystem</br>
+     * <p/>
+     * On the Axis platform the endpoint URL is:  http://localhost:8080/wsrf/services/filesystem
+     *
+     * @param baseWebappUrl The url containing the webapp context (i.e. http://localhost:8080/wsrf)
+     * @param serviceName   The service name which is registered with the platform
+     * @return The endpoint url for the service.
+     */
+    public String getEndpointUrl(String baseWebappUrl, String serviceName)
+    {
+        return baseWebappUrl + "/" + serviceName;
+    }
+
+    /**
+     * Returns the SOAPFactoryImpl class name.
+     *
+     * @return SOAPFactoryImpl class name.
+     */
+    public String getSoapFactoryImpl()
+    {
+        return IMPL_SOAP_FACTORY_JBOSS;
+    }
+
+    /**
+     * Returns the description of the JAX-RPC platform.
+     *
+     * @return String
+     */
+    public String toString()
+    {
+        return JBOSS_DESC;
+    }
+}



Mime
View raw message