JBossWS SVN: r3509 - in branches/jbossws-2.0: integration/native/ant-import and 17 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-08 11:50:12 -0400 (Fri, 08 Jun 2007)
New Revision: 3509
Added:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java
Removed:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
Modified:
branches/jbossws-2.0/build/ant-import/build-testsuite.xml
branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
branches/jbossws-2.0/jbossws-core/.classpath
branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml
branches/jbossws-2.0/jbossws-core/src/main/etc/component-info.xml
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/jbossws-2.0/jbossws-core/version.properties
Log:
[JBWS-1706] SOAPConnection.get fails with ProtocolException
SOAPElement.addTextNode does not add comment nodes
Remove dependency of saaj,jaxrpc,jaxws on SPI and jboss logging for usage with jdk1.6
Modified: branches/jbossws-2.0/build/ant-import/build-testsuite.xml
===================================================================
--- branches/jbossws-2.0/build/ant-import/build-testsuite.xml 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/build/ant-import/build-testsuite.xml 2007-06-08 15:50:12 UTC (rev 3509)
@@ -116,6 +116,7 @@
<pathelement location="${jboss.client}/javassist.jar"/>
<pathelement location="${jboss.client}/jaxb-xjc.jar"/>
<pathelement location="${jboss.client}/jboss-jboss50.jar"/>
+ <pathelement location="${jboss.client}/jboss-remoting.jar"/>
<pathelement location="${jboss.client}/jbossws-jboss50.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
Modified: branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 15:50:12 UTC (rev 3509)
@@ -146,19 +146,27 @@
<sequential>
<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
+ <!-- ENDORSED -->
+ <copy todir="${jboss42.home}/lib/endorsed" overwrite="true">
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jaxb-api.jar"/>
+ </fileset>
+ <fileset dir="@{corelibs}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-jaxws.jar"/>
+ <include name="jboss-saaj.jar"/>
+ </fileset>
+ </copy>
+
<!-- CLIENT JARS -->
<copy todir="${jboss42.home}/client" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
<fileset dir="@{corelibs}">
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
- <include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
<include name="wsdl4j.jar"/>
@@ -168,16 +176,11 @@
</fileset>
</copy>
- <!-- SERVER JARS -->
+ <!-- SERVER JARS -->
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
- <fileset dir="@{corelibs}">
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jboss-saaj.jar"/>
- </fileset>
</copy>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
@@ -204,6 +207,11 @@
<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
<delete>
+ <!-- ENDORSED -->
+ <fileset dir="${jboss42.home}/lib/endorsed">
+ <include name="jaxb-api.jar"/>
+ </fileset>
+
<!-- CLIENT JARS -->
<fileset dir="${jboss42.home}/client">
<include name="jaxb-api.jar"/>
@@ -223,6 +231,9 @@
</fileset>
<!-- SERVER JARS -->
+ <fileset dir="${jboss42.home}/lib/endorsed">
+ <include name="jaxb-api.jar"/>
+ </fileset>
<fileset dir="${jboss42.home}/lib">
<!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
Deleted: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -1,194 +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;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Properties;
-
-
-// $Id$
-
-/**
- * Load a factory using this ordered lookup procedure
- *
- * <ol>
- * <li>Use the system property
- * <li>Use the properties file "lib/jaxm.properties" in the JRE directory
- * <li>Use the Services API (as detailed in the JAR specification), if available, to determine the classname
- * <li>Use the default factory implementation class
- * </ol>
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 14-Dec-2006
- */
-public class FactoryLoader
-{
- private FactoryLoader()
- {
- }
-
- /**
- *
- * @return the factory impl, or null
- */
- public static Object loadFactory(String propertyName, String defaultFactory)
- {
- Object factory = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- // Use the system property
- PrivilegedAction action = new PropertyAccessAction(propertyName);
- String factoryName = (String)AccessController.doPrivileged(action);
- if (factoryName != null)
- {
- try
- {
- //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
- }
- }
-
- // Use the properties file "lib/jaxm.properties" in the JRE directory.
- // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
- if (factory == null)
- {
- action = new PropertyAccessAction("java.home");
- String javaHome = (String)AccessController.doPrivileged(action);
- File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
- if (jaxmFile.exists())
- {
- try
- {
- action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
- Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
- factoryName = jaxmProperties.getProperty(propertyName);
- if (factoryName != null)
- {
- //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
- }
- }
- }
-
- // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
- if (factory == null)
- {
- String filename = "META-INF/services/" + propertyName;
- InputStream inStream = loader.getResourceAsStream(filename);
- if (inStream != null)
- {
- try
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
- factoryName = br.readLine();
- br.close();
- if (factoryName != null)
- {
- //if(log.isTraceEnabled()) log.trace("Load from Service API " + filename + ": " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
- }
- }
- }
-
- // Use the default factory implementation class.
- if (factory == null && defaultFactory != null)
- {
- try
- {
- factoryName = defaultFactory;
- //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
- }
- }
-
- return factory;
- }
-
- private static class PropertyAccessAction implements PrivilegedAction
- {
- private String name;
-
- PropertyAccessAction(String name)
- {
- this.name = name;
- }
-
- public Object run()
- {
- return System.getProperty(name);
- }
- }
-
- private static class PropertyFileAccessAction implements PrivilegedAction
- {
- private String filename;
-
- PropertyFileAccessAction(String filename)
- {
- this.filename = filename;
- }
-
- public Object run()
- {
- try
- {
- InputStream inStream = new FileInputStream(filename);
- Properties props = new Properties();
- props.load(inStream);
- return props;
- }
- catch (IOException ex)
- {
- throw new SecurityException("Cannot load properties: " + filename, ex);
- }
- }
- }
-}
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
/**
* A container idependent SecurityAdaptorFactory
@@ -35,7 +35,7 @@
{
public static SecurityAdaptor getSecurityAdaptor()
{
- SecurityAdaptor securityAdaptor = (SecurityAdaptor)FactoryLoader.loadFactory(SecurityAdaptor.class.getName(), null);
+ SecurityAdaptor securityAdaptor = (SecurityAdaptor)ServiceLoader.loadService(SecurityAdaptor.class.getName(), null);
if (securityAdaptor == null)
throw new IllegalStateException("Cannot load SecurityAdaptor");
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -1,35 +1,34 @@
/*
-* 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.wsf.spi.tools;
-import org.jboss.ws.integration.FactoryLoader;
-import org.jboss.wsf.spi.tools.WSContractConsumerFactory;
-
import java.io.File;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
+import org.jboss.wsf.spi.utils.ServiceLoader;
+
/**
* WSContractConsumer is responsible for generating JAX-WS client and server
* artifacts from the specified WSDL file. To implement a client, one would use
@@ -56,7 +55,7 @@
{
return newInstance(Thread.currentThread().getContextClassLoader());
}
-
+
/**
* Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be used to
* locate the WebServiceImporterProvide implementation
@@ -66,40 +65,40 @@
*/
public static WSContractConsumer newInstance(ClassLoader loader)
{
- ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(loader);
- WSContractConsumerFactory factory = (WSContractConsumerFactory)
- FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+ WSContractConsumerFactory factory = (WSContractConsumerFactory)ServiceLoader.loadService(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
return factory.createConsumer();
}
- finally{
+ finally
+ {
Thread.currentThread().setContextClassLoader(oldLoader);
}
}
-
+
/**
* Specifies the JAX-WS and JAXB binding files to use on import operations.
*
* @param bindingFiles list of JAX-WS or JAXB binding files
*/
public abstract void setBindingFiles(List<File> bindingFiles);
-
+
/**
* Sets the OASIS XML Catalog file to use for entity resolution.
*
* @param catalog the OASIS XML Catalog file
*/
public abstract void setCatalog(File catalog);
-
+
/**
* Sets the main output directory. If the directory does not exist, it will be created.
*
* @param directory the root directory for generated files
*/
public abstract void setOutputDirectory(File directory);
-
+
/**
* Sets the source directory. This directory will contain any generated Java source.
* If the directory does not exist, it will be created. If not specified,
@@ -108,15 +107,14 @@
* @param directory the root directory for generated source code
*/
public abstract void setSourceDirectory(File directory);
-
+
/**
* Enables/Disables Java source generation.
*
* @param generateSource whether or not to generate Java source.
*/
public abstract void setGenerateSource(boolean generateSource);
-
-
+
/**
* Sets the target package for generated source. If not specified the default
* is based off of the XML namespace.
@@ -124,14 +122,14 @@
* @param targetPackage the target package for generated source
*/
public abstract void setTargetPackage(String targetPackage);
-
+
/**
* Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes to a custom value.
*
* @param wsdlLocation the custom WSDL location to use in generated source
*/
public abstract void setWsdlLocation(String wsdlLocation);
-
+
/**
* Sets the PrintStream to use for status feedback. The simplest example
* would be to use System.out.
@@ -139,8 +137,7 @@
* @param messageStream the stream to use for status messages:
*/
public abstract void setMessageStream(PrintStream messageStream);
-
-
+
/**
* Sets the additional classpath to use if/when invoking the Java compiler.
* Typically an implementation will use the system <code>java.class.path</code>
@@ -153,7 +150,7 @@
* single jar or directory
*/
public abstract void setAdditionalCompilerClassPath(List<String> classPath);
-
+
/**
* Generate the required artifacts using the specified WSDL URL. This method
* may be called more than once, although this is probably not desireable
@@ -161,7 +158,7 @@
* @param wsdl the URL of the WSDL
*/
public abstract void consume(URL wsdl);
-
+
/**
* Generate the required artifacts using the specified WSDL. This method
* may be called more than once, although this is probably not desireable.
@@ -182,7 +179,7 @@
File file = new File(wsdl);
url = file.toURL();
}
-
+
consume(url);
}
}
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -1,11 +1,9 @@
package org.jboss.wsf.spi.tools;
-import org.jboss.wsf.spi.tools.WSContractProviderFactory;
-import org.jboss.ws.integration.FactoryLoader;
-
import java.io.File;
import java.io.PrintStream;
+import org.jboss.wsf.spi.utils.ServiceLoader;
/**
* WSContractProvider is responsible for generating the required portable
@@ -33,12 +31,12 @@
{
private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl";
public static final String PROVIDER_PROPERTY = "org.jboss.wsf.tools.ProviderFactoryImpl";
-
- protected WSContractProvider()
+
+ protected WSContractProvider()
{
-
+
}
-
+
/**
* Obtain a new instance of a WSContractProvider. This will use the current
* thread's context class loader to locate the WSContractProviderFactory
@@ -50,7 +48,7 @@
{
return newInstance(Thread.currentThread().getContextClassLoader());
}
-
+
/**
* Obtain a new instance of a WSContractProvider. The specified ClassLoader will be used to
* locate the WSContractProviderFactory implementation
@@ -60,40 +58,40 @@
*/
public static WSContractProvider newInstance(ClassLoader loader)
{
- ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(loader);
- WSContractProviderFactory factory = (WSContractProviderFactory)
- FactoryLoader.loadFactory(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
+ WSContractProviderFactory factory = (WSContractProviderFactory)ServiceLoader.loadService(PROVIDER_PROPERTY, DEFAULT_PROVIDER);
return factory.createProvider(loader);
}
- finally{
+ finally
+ {
Thread.currentThread().setContextClassLoader(oldLoader);
}
}
-
+
/**
* Enables/Disables WSDL generation.
*
* @param generateWsdl whether or not to generate WSDL
*/
public abstract void setGenerateWsdl(boolean generateWsdl);
-
+
/**
* Enables/Disables Java source generation.
*
* @param generateSource whether or not to generate Java source.
*/
public abstract void setGenerateSource(boolean generateSource);
-
+
/**
* Sets the main output directory. If the directory does not exist, it will be created.
*
* @param directory the root directory for generated files
*/
public abstract void setOutputDirectory(File directory);
-
+
/**
* Sets the resource directory. This directory will contain any generated
* WSDL and XSD files. If the directory does not exist, it will be created.
@@ -102,7 +100,7 @@
* @param directory the root directory for generated resource files
*/
public abstract void setResourceDirectory(File directory);
-
+
/**
* Sets the source directory. This directory will contain any generated Java source.
* If the directory does not exist, it will be created. If not specified,
@@ -111,7 +109,7 @@
* @param directory the root directory for generated source code
*/
public abstract void setSourceDirectory(File directory);
-
+
/**
* Sets the ClassLoader used to discover types. This defaults to the one used
* in instantiation.
@@ -119,7 +117,7 @@
* @param loader the ClassLoader to use
*/
public abstract void setClassLoader(ClassLoader loader);
-
+
/**
* Generates artifacts using the current settings. This method may be invoked
* more than once (e.g. multiple endpoints).
@@ -137,7 +135,7 @@
* @throws RuntimeException if any error occurs during processing
*/
public abstract void provide(Class<?> endpointClass);
-
+
/**
* Sets the PrintStream to use for status feedback. The simplest example
* would be to use System.out.
Added: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java (rev 0)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -0,0 +1,251 @@
+/*
+ * 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.spi.utils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+// $Id$
+
+/**
+ * Load a service class using this ordered lookup procedure
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Dec-2006
+ */
+public abstract class ServiceLoader
+{
+ /**
+ * This method uses the algirithm below using the JAXWS Provider as an example.
+ *
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+ *
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key is
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+ *
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+ * as the name of the implementation class.
+ *
+ * 4. Finally, a default implementation class name is used.
+ */
+ public static Object loadService(String propertyName, String defaultFactory)
+ {
+ Object factory = loadFromServices(propertyName, null);
+ if (factory == null)
+ {
+ factory = loadFromPropertiesFile(propertyName, null);
+ }
+ if (factory == null)
+ {
+ factory = loadFromSystemProperty(propertyName, defaultFactory);
+ }
+ return factory;
+ }
+
+ /** Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ */
+ public static Object loadFromServices(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /** Use the system property
+ */
+ public static Object loadFromSystemProperty(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ String factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /**
+ * Use the properties file "${java.home}/lib/jaxws.properties" in the JRE directory.
+ * This configuration file is in standard java.util.Properties format and contains the
+ * fully qualified name of the implementation class with the key being the system property defined above.
+ */
+ public static Object loadFromPropertiesFile(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+ PrivilegedAction action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ private static Object loadDefault(String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the default factory implementation class.
+ if (defaultFactory != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+ Class factoryClass = loader.loadClass(defaultFactory);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load: " + defaultFactory, t);
+ }
+ }
+
+ return factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename, ex);
+ }
+ }
+ }
+}
Property changes on: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-2.0/jbossws-core/.classpath
===================================================================
--- branches/jbossws-2.0/jbossws-core/.classpath 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/.classpath 2007-06-08 15:50:12 UTC (rev 3509)
@@ -15,7 +15,7 @@
<classpathentry kind="lib" path="thirdparty/jboss-j2ee.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-remoting.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss-remoting.jar" sourcepath="thirdparty/jboss-remoting-src.jar"/>
<classpathentry kind="lib" path="thirdparty/jbosssx-client.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="thirdparty/mail.jar"/>
Modified: branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml 2007-06-08 15:50:12 UTC (rev 3509)
@@ -77,6 +77,7 @@
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip" dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting-src.jar" dest="${thirdparty.dir}/jboss-remoting-src.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar" dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx.jar" dest="${thirdparty.dir}/jbosssx.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-src.zip" dest="${thirdparty.dir}/jbosssx-src.zip" usetimestamp="true" verbose="true"/>
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/component-info.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/component-info.xml 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/component-info.xml 2007-06-08 15:50:12 UTC (rev 3509)
@@ -31,6 +31,9 @@
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id@"/>
</import>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting@"/>
+ </import>
<import componentref="stax-api">
<compatible version="@stax-api@"/>
</import>
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -25,11 +25,10 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Properties;
+import java.util.logging.Logger;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-
/** The javax.xml.rpc.ServiceFactory is an abstract class that provides a
* factory for the creation of instances of the type javax.xml.rpc.Service.
* This abstract class follows the abstract static factory design pattern.
@@ -46,7 +45,7 @@
public abstract class ServiceFactory
{
// provide logging
- private static Logger log = Logger.getLogger(ServiceFactory.class);
+ private static Logger log = Logger.getLogger(ServiceFactory.class.getName());
// The singlton
private static ServiceFactory factory;
@@ -101,7 +100,7 @@
}
catch (ClassNotFoundException e1)
{
- if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
+ log.severe("Cannot load factory: " + factoryName);
}
}
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -23,12 +23,12 @@
// $Id$
+import java.util.logging.Logger;
+
import javax.xml.namespace.QName;
import javax.xml.soap.Detail;
import javax.xml.soap.Name;
-import org.jboss.logging.Logger;
-
/** The SOAPFaultException exception represents a SOAP fault.
*
* The message part in the SOAP fault maps to the contents of faultdetail
@@ -49,7 +49,7 @@
public class SOAPFaultException extends RuntimeException
{
// provide logging
- private static Logger log = Logger.getLogger(SOAPFaultException.class);
+ private static Logger log = Logger.getLogger(SOAPFaultException.class.getName());
private QName faultCode;
private String faultString;
@@ -61,7 +61,7 @@
super(faultString);
Name detailName = faultDetail != null ? faultDetail.getElementName() : null;
- if(log.isDebugEnabled()) log.debug("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
+ log.fine("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
this.faultCode = faultCode;
this.faultString = faultString;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -24,8 +24,6 @@
import java.io.IOException;
import java.io.InputStream;
-import org.jboss.ws.integration.FactoryLoader;
-
/**
A factory for creating SOAPMessage objects.
@@ -72,7 +70,7 @@
try
{
String propertyName = "javax.xml.soap.MessageFactory";
- factory = (MessageFactory)FactoryLoader.loadFactory(propertyName, null);
+ factory = (MessageFactory)SAAJFactoryLoader.loadFactory(propertyName, null);
}
catch (RuntimeException rte)
{
Added: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -0,0 +1,194 @@
+/*
+ * 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 javax.xml.soap;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+
+// $Id$
+
+/**
+ * Load a factory using this ordered lookup procedure
+ *
+ * <ol>
+ * <li>Use the system property
+ * <li>Use the properties file "lib/jaxm.properties" in the JRE directory
+ * <li>Use the Services API (as detailed in the JAR specification), if available, to determine the classname
+ * <li>Use the default factory implementation class
+ * </ol>
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Dec-2006
+ */
+public class SAAJFactoryLoader
+{
+ private SAAJFactoryLoader()
+ {
+ }
+
+ /**
+ *
+ * @return the factory impl, or null
+ */
+ public static Object loadFactory(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the system property
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ String factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+ if (factory == null)
+ {
+ action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ if (factory == null)
+ {
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ //if(log.isTraceEnabled()) log.trace("Load from Service API " + filename + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ try
+ {
+ factoryName = defaultFactory;
+ //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ return factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename, ex);
+ }
+ }
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJFactoryLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -21,9 +21,6 @@
*/
package javax.xml.soap;
-import org.jboss.ws.integration.FactoryLoader;
-
-
// $Id$
/**
@@ -60,7 +57,7 @@
{
String propertyName = "javax.xml.soap.MetaFactory";
String defaultImpl = "org.jboss.ws.core.soap.SAAJMetaFactoryImpl";
- SAAJMetaFactory factory = (SAAJMetaFactory)FactoryLoader.loadFactory(propertyName, defaultImpl);
+ SAAJMetaFactory factory = (SAAJMetaFactory)SAAJFactoryLoader.loadFactory(propertyName, defaultImpl);
if (factory == null)
throw new SOAPException("Failed to to determine the implementation class for: " + propertyName);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -23,9 +23,8 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.util.logging.Logger;
-import org.jboss.logging.Logger;
-
/** A factory for creating SOAPConnection objects. Implementation of this class
* is optional. If SOAPConnectionFactory.newInstance() throws an
* UnsupportedOperationException then the implementation does not support the
@@ -40,7 +39,7 @@
public abstract class SOAPConnectionFactory
{
// provide logging
- private static Logger log = Logger.getLogger(SOAPConnectionFactory.class);
+ private static Logger log = Logger.getLogger(SOAPConnectionFactory.class.getName());
private static final String DEFAULT_SOAP_CONNECTION_FACTORY = "org.jboss.ws.core.soap.SOAPConnectionFactoryImpl";
private static final String[] alternativeFactories = new String[] { "org.jboss.webservice.soap.SOAPConnectionFactoryImpl",
@@ -81,7 +80,7 @@
}
catch (ClassNotFoundException e1)
{
- if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
+ log.severe("Cannot load factory: " + factoryName);
}
}
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -25,7 +25,6 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.integration.FactoryLoader;
import org.w3c.dom.Element;
/** SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
@@ -62,7 +61,7 @@
try
{
String propertyName = "javax.xml.soap.SOAPFactory";
- soapFactory = (SOAPFactory)FactoryLoader.loadFactory(propertyName, null);
+ soapFactory = (SOAPFactory)SAAJFactoryLoader.loadFactory(propertyName, null);
}
catch (RuntimeException rte)
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -28,15 +28,14 @@
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.logging.Logger;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-
public abstract class AddressingBuilder implements AddressingType
{
// provide logging
- private static Logger log = Logger.getLogger(AddressingBuilder.class);
+ private static Logger log = Logger.getLogger(AddressingBuilder.class.getName());
protected AddressingBuilder()
{
@@ -67,7 +66,7 @@
}
catch (Exception e)
{
- log.warn("Could not create and instance of " + name + " trying " + DEFAULT_ADDRESSING_BUILDER);
+ log.warning("Could not create and instance of " + name + " trying " + DEFAULT_ADDRESSING_BUILDER);
}
// default builder
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -33,7 +33,6 @@
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import org.jboss.ws.integration.FactoryLoader;
import org.w3c.dom.Element;
/**
@@ -88,7 +87,7 @@
{
try
{
- return (Provider)FactoryLoader.loadFactory(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
+ return (Provider)ProviderLoader.loadProvider(DEFAULT_JAXWSPROVIDER);
}
catch (WebServiceException ex)
{
Added: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -0,0 +1,205 @@
+/*
+ * 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 javax.xml.ws.spi;
+
+// $Id$
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+/**
+ * Load the provider using the following algorithm.
+ *
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+ *
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key is
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+ *
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+ * as the name of the implementation class.
+ *
+ * 4. Finally, a default implementation class name is used.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 03-May-2006
+ */
+public abstract class ProviderLoader
+{
+ /**
+ * This method uses the algirithm described above.
+ *
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation class.
+ *
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key is
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class.
+ *
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used
+ * as the name of the implementation class.
+ *
+ * 4. Finally, a default implementation class name is used.
+ */
+ public static Provider loadProvider(String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ String propertyName = Provider.JAXWSPROVIDER_PROPERTY;
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream, "UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+
+ // Use the properties file "lib/jaxws.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+ if (factory == null)
+ {
+ PrivilegedAction action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties = (Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use system property
+ if (factory == null)
+ {
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName + ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
+ Class factoryClass = loader.loadClass(defaultFactory);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load: " + defaultFactory, t);
+ }
+ }
+
+ return (Provider)factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename, ex);
+ }
+ }
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/ProviderLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -23,29 +23,34 @@
// $Id$
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.xml.rpc.Stub;
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.EndpointReference;
+
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.remoting.marshal.UnMarshaller;
-import org.jboss.ws.core.*;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.MessageTrace;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.config.EndpointProperty;
-import javax.xml.rpc.Stub;
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.EndpointReference;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.SocketTimeoutException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
/**
* SOAPConnection implementation.
* <p/>
@@ -100,10 +105,6 @@
// HTTPClientInvoker conect sends gratuitous POST
// http://jira.jboss.com/jira/browse/JBWS-711
clientConfig.put(Client.ENABLE_LEASE, false);
-
- // Enable chunked encoding
- // This is the default size. May be overridden through endpoint config
- clientConfig.put("chunkedLength", "1024");
}
public boolean isClosed()
@@ -156,9 +157,6 @@
targetAddress = endpoint.toString();
}
- // remoting props may come from client config as well
- mergeConfigContribution();
-
// setup remoting client
Map<String, Object> metadata = createRemotingMetaData(reqMessage, callProps);
Client client = createRemotingClient(endpoint, targetAddress, oneway);
@@ -167,7 +165,7 @@
{
if (log.isDebugEnabled())
log.debug("Remoting metadata: " + metadata);
-
+
// debug the outgoing message
MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
@@ -195,9 +193,9 @@
}
catch (Throwable th)
{
- if(timeout!=null && (th.getCause() instanceof SocketTimeoutException))
+ if (timeout != null && (th.getCause() instanceof SocketTimeoutException))
{
- throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));
+ throw new WSTimeoutException("Timeout after: " + timeout + "ms", new Long(timeout.toString()));
}
IOException io = new IOException("Could not transmit message");
@@ -206,25 +204,6 @@
}
}
- private void mergeConfigContribution()
- {
- // check for config property contribution
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if(msgContext!=null)
- {
- Properties epmdProps = msgContext.getEndpointMetaData().getProperties();
-
- // chunksize settings
- String chunkSizeValue = epmdProps.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
- int chunkSize = chunkSizeValue!=null ? Integer.valueOf(chunkSizeValue) : -1;
- if(chunkSize>0)
- clientConfig.put(EndpointProperty.CHUNKED_ENCODING_SIZE, chunkSizeValue);
- else
- clientConfig.remove("chunkedLength");
-
- }
- }
-
private String addURLParameter(String url, String key, String value)
{
int qmIndex = url.indexOf("?");
@@ -278,6 +257,7 @@
private Map<String, Object> createRemotingMetaData(MessageAbstraction reqMessage, Map callProps)
{
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
Map<String, Object> metadata = new HashMap<String, Object>();
@@ -288,6 +268,27 @@
if (reqMessage != null)
{
populateHeaders(reqMessage, metadata);
+
+ // Enable chunked encoding. This is the default size.
+ clientConfig.put("chunkedLength", "1024");
+
+ // May be overridden through endpoint config
+ if (msgContext != null)
+ {
+ Properties epmdProps = msgContext.getEndpointMetaData().getProperties();
+
+ // chunksize settings
+ String chunkSizeValue = epmdProps.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
+ int chunkSize = chunkSizeValue != null ? Integer.valueOf(chunkSizeValue) : -1;
+ if (chunkSize > 0)
+ {
+ clientConfig.put(EndpointProperty.CHUNKED_ENCODING_SIZE, chunkSizeValue);
+ }
+ else
+ {
+ clientConfig.remove("chunkedLength");
+ }
+ }
}
else
{
@@ -345,7 +346,7 @@
protected void populateHeaders(MessageAbstraction reqMessage, Map<String, Object> metadata)
{
MimeHeaders mimeHeaders = reqMessage.getMimeHeaders();
-
+
Properties props = new Properties();
metadata.put("HEADER", props);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -45,8 +45,8 @@
import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.soap.Style;
import org.jboss.ws.core.soap.XMLFragment;
-import org.jboss.ws.integration.FactoryLoader;
import org.jboss.wsf.spi.utils.DOMUtils;
+import org.jboss.wsf.spi.utils.ServiceLoader;
import org.w3c.dom.Element;
/**
@@ -111,7 +111,7 @@
try
{
soapBody.removeContents();
- EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+ EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
envBuilder.setStyle(style);
Element domBodyElement = DOMUtils.sourceToElement(source);
envBuilder.buildBodyElementRpc(soapBody, domBodyElement);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -28,7 +28,7 @@
import javax.xml.ws.Endpoint;
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
/**
* An abstract HTTP Server
@@ -53,7 +53,7 @@
*/
public static HttpServer create()
{
- HttpServer server = (HttpServer)FactoryLoader.loadFactory(HTTP_SERVER_PROPERTY, null);
+ HttpServer server = (HttpServer)ServiceLoader.loadService(HTTP_SERVER_PROPERTY, null);
return server;
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -45,7 +45,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder;
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
import org.jboss.wsf.spi.utils.IOUtils;
/**
@@ -249,7 +249,7 @@
soapMessage.setAttachments(attachments);
// Get the SOAPEnvelope builder
- EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+ EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
envBuilder.setStyle(getStyle());
// Build the payload
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -143,7 +143,7 @@
}
public SOAPElement setElementQNameInternal(QName qname) throws SOAPException
- {
+ {
elementName = new NameImpl(qname);
Document owner = domNode.getOwnerDocument();
@@ -153,7 +153,6 @@
return this.completeNamespaceDeclaration();
}
-
/**
* Adds an attribute with the specified name and value to this SOAPElement object.
*
@@ -325,8 +324,17 @@
public SOAPElement addTextNode(String value) throws SOAPException
{
log.trace("addTextNode: " + value);
- org.w3c.dom.Text domText = element.getOwnerDocument().createTextNode(value);
- javax.xml.soap.Text soapText = new TextImpl(domText);
+ org.w3c.dom.Node domNode;
+ if (value.startsWith("<!--") && value.endsWith("-->"))
+ {
+ value = value.substring(4, value.length() - 3);
+ domNode = element.getOwnerDocument().createComment(value);
+ }
+ else
+ {
+ domNode = element.getOwnerDocument().createTextNode(value);
+ }
+ javax.xml.soap.Text soapText = new TextImpl(domNode);
appendChild(soapText);
return this;
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -24,7 +24,6 @@
import java.io.IOException;
import java.io.OutputStream;
-import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -42,7 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.integration.FactoryLoader;
+import org.jboss.wsf.spi.utils.ServiceLoader;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
@@ -172,7 +172,7 @@
else
throw new SOAPException("Unsupported DOMSource node: " + node);
- EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+ EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
envBuilder.setStyle(Style.DOCUMENT);
envBuilder.build(soapMessage, domElement);
}
@@ -181,7 +181,7 @@
try
{
StreamSource streamSource = (StreamSource)source;
- EnvelopeBuilder envBuilder = (EnvelopeBuilder)FactoryLoader.loadFactory(EnvelopeBuilder.class.getName(), null);
+ EnvelopeBuilder envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
envBuilder.setStyle(Style.DOCUMENT);
InputStream stream = streamSource.getInputStream();
Reader reader = streamSource.getReader();
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-06-08 15:50:12 UTC (rev 3509)
@@ -89,12 +89,12 @@
/**
* [JBWS-1706] SOAPConnection.get fails with ProtocolException
*
- * Gets a SOAP response message from a specific endpoint
- * and blocks until it has received the response. HTTP-GET
- * from a valid endpoint that contains a valid webservice
- * resource should succeed. The endpoint tested contains
- * a valid webservice resource that must return a SOAP
- * response. HTTP-GET must succeed.
+ * Gets a SOAP response message from a specific endpoint
+ * and blocks until it has received the response. HTTP-GET
+ * from a valid endpoint that contains a valid webservice
+ * resource should succeed. The endpoint tested contains
+ * a valid webservice resource that must return a SOAP
+ * response. HTTP-GET must succeed.
*
*/
public void testSOAPConnectionGet() throws Exception
@@ -106,6 +106,7 @@
SOAPEnvelope env = resMessage.getSOAPPart().getEnvelope();
String envStr = DOMWriter.printNode(env, false);
- System.out.println(envStr);
+ String expStr = "<ztrade:GetLastTradePriceResponse xmlns:ztrade='http://wombat.ztrade.com'><Price>95.12</Price></ztrade:GetLastTradePriceResponse>";
+ assertTrue(envStr.contains(expStr));
}
}
Modified: branches/jbossws-2.0/jbossws-core/version.properties
===================================================================
--- branches/jbossws-2.0/jbossws-core/version.properties 2007-06-08 15:44:29 UTC (rev 3508)
+++ branches/jbossws-2.0/jbossws-core/version.properties 2007-06-08 15:50:12 UTC (rev 3509)
@@ -20,7 +20,7 @@
hibernate=3.2.1.GA
jaxen=1.1-beta-10
jboss-ejb3=1.0.0.CR9-jboss4.0.5
-jboss-remoting=2.0.0.GA
+jboss-remoting=2.2.0.SP4
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.2.0.GA
18 years, 10 months
JBossWS SVN: r3508 - in trunk: integration/spi/src/main/java/org/jboss/wsf/spi/management and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-06-08 11:44:29 -0400 (Fri, 08 Jun 2007)
New Revision: 3508
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBWS-1609] Address in WSDL - Port value is -1 when server is requested with default port 80
Modified: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-08 15:10:27 UTC (rev 3507)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-08 15:44:29 UTC (rev 3508)
@@ -94,6 +94,7 @@
* A request handler
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 25-Apr-2007
*/
public class RequestHandlerImpl implements RequestHandler
@@ -489,14 +490,10 @@
String resPath = (String)req.getParameter("resource");
URL reqURL = new URL(req.getRequestURL().toString());
- String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
ServerConfigFactory factory = ServerConfigFactory.getInstance();
ServerConfig config = factory.getServerConfig();
- if (config.getWebServiceHost().equals(ServerConfig.UNDEFINED_HOSTNAME) == false)
- {
- wsdlHost = config.getWebServiceHost();
- }
+ String wsdlHost = config.getDisplayHost(epMetaData.getEndpointAddress(),reqURL);
+
log.debug("WSDL request, using host: " + wsdlHost);
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-06-08 15:10:27 UTC (rev 3507)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-06-08 15:44:29 UTC (rev 3508)
@@ -25,7 +25,9 @@
import java.io.File;
import java.net.InetAddress;
+import java.net.MalformedURLException;
import java.net.UnknownHostException;
+import java.net.URL;
import java.util.Iterator;
import java.util.Set;
@@ -43,6 +45,7 @@
*
* @author Thomas.Diesler(a)jboss.org
* @author darran.lofthouse(a)jboss.com
+ * @author mageshbk(a)jboss.com
* @since 08-May-2006
*/
public class BasicServerConfig implements ServerConfig
@@ -215,4 +218,63 @@
}
return server;
}
+
+ public String getDisplayAddress(String endpointAddress, URL requestURL) throws MalformedURLException
+ {
+ URL displayURL = new URL(endpointAddress);
+ String displayHost = getDisplayHost(endpointAddress, requestURL);
+
+ String displayAddress = displayHost + displayURL.getPath();
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL soap:address from '" + endpointAddress + "' to '" + displayAddress + "'");
+ }
+ return displayAddress;
+ }
+
+ /*
+ * Formats the Service endpoint host according to the beans.xml definition and
+ * the requested url and returns the URL as string
+ *
+ */
+ public String getDisplayHost(String endpointAddress, URL requestURL) throws MalformedURLException
+ {
+ URL displayURL = new URL(endpointAddress);
+ String protocol = displayURL.getProtocol();
+ String host = displayURL.getHost();
+ int port = displayURL.getPort();
+ String uriScheme = requestURL.getProtocol();
+ if (this.modifySOAPAddress || host.equals(BasicServerConfig.UNDEFINED_HOSTNAME) == true)
+ {
+ //Modify the address
+ if (this.getWebServiceHost().equals(BasicServerConfig.UNDEFINED_HOSTNAME) == true)
+ {
+ //Use the incoming request's address
+ protocol = uriScheme;
+ host = requestURL.getHost();
+ port = requestURL.getPort();
+ }
+ else
+ {
+ //Use the address given in jboss-beans.xml
+ protocol = uriScheme;
+ host = this.getWebServiceHost();
+ if (protocol.equals("https"))
+ {
+ port = this.getWebServiceSecurePort();
+ }
+ else
+ {
+ port = this.getWebServicePort();
+ }
+ }
+ }
+ String displayHost = protocol + "://" + host + (port > 0 ? ":" + port : "");
+
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL host from '" + protocol + "://" + host + ":" + port + "' to '" + displayHost + "'");
+ }
+ return displayHost;
+ }
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2007-06-08 15:10:27 UTC (rev 3507)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2007-06-08 15:44:29 UTC (rev 3508)
@@ -24,7 +24,9 @@
// $Id$
import java.io.File;
+import java.net.MalformedURLException;
import java.net.UnknownHostException;
+import java.net.URL;
import javax.management.ObjectName;
@@ -34,6 +36,7 @@
* Interface to container independent config
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 08-May-2006
*/
public interface ServerConfig
@@ -66,4 +69,8 @@
boolean isModifySOAPAddress();
void setModifySOAPAddress(boolean flag);
+
+ String getDisplayAddress(String endpointAddress, URL requestURL) throws MalformedURLException;
+
+ String getDisplayHost(String endpointAddress, URL requestURL) throws MalformedURLException;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-06-08 15:10:27 UTC (rev 3507)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-06-08 15:44:29 UTC (rev 3508)
@@ -40,11 +40,14 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
/**
* The servlet that that is associated with context /jbossws
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 21-Mar-2005
*/
public class ContextServlet extends HttpServlet
@@ -94,6 +97,9 @@
{
Endpoint ep = epRegistry.getEndpoint(oname);
ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
+ ServerConfigFactory factory = ServerConfigFactory.getInstance();
+ ServerConfig config = factory.getServerConfig();
+ String displayAddress = config.getDisplayAddress(sepMetaData.getEndpointAddress(),requestURL);
writer.print("<tr>");
writer.print(" <td>ServiceEndpointID</td>");
@@ -101,7 +107,7 @@
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td>ServiceEndpointAddress</td>");
- writer.print(" <td><a href='" + sepMetaData.getEndpointAddress() + "?wsdl'>" + sepMetaData.getEndpointAddress() + "?wsdl</a></td>");
+ writer.print(" <td><a href='" + displayAddress + "?wsdl'>" + displayAddress + "?wsdl</a></td>");
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td colspan=2>");
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-06-08 15:10:27 UTC (rev 3507)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-06-08 15:44:29 UTC (rev 3508)
@@ -46,6 +46,7 @@
* For a discussion of this topic.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 23-Mar-2005
*/
public class WSDLRequestHandler
@@ -136,10 +137,10 @@
if (! (wsdlHost.startsWith("http://") || wsdlHost.startsWith("https://")) )
{
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = reqURL.getPort();
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
}
String newLocation = completeHost + reqPath + "?wsdl&resource=" + newResourcePath;
@@ -159,25 +160,12 @@
String orgLocation = locationAttr.getNodeValue();
URL locURL = new URL(orgLocation);
- String locProtocol = locURL.getProtocol();
String locPath = locURL.getPath();
- if (reqURL.getProtocol().equals(locProtocol) && reqURL.getPath().equals(locPath))
- {
- String completeHost = wsdlHost;
- if (! (completeHost.startsWith("http://") || completeHost.startsWith("https://")) )
- {
- int locPort = locURL.getPort();
- String hostAndPort = wsdlHost + (locPort > 0 ? ":" + locPort : "");
+ String newLocation = wsdlHost + locPath;
+ locationAttr.setNodeValue(newLocation);
- completeHost = locProtocol + "://" + hostAndPort;
- }
-
- String newLocation = completeHost + locPath;
- locationAttr.setNodeValue(newLocation);
-
- log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
- }
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
}
else
18 years, 10 months
JBossWS SVN: r3507 - in branches/jbossws-2.0: integration/spi/src/main/java/org/jboss/wsf/spi/management and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-06-08 11:10:27 -0400 (Fri, 08 Jun 2007)
New Revision: 3507
Modified:
branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
Log:
[JBWS-1609] Address in WSDL - Port value is -1 when server is requested with default port 80
Modified: branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-08 14:37:53 UTC (rev 3506)
+++ branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-08 15:10:27 UTC (rev 3507)
@@ -94,6 +94,7 @@
* A request handler
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 25-Apr-2007
*/
public class RequestHandlerImpl implements RequestHandler
@@ -489,14 +490,10 @@
String resPath = (String)req.getParameter("resource");
URL reqURL = new URL(req.getRequestURL().toString());
- String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
ServerConfigFactory factory = ServerConfigFactory.getInstance();
ServerConfig config = factory.getServerConfig();
- if (config.getWebServiceHost().equals(ServerConfig.UNDEFINED_HOSTNAME) == false)
- {
- wsdlHost = config.getWebServiceHost();
- }
+ String wsdlHost = config.getDisplayHost(epMetaData.getEndpointAddress(),reqURL);
+
log.debug("WSDL request, using host: " + wsdlHost);
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-06-08 14:37:53 UTC (rev 3506)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/BasicServerConfig.java 2007-06-08 15:10:27 UTC (rev 3507)
@@ -25,7 +25,9 @@
import java.io.File;
import java.net.InetAddress;
+import java.net.MalformedURLException;
import java.net.UnknownHostException;
+import java.net.URL;
import java.util.Iterator;
import java.util.Set;
@@ -43,6 +45,7 @@
*
* @author Thomas.Diesler(a)jboss.org
* @author darran.lofthouse(a)jboss.com
+ * @author mageshbk(a)jboss.com
* @since 08-May-2006
*/
public class BasicServerConfig implements ServerConfig
@@ -215,4 +218,63 @@
}
return server;
}
+
+ public String getDisplayAddress(String endpointAddress, URL requestURL) throws MalformedURLException
+ {
+ URL displayURL = new URL(endpointAddress);
+ String displayHost = getDisplayHost(endpointAddress, requestURL);
+
+ String displayAddress = displayHost + displayURL.getPath();
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL soap:address from '" + endpointAddress + "' to '" + displayAddress + "'");
+ }
+ return displayAddress;
+ }
+
+ /*
+ * Formats the Service endpoint host according to the beans.xml definition and
+ * the requested url and returns the URL as string
+ *
+ */
+ public String getDisplayHost(String endpointAddress, URL requestURL) throws MalformedURLException
+ {
+ URL displayURL = new URL(endpointAddress);
+ String protocol = displayURL.getProtocol();
+ String host = displayURL.getHost();
+ int port = displayURL.getPort();
+ String uriScheme = requestURL.getProtocol();
+ if (this.modifySOAPAddress || host.equals(BasicServerConfig.UNDEFINED_HOSTNAME) == true)
+ {
+ //Modify the address
+ if (this.getWebServiceHost().equals(BasicServerConfig.UNDEFINED_HOSTNAME) == true)
+ {
+ //Use the incoming request's address
+ protocol = uriScheme;
+ host = requestURL.getHost();
+ port = requestURL.getPort();
+ }
+ else
+ {
+ //Use the address given in jboss-beans.xml
+ protocol = uriScheme;
+ host = this.getWebServiceHost();
+ if (protocol.equals("https"))
+ {
+ port = this.getWebServiceSecurePort();
+ }
+ else
+ {
+ port = this.getWebServicePort();
+ }
+ }
+ }
+ String displayHost = protocol + "://" + host + (port > 0 ? ":" + port : "");
+
+ if (log.isDebugEnabled())
+ {
+ log.trace("Mapping WSDL host from '" + protocol + "://" + host + ":" + port + "' to '" + displayHost + "'");
+ }
+ return displayHost;
+ }
}
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2007-06-08 14:37:53 UTC (rev 3506)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2007-06-08 15:10:27 UTC (rev 3507)
@@ -24,7 +24,9 @@
// $Id$
import java.io.File;
+import java.net.MalformedURLException;
import java.net.UnknownHostException;
+import java.net.URL;
import javax.management.ObjectName;
@@ -34,6 +36,7 @@
* Interface to container independent config
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 08-May-2006
*/
public interface ServerConfig
@@ -66,4 +69,8 @@
boolean isModifySOAPAddress();
void setModifySOAPAddress(boolean flag);
+
+ String getDisplayAddress(String endpointAddress, URL requestURL) throws MalformedURLException;
+
+ String getDisplayHost(String endpointAddress, URL requestURL) throws MalformedURLException;
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-06-08 14:37:53 UTC (rev 3506)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-06-08 15:10:27 UTC (rev 3507)
@@ -40,11 +40,14 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
/**
* The servlet that that is associated with context /jbossws
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 21-Mar-2005
*/
public class ContextServlet extends HttpServlet
@@ -94,6 +97,9 @@
{
Endpoint ep = epRegistry.getEndpoint(oname);
ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
+ ServerConfigFactory factory = ServerConfigFactory.getInstance();
+ ServerConfig config = factory.getServerConfig();
+ String displayAddress = config.getDisplayAddress(sepMetaData.getEndpointAddress(),requestURL);
writer.print("<tr>");
writer.print(" <td>ServiceEndpointID</td>");
@@ -101,7 +107,7 @@
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td>ServiceEndpointAddress</td>");
- writer.print(" <td><a href='" + sepMetaData.getEndpointAddress() + "?wsdl'>" + sepMetaData.getEndpointAddress() + "?wsdl</a></td>");
+ writer.print(" <td><a href='" + displayAddress + "?wsdl'>" + displayAddress + "?wsdl</a></td>");
writer.print("</tr>");
writer.print("<tr>");
writer.print(" <td colspan=2>");
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-06-08 14:37:53 UTC (rev 3506)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-06-08 15:10:27 UTC (rev 3507)
@@ -46,6 +46,7 @@
* For a discussion of this topic.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author mageshbk(a)jboss.com
* @since 23-Mar-2005
*/
public class WSDLRequestHandler
@@ -136,10 +137,10 @@
if (! (wsdlHost.startsWith("http://") || wsdlHost.startsWith("https://")) )
{
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = reqURL.getPort();
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" + reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
}
String newLocation = completeHost + reqPath + "?wsdl&resource=" + newResourcePath;
@@ -159,25 +160,12 @@
String orgLocation = locationAttr.getNodeValue();
URL locURL = new URL(orgLocation);
- String locProtocol = locURL.getProtocol();
String locPath = locURL.getPath();
- if (reqURL.getProtocol().equals(locProtocol) && reqURL.getPath().equals(locPath))
- {
- String completeHost = wsdlHost;
- if (! (completeHost.startsWith("http://") || completeHost.startsWith("https://")) )
- {
- int locPort = locURL.getPort();
- String hostAndPort = wsdlHost + (locPort > 0 ? ":" + locPort : "");
+ String newLocation = wsdlHost + locPath;
+ locationAttr.setNodeValue(newLocation);
- completeHost = locProtocol + "://" + hostAndPort;
- }
-
- String newLocation = completeHost + locPath;
- locationAttr.setNodeValue(newLocation);
-
- log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
- }
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
}
else
18 years, 10 months
JBossWS SVN: r3506 - trunk/jbossws-core.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 10:37:53 -0400 (Fri, 08 Jun 2007)
New Revision: 3506
Modified:
trunk/jbossws-core/version.properties
Log:
remoting 2.2.0.SP4
Modified: trunk/jbossws-core/version.properties
===================================================================
--- trunk/jbossws-core/version.properties 2007-06-08 13:54:07 UTC (rev 3505)
+++ trunk/jbossws-core/version.properties 2007-06-08 14:37:53 UTC (rev 3506)
@@ -20,7 +20,7 @@
hibernate=3.2.1.GA
jaxen=1.1-beta-10
jboss-ejb3=1.0.0.CR9-jboss4.0.5
-jboss-remoting=2.0.0.GA
+jboss-remoting=2.2.0.SP4
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.2.0.GA
18 years, 10 months
JBossWS SVN: r3505 - branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-08 09:54:07 -0400 (Fri, 08 Jun 2007)
New Revision: 3505
Modified:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
Log:
Add test [JBWS-1706] SOAPConnection.get fails with ProtocolException
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-06-08 09:31:38 UTC (rev 3504)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2007-06-08 13:54:07 UTC (rev 3505)
@@ -28,11 +28,16 @@
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
import junit.framework.Test;
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.wsf.spi.utils.DOMWriter;
/**
* Deploying a war that also contains normal servlets the web.xml is modified as if they are all endpoints
@@ -63,14 +68,14 @@
}
}
- public void testAccessEnpoint() throws Exception
+ public void testEnpointAccess() throws Exception
{
assertEquals(ServletTest.MESSAGE, port.echoString(ServletTest.MESSAGE));
}
- public void testAccessServlet() throws Exception
+ public void testServletAccess() throws Exception
{
- URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest");
+ URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest?type=txtMessage");
InputStream is = servletURL.openStream();
InputStreamReader isr = new InputStreamReader(is);
@@ -80,4 +85,27 @@
assertEquals(ServletTest.MESSAGE, line);
}
+
+ /**
+ * [JBWS-1706] SOAPConnection.get fails with ProtocolException
+ *
+ * Gets a SOAP response message from a specific endpoint
+ * and blocks until it has received the response. HTTP-GET
+ * from a valid endpoint that contains a valid webservice
+ * resource should succeed. The endpoint tested contains
+ * a valid webservice resource that must return a SOAP
+ * response. HTTP-GET must succeed.
+ *
+ */
+ public void testSOAPConnectionGet() throws Exception
+ {
+ URL servletURL = new URL("http://" + getServerHost() + ":8080" + "/jaxrpc-jbws1093/ServletTest?type=soapMessage");
+
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+ SOAPMessage resMessage = con.get(servletURL);
+ SOAPEnvelope env = resMessage.getSOAPPart().getEnvelope();
+
+ String envStr = DOMWriter.printNode(env, false);
+ System.out.println(envStr);
+ }
}
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2007-06-08 09:31:38 UTC (rev 3504)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2007-06-08 13:54:07 UTC (rev 3505)
@@ -22,12 +22,21 @@
package org.jboss.test.ws.jaxrpc.jbws1093;
import java.io.IOException;
+import java.io.OutputStream;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
/**
* JBWS-1093 - This servlet is called ServletTest to check that we are
@@ -40,10 +49,44 @@
{
public static final String MESSAGE = "Success!!";
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
- PrintWriter writer = response.getWriter();
- writer.println(MESSAGE);
+ String reqType = req.getParameter("type");
+ if ("txtMessage".equals(reqType))
+ {
+ PrintWriter writer = res.getWriter();
+ writer.println(MESSAGE);
+ }
+ else if ("soapMessage".equals(reqType))
+ {
+ try
+ {
+ // Create a SOAPMessage
+ MessageFactory msgFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+ SOAPMessage msg = msgFactory.createMessage();
+
+ SOAPPart sp = msg.getSOAPPart();
+
+ SOAPEnvelope env = sp.getEnvelope();
+
+ SOAPBody body = env.getBody();
+
+ Name elName = env.createName("GetLastTradePriceResponse", "ztrade", "http://wombat.ztrade.com");
+ body.addBodyElement(elName).addChildElement("Price").addTextNode("95.12");
+
+ msg.saveChanges();
+
+ res.setStatus(HttpServletResponse.SC_OK);
+
+ // Write out the message on the response stream.
+ OutputStream os = res.getOutputStream();
+ msg.writeTo(os);
+ os.flush();
+ }
+ catch (SOAPException e)
+ {
+ throw new ServletException(e);
+ }
+ }
}
-
}
18 years, 10 months
JBossWS SVN: r3504 - in branches/jbossws-2.0: integration/native/src/main/etc and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 05:31:38 -0400 (Fri, 08 Jun 2007)
New Revision: 3504
Modified:
branches/jbossws-2.0/integration/native/ant-import/build-bin-dist.xml
branches/jbossws-2.0/integration/native/ant-import/build-deploy.xml
branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml
branches/jbossws-2.0/integration/native/src/main/etc/bin-dist-deploy.xml
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
Log:
Include jbossws-core scripts in distribution
Modified: branches/jbossws-2.0/integration/native/ant-import/build-bin-dist.xml
===================================================================
--- branches/jbossws-2.0/integration/native/ant-import/build-bin-dist.xml 2007-06-08 09:25:02 UTC (rev 3503)
+++ branches/jbossws-2.0/integration/native/ant-import/build-bin-dist.xml 2007-06-08 09:31:38 UTC (rev 3504)
@@ -67,6 +67,14 @@
<include name="*.bat"/>
</fileset>
</copy>
+
+ <copy todir="${bindist.bin.dir}">
+ <fileset dir="${core.dir}/src/main/etc">
+ <include name="*.sh"/>
+ <include name="*.bat"/>
+ </fileset>
+ </copy>
+
<chmod dir="${bindist.bin.dir}" perm="+x" includes="**/*.sh"/>
<!-- docs -->
Modified: branches/jbossws-2.0/integration/native/ant-import/build-deploy.xml
===================================================================
--- branches/jbossws-2.0/integration/native/ant-import/build-deploy.xml 2007-06-08 09:25:02 UTC (rev 3503)
+++ branches/jbossws-2.0/integration/native/ant-import/build-deploy.xml 2007-06-08 09:31:38 UTC (rev 3504)
@@ -27,7 +27,8 @@
jbosslibs="${int.jboss50.dir}/output/lib"
corelibs="${core.dir}/output/lib"
stacklibs="${int.native.dir}/output/lib"
- thirdpartylibs="${core.dir}/thirdparty"/>
+ thirdpartylibs="${core.dir}/thirdparty"
+ corescripts="${core.dir}/src/main/etc"/>
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
@@ -73,7 +74,8 @@
jbosslibs="${int.jboss40.dir}/output/lib"
corelibs="${core.dir}/output/lib"
stacklibs="${int.native.dir}/output/lib"
- thirdpartylibs="${core.dir}/thirdparty"/>
+ thirdpartylibs="${core.dir}/thirdparty"
+ corescripts="${core.dir}/src/main/etc"/>
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
Modified: branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 09:25:02 UTC (rev 3503)
+++ branches/jbossws-2.0/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 09:31:38 UTC (rev 3504)
@@ -23,6 +23,7 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
@@ -74,6 +75,16 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+ <copy todir="${jboss50.home}/bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss50.home}/bin" perm="+x" includes="*.sh"/>
</sequential>
</macrodef>
@@ -113,6 +124,15 @@
<delete file="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"/>
<!-- Undeploy juddi-service.sar -->
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <delete>
+ <fileset dir="${jboss50.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
@@ -122,6 +142,7 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
@@ -164,6 +185,17 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+ <copy todir="${jboss42.home}bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss42.home}/bin" perm="+x" includes="*.sh"/>
+
</sequential>
</macrodef>
@@ -205,6 +237,15 @@
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<!-- Undeploy juddi-service.sar -->
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <delete>
+ <fileset dir="${jboss42.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
@@ -214,6 +255,7 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
@@ -257,6 +299,17 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+ <copy todir="${jboss40.home}/bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss40.home}/bin" perm="+x" includes="*.sh"/>
+
</sequential>
</macrodef>
@@ -318,6 +371,15 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<!-- Remove only, do not deploy -->
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
+ <delete>
+ <fileset dir="${jboss40.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
Modified: branches/jbossws-2.0/integration/native/src/main/etc/bin-dist-deploy.xml
===================================================================
--- branches/jbossws-2.0/integration/native/src/main/etc/bin-dist-deploy.xml 2007-06-08 09:25:02 UTC (rev 3503)
+++ branches/jbossws-2.0/integration/native/src/main/etc/bin-dist-deploy.xml 2007-06-08 09:31:38 UTC (rev 3504)
@@ -24,7 +24,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
@@ -46,7 +47,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
@@ -70,7 +72,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-06-08 09:25:02 UTC (rev 3503)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-06-08 09:31:38 UTC (rev 3504)
@@ -76,6 +76,11 @@
{
String configLocation = null;
String outputDir = null;
+ if(args.length==0)
+ {
+ usage();
+ }
+
for (int i = 0; i < args.length; i++)
{
String arg = args[i];
@@ -111,14 +116,19 @@
}
else
{
- System.out.println("Usage: wstools (-classpath|-cp) <classpath> -config <config> [-dest <destination path>]");
- System.exit(1);
+ usage();
}
}
return generate(configLocation, outputDir);
}
+ private void usage()
+ {
+ System.out.println("Usage: wstools (-classpath|-cp) <classpath> -config <config> [-dest <destination path>]");
+ System.exit(1);
+ }
+
private boolean process(Configuration config, String outputDir) throws IOException
{
if (config == null)
18 years, 10 months
JBossWS SVN: r3503 - in trunk/integration/native: src/main/etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 05:25:02 -0400 (Fri, 08 Jun 2007)
New Revision: 3503
Modified:
trunk/integration/native/ant-import/build-bin-dist.xml
trunk/integration/native/ant-import/build-deploy.xml
trunk/integration/native/ant-import/macros-deploy-native.xml
trunk/integration/native/src/main/etc/bin-dist-deploy.xml
Log:
Include jbossws-core scripts in distribution
Modified: trunk/integration/native/ant-import/build-bin-dist.xml
===================================================================
--- trunk/integration/native/ant-import/build-bin-dist.xml 2007-06-08 09:21:13 UTC (rev 3502)
+++ trunk/integration/native/ant-import/build-bin-dist.xml 2007-06-08 09:25:02 UTC (rev 3503)
@@ -73,8 +73,17 @@
<include name="*.bat"/>
</fileset>
</copy>
+
+ <copy todir="${bindist.bin.dir}">
+ <fileset dir="${core.dir}/src/main/etc">
+ <include name="*.sh"/>
+ <include name="*.bat"/>
+ </fileset>
+ </copy>
+
<chmod dir="${bindist.bin.dir}" perm="+x" includes="**/*.sh"/>
+
<!-- docs -->
<zip destfile="${bindist.docs.dir}/apidocs-${version.id}.zip">
<fileset dir="${native.output.dir}/apidocs"/>
Modified: trunk/integration/native/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/native/ant-import/build-deploy.xml 2007-06-08 09:21:13 UTC (rev 3502)
+++ trunk/integration/native/ant-import/build-deploy.xml 2007-06-08 09:25:02 UTC (rev 3503)
@@ -29,7 +29,8 @@
jbosslibs="${int.jboss50.dir}/output/lib"
corelibs="${core.dir}/output/lib"
stacklibs="${int.native.dir}/output/lib"
- thirdpartylibs="${core.dir}/thirdparty"/>
+ thirdpartylibs="${core.dir}/thirdparty"
+ corescripts="${core.dir}/src/main/etc"/>
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
@@ -53,7 +54,8 @@
jbosslibs="${int.jboss42.dir}/output/lib"
corelibs="${core.dir}/output/lib"
stacklibs="${int.native.dir}/output/lib"
- thirdpartylibs="${core.dir}/thirdparty"/>
+ thirdpartylibs="${core.dir}/thirdparty"
+ corescripts="${core.dir}/src/main/etc"/>
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
@@ -77,7 +79,8 @@
jbosslibs="${int.jboss40.dir}/output/lib"
corelibs="${core.dir}/output/lib"
stacklibs="${int.native.dir}/output/lib"
- thirdpartylibs="${core.dir}/thirdparty"/>
+ thirdpartylibs="${core.dir}/thirdparty"
+ corescripts="${core.dir}/src/main/etc"/>
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
Modified: trunk/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- trunk/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 09:21:13 UTC (rev 3502)
+++ trunk/integration/native/ant-import/macros-deploy-native.xml 2007-06-08 09:25:02 UTC (rev 3503)
@@ -23,11 +23,12 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
<!-- CLIENT JARS -->
- <copy todir="${jboss50.home}/client" overwrite="true">
+ <copy todir="${jboss50.home}/client" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss50.jar"/>
</fileset>
@@ -74,10 +75,21 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+
+ <copy todir="${jboss50.home}/bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss50.home}/bin" perm="+x" includes="*.sh"/>
</sequential>
</macrodef>
- <macrodef name="macro-undeploy-native50">
+ <macrodef name="macro-undeploy-native50">
<sequential>
<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
<delete>
@@ -93,15 +105,15 @@
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
- <include name="jbossws-jboss50.jar"/>
+ <include name="jbossws-jboss50.jar"/>
<include name="policy.jar"/>
<include name="wsdl4j.jar"/>
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<include name="jbossws-wsconsume-impl.jar"/>
</fileset>
<!-- SERVER JARS -->
- <fileset dir="${jboss50.home}/server/${jboss.server.instance}/lib">
+ <fileset dir="${jboss50.home}/server/${jboss.server.instance}/lib">
<include name="jbossws-jboss50.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -113,6 +125,16 @@
<delete file="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"/>
<!-- Undeploy juddi-service.sar -->
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
+ <delete>
+ <fileset dir="${jboss50.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
@@ -122,11 +144,12 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
-
+
<!-- CLIENT JARS -->
- <copy todir="${jboss42.home}/client" overwrite="true">
+ <copy todir="${jboss42.home}/client" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
@@ -146,9 +169,9 @@
<include name="policy.jar"/>
</fileset>
</copy>
-
- <!-- SERVER JARS -->
- <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
+
+ <!-- SERVER JARS -->
+ <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
@@ -164,6 +187,18 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+
+ <copy todir="${jboss42.home}bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss42.home}/bin" perm="+x" includes="*.sh"/>
+
</sequential>
</macrodef>
@@ -171,8 +206,8 @@
<sequential>
<fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
<delete>
-
- <!-- CLIENT JARS -->
+
+ <!-- CLIENT JARS -->
<fileset dir="${jboss42.home}/client">
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
@@ -183,19 +218,19 @@
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
- <include name="jbossws-jboss42.jar"/>
+ <include name="jbossws-jboss42.jar"/>
<include name="policy.jar"/>
<include name="wsdl4j.jar"/>
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<include name="jbossws-wsconsume-impl.jar"/>
</fileset>
-
- <!-- SERVER JARS -->
+
+ <!-- SERVER JARS -->
<fileset dir="${jboss42.home}/lib">
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
</fileset>
- <fileset dir="${jboss42.home}/server/${jboss.server.instance}/lib">
+ <fileset dir="${jboss42.home}/server/${jboss.server.instance}/lib">
<include name="jbossws-jboss42.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -205,6 +240,16 @@
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<!-- Undeploy juddi-service.sar -->
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+
+ <delete>
+ <fileset dir="${jboss42.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
@@ -214,11 +259,12 @@
<attribute name="corelibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
+ <attribute name="corescripts"/>
<sequential>
<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
-
+
<!-- CLIENT JARS -->
- <copy todir="${jboss40.home}/client" overwrite="true">
+ <copy todir="${jboss40.home}/client" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss40.jar"/>
</fileset>
@@ -239,9 +285,9 @@
<include name="wsdl4j.jar"/>
</fileset>
</copy>
-
- <!-- SERVER JARS -->
- <copy todir="${jboss40.home}/server/${jboss.server.instance}/lib" overwrite="true">
+
+ <!-- SERVER JARS -->
+ <copy todir="${jboss40.home}/server/${jboss.server.instance}/lib" overwrite="true">
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss40.jar"/>
</fileset>
@@ -257,22 +303,34 @@
<!-- Deploy juddi-service.sar -->
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
<unzip dest="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+
+ <copy todir="${jboss40.home}/bin" overwrite="true">
+ <fileset dir="@{corescripts}">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ <chmod dir="${jboss40.home}/bin" perm="+x" includes="*.sh"/>
+
</sequential>
</macrodef>
-
- <macrodef name="macro-setup-native40-no-ejb3">
+
+ <macrodef name="macro-setup-native40-no-ejb3">
<sequential>
-
+
<move tofile="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service-ejb3.xml"
- file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service.xml"/>
+ file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service.xml"/>
<move tofile="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service.xml"
- file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service-no-ejb3.xml"/>
-
+ file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/META-INF/jboss-service-no-ejb3.xml"/>
+
<move tofile="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans-ejb3.xml"
- file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml"/>
+ file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml"/>
<move tofile="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml"
- file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml"/>
-
+ file="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml"/>
+
</sequential>
</macrodef>
@@ -280,8 +338,8 @@
<sequential>
<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
<delete>
-
- <!-- CLIENT JARS -->
+
+ <!-- CLIENT JARS -->
<fileset dir="${jboss40.home}/client">
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
@@ -292,21 +350,21 @@
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
- <include name="jbossws-jboss40.jar"/>
+ <include name="jbossws-jboss40.jar"/>
<include name="policy.jar"/>
<include name="stax-api.jar"/>
<include name="wsdl4j.jar"/>
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<include name="jbossws-wsconsume-impl.jar"/>
<include name="jbossws14-client.jar"/>
</fileset>
-
- <!-- SERVER JARS -->
+
+ <!-- SERVER JARS -->
<fileset dir="${jboss40.home}/lib">
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
</fileset>
- <fileset dir="${jboss40.home}/server/${jboss.server.instance}/lib">
+ <fileset dir="${jboss40.home}/server/${jboss.server.instance}/lib">
<include name="jbossws-jboss40.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -316,9 +374,20 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<!-- Undeploy juddi-service.sar -->
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <!-- Remove only, do not deploy -->
+ <!-- Remove only, do not deploy -->
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
+
+ <delete>
+ <fileset dir="${jboss40.home}/bin">
+ <include name="wspublish.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </delete>
</sequential>
</macrodef>
+
</project>
Modified: trunk/integration/native/src/main/etc/bin-dist-deploy.xml
===================================================================
--- trunk/integration/native/src/main/etc/bin-dist-deploy.xml 2007-06-08 09:21:13 UTC (rev 3502)
+++ trunk/integration/native/src/main/etc/bin-dist-deploy.xml 2007-06-08 09:25:02 UTC (rev 3503)
@@ -26,7 +26,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
@@ -50,7 +51,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
@@ -74,7 +76,8 @@
jbosslibs="${lib.dir}"
corelibs="${lib.dir}"
stacklibs="${lib.dir}"
- thirdpartylibs="${lib.dir}"/>
+ thirdpartylibs="${lib.dir}"
+ corescripts="${bin.dir}"/>
<macro-deploy-spi
spilibs="${lib.dir}"
18 years, 10 months
JBossWS SVN: r3502 - trunk/jbossws-core/src/main/java/org/jboss/ws/tools.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 05:21:13 -0400 (Fri, 08 Jun 2007)
New Revision: 3502
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
Log:
Catch zero args list
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-06-08 09:02:07 UTC (rev 3501)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-06-08 09:21:13 UTC (rev 3502)
@@ -76,7 +76,13 @@
{
String configLocation = null;
String outputDir = null;
- for (int i = 0; i < args.length; i++)
+
+ if(args.length==0)
+ {
+ usage();
+ }
+
+ for (int i = 0; i < args.length; i++)
{
String arg = args[i];
@@ -111,15 +117,20 @@
}
else
{
- System.out.println("Usage: wstools (-classpath|-cp) <classpath> -config <config> [-dest <destination path>]");
- System.exit(1);
+ usage();
}
}
return generate(configLocation, outputDir);
}
- private boolean process(Configuration config, String outputDir) throws IOException
+ private void usage()
+ {
+ System.out.println("Usage: wstools (-classpath|-cp) <classpath> -config <config> [-dest <destination path>]");
+ System.exit(1);
+ }
+
+ private boolean process(Configuration config, String outputDir) throws IOException
{
if (config == null)
throw new IllegalArgumentException("Configuration is null");
18 years, 10 months
JBossWS SVN: r3501 - branches/jbossws-2.0/build/etc.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 05:02:07 -0400 (Fri, 08 Jun 2007)
New Revision: 3501
Removed:
branches/jbossws-2.0/build/etc/wspublish.sh
branches/jbossws-2.0/build/etc/wsrunclient.bat
branches/jbossws-2.0/build/etc/wsrunclient.sh
branches/jbossws-2.0/build/etc/wstools.bat
branches/jbossws-2.0/build/etc/wstools.sh
Log:
Scripts moved to module 'jbossws-core'
Deleted: branches/jbossws-2.0/build/etc/wspublish.sh
===================================================================
--- branches/jbossws-2.0/build/etc/wspublish.sh 2007-06-08 09:01:24 UTC (rev 3500)
+++ branches/jbossws-2.0/build/etc/wspublish.sh 2007-06-08 09:02:07 UTC (rev 3501)
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-# $Id: wspublish.sh 3101 2007-05-16 08:26:33Z heiko.braun(a)jboss.com $
-
-DIRNAME=`dirname $0`
-PROGNAME=`basename $0`
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-case "`uname`" in
- CYGWIN*)
- cygwin=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$TOMCAT_HOME" ] &&
- TOMCAT_HOME=`cygpath --unix "$TOMCAT_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-export TOMCAT_HOME
-
-# Setup the JVM
-if [ "x$JAVA" = "x" ]; then
- if [ "x$JAVA_HOME" != "x" ]; then
- JAVA="$JAVA_HOME/bin/java"
- else
- JAVA="java"
- fi
-fi
-
-#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
-
-# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS"
-
-# Setup the WSPUBLISH classpath
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/jbossws-thirdparty.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/jbossws-core.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/log4j.jar"
-WSPUBLISH_CLASSPATH="$WSPUBLISH_CLASSPATH:$TOMCAT_HOME/common/lib/servlet-api.jar"
-
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- TOMCAT_HOME=`cygpath --path --windows "$TOMCAT_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- WSPUBLISH_CLASSPATH=`cygpath --path --windows "$WSPUBLISH_CLASSPATH"`
-fi
-
-# Display our environment
-echo "========================================================================="
-echo ""
-echo " WSPUBLISH Environment"
-echo ""
-echo " TOMCAT_HOME: $TOMCAT_HOME"
-echo ""
-echo " JAVA: $JAVA"
-echo ""
-echo " JAVA_OPTS: $JAVA_OPTS"
-echo ""
-#echo " CLASSPATH: $WSPUBLISH_CLASSPATH"
-#echo ""
-echo "========================================================================="
-echo ""
-
-# Execute the JVM
-"$JAVA" $JAVA_OPTS \
- -classpath "$WSPUBLISH_CLASSPATH" \
- org.jboss.ws.tools.wspublish -dest $TOMCAT_HOME/webapps "$@"
-
Deleted: branches/jbossws-2.0/build/etc/wsrunclient.bat
===================================================================
--- branches/jbossws-2.0/build/etc/wsrunclient.bat 2007-06-08 09:01:24 UTC (rev 3500)
+++ branches/jbossws-2.0/build/etc/wsrunclient.bat 2007-06-08 09:02:07 UTC (rev 3501)
@@ -1,61 +0,0 @@
-@echo off
-
-rem $Id: wsprovide.bat 2325 2007-02-09 22:14:15Z jason.greene(a)jboss.com $
-
-@if not "%ECHO%" == "" echo %ECHO%
-@if "%OS%" == "Windows_NT" setlocal
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-
-if not [%1] == [] goto start
- echo %PROGNAME% is a command line tool that invokes a JBossWS JAX-WS Web Service client.
- echo It builds the correct classpath and endorsed libs for you. Feel free to use
- echo the code for this script to make your own shell scripts. It is open source
- echo after all.
- echo.
- echo usage: %PROGNAME% [-classpath ^<additional class path^>] ^<java-main-class^> [arguments...]
- goto EOF
-:start
-set ARGS=
-:loop
-if [%1] == [] goto endloop
- if not %1 == -classpath goto argset
- set WSRUNCLIENT_CLASSPATH=%2
- shift
- shift
- goto loop
- :argset
- set ARGS=%ARGS% %1
- shift
- goto loop
-:endloop
-
-set JAVA=%JAVA_HOME%\bin\java
-set JBOSS_HOME=%DIRNAME%\..
-rem Setup the java endorsed dirs
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-rem Setup the wstools classpath
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/stax-api.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-j2ee.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-saaj.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxws.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-jaxrpc.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
-rem Execute the JVM
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSRUNCLIENT_CLASSPATH%" %ARGS%
-:EOF
Deleted: branches/jbossws-2.0/build/etc/wsrunclient.sh
===================================================================
--- branches/jbossws-2.0/build/etc/wsrunclient.sh 2007-06-08 09:01:24 UTC (rev 3500)
+++ branches/jbossws-2.0/build/etc/wsrunclient.sh 2007-06-08 09:02:07 UTC (rev 3501)
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-# $Id: wsprovide 2325 2007-02-09 22:14:15Z jason.greene(a)jboss.com $
-DIRNAME=`dirname $0`
-PROGNAME=`basename $0`
-
-if [ $# -eq 0 ]; then
- echo "$PROGNAME is a command line tool that invokes a JBossWS JAX-WS Web Service client."
- echo "It builds the correct classpath and endorsed libs for you. Feel free to use"
- echo "the code for this script to make your own shell scripts. It is open source"
- echo "after all."
- echo
- echo "usage: $PROGNAME [-classpath <additional class path>] <java-main-class> [arguments...]"
- exit 1;
-fi
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-case "`uname`" in
- CYGWIN*)
- cygwin=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$JBOSS_HOME" ] &&
- JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Setup JBOSS_HOME
-if [ "x$JBOSS_HOME" = "x" ]; then
- # get the full path (without any relative bits)
- JBOSS_HOME=`cd $DIRNAME/..; pwd`
-fi
-export JBOSS_HOME
-
-# Setup the JVM
-if [ "x$JAVA" = "x" ]; then
- if [ "x$JAVA_HOME" != "x" ]; then
- JAVA="$JAVA_HOME/bin/java"
- else
- JAVA="java"
- fi
-fi
-
-#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
-
-# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS"
-
-# Setup the java endorsed dirs
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
-# Setup the wstools classpath
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/activation.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-xjc.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-j2ee.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-ejb3x.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/mail.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/stax-api.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
-
-while [ $# -ge 1 ]; do
- case $1 in
- "-classpath") WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$2"; shift;;
- *) args="$args \"$1\"";;
- esac
- shift
-done
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- WSRUNCLIENT_CLASSPATH=`cygpath --path --windows "$WSRUNCLIENT_CLASSPATH"`
- JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
-fi
-
-# Execute the JVM
-eval "$JAVA" $JAVA_OPTS \
- -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
- -Dlog4j.configuration=wstools-log4j.xml \
- -classpath "$WSRUNCLIENT_CLASSPATH" \
- "$args"
Deleted: branches/jbossws-2.0/build/etc/wstools.bat
===================================================================
--- branches/jbossws-2.0/build/etc/wstools.bat 2007-06-08 09:01:24 UTC (rev 3500)
+++ branches/jbossws-2.0/build/etc/wstools.bat 2007-06-08 09:02:07 UTC (rev 3501)
@@ -1,62 +0,0 @@
-@echo off
-
-rem $Id: wstools.bat 2156 2007-01-27 05:59:35Z jason.greene(a)jboss.com $
-
-@if not "%ECHO%" == "" echo %ECHO%
-@if "%OS%" == "Windows_NT" setlocal
-
-set DIRNAME=.\
-if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
-set PROGNAME=run.bat
-if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-
-rem Read all command line arguments
-
-REM
-REM The %ARGS% env variable commented out in favor of using %* to include
-REM all args in java command line. See bug #840239. [jpl]
-REM
-REM set ARGS=
-REM :loop
-REM if [%1] == [] goto endloop
-REM set ARGS=%ARGS% %1
-REM shift
-REM goto loop
-REM :endloop
-
-set JAVA=%JAVA_HOME%\bin\java
-set JBOSS_HOME=%DIRNAME%\..
-rem Setup the java endorsed dirs
-set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
-
-rem Setup the wstools classpath
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossretro-rt.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jboss-backport-concurrent.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws14-client.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
-
-rem Display our environment
-echo ========================================================================="
-echo .
-echo WSTools Environment
-echo .
-echo JBOSS_HOME: %JBOSS_HOME%
-echo .
-echo JAVA: %JAVA%
-echo .
-echo JAVA_OPTS: %JAVA_OPTS%
-echo .
-rem echo CLASSPATH: %WSTOOLS_CLASSPATH%
-rem echo .
-echo ========================================================================="
-echo .
-
-rem Execute the JVM
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSTOOLS_CLASSPATH%" org.jboss.ws.tools.WSTools %*
-
Deleted: branches/jbossws-2.0/build/etc/wstools.sh
===================================================================
--- branches/jbossws-2.0/build/etc/wstools.sh 2007-06-08 09:01:24 UTC (rev 3500)
+++ branches/jbossws-2.0/build/etc/wstools.sh 2007-06-08 09:02:07 UTC (rev 3501)
@@ -1,90 +0,0 @@
-#!/bin/sh
-
-# $Id: wstools.sh 2157 2007-01-27 06:03:58Z jason.greene(a)jboss.com $
-
-DIRNAME=`dirname $0`
-PROGNAME=`basename $0`
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-case "`uname`" in
- CYGWIN*)
- cygwin=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$JBOSS_HOME" ] &&
- JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Setup JBOSS_HOME
-if [ "x$JBOSS_HOME" = "x" ]; then
- # get the full path (without any relative bits)
- JBOSS_HOME=`cd $DIRNAME/..; pwd`
-fi
-export JBOSS_HOME
-
-# Setup the JVM
-if [ "x$JAVA" = "x" ]; then
- if [ "x$JAVA_HOME" != "x" ]; then
- JAVA="$JAVA_HOME/bin/java"
- else
- JAVA="java"
- fi
-fi
-
-#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
-
-# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS"
-
-# Setup the java endorsed dirs
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
-# Setup the wstools classpath
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/activation.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossretro-rt.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jboss-backport-concurrent.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws14-client.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/mail.jar"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- WSTOOLS_CLASSPATH=`cygpath --path --windows "$WSTOOLS_CLASSPATH"`
- JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
-fi
-
-# Display our environment
-echo "========================================================================="
-echo ""
-echo " WSTools Environment"
-echo ""
-echo " JBOSS_HOME: $JBOSS_HOME"
-echo ""
-echo " JAVA: $JAVA"
-echo ""
-echo " JAVA_OPTS: $JAVA_OPTS"
-echo ""
-#echo " CLASSPATH: $WSTOOLS_CLASSPATH"
-#echo ""
-echo "========================================================================="
-echo ""
-
-# Execute the JVM
-"$JAVA" $JAVA_OPTS \
- -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
- -Dlog4j.configuration=wstools-log4j.xml \
- -classpath "$WSTOOLS_CLASSPATH" \
- org.jboss.ws.tools.WSTools "$@"
18 years, 10 months
JBossWS SVN: r3500 - branches/jbossws-2.0/jbossws-core/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-08 05:01:24 -0400 (Fri, 08 Jun 2007)
New Revision: 3500
Modified:
branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.bat
branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh
branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.bat
branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.sh
Log:
Fix JBWS-1690
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.bat
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.bat 2007-06-08 08:59:52 UTC (rev 3499)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.bat 2007-06-08 09:01:24 UTC (rev 3500)
@@ -56,6 +56,7 @@
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
rem Execute the JVM
"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSRUNCLIENT_CLASSPATH%" %ARGS%
:EOF
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh 2007-06-08 08:59:52 UTC (rev 3499)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh 2007-06-08 09:01:24 UTC (rev 3500)
@@ -74,6 +74,7 @@
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/mail.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/stax-api.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
+WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
while [ $# -ge 1 ]; do
case $1 in
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.bat
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.bat 2007-06-08 08:59:52 UTC (rev 3499)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.bat 2007-06-08 09:01:24 UTC (rev 3500)
@@ -37,8 +37,8 @@
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossretro-rt.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jboss-backport-concurrent.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws14-client.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
rem Display our environment
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.sh
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.sh 2007-06-08 08:59:52 UTC (rev 3499)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/wstools.sh 2007-06-08 09:01:24 UTC (rev 3500)
@@ -53,9 +53,9 @@
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossretro-rt.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jboss-backport-concurrent.jar"
-WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws14-client.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/mail.jar"
# For Cygwin, switch paths to Windows format before running java
18 years, 10 months