JBossWS SVN: r3831 - in trunk/jbossws-core/src/main/java/org/jboss/ws: metadata/umdm and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 13:20:05 -0400 (Mon, 09 Jul 2007)
New Revision: 3831
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
Fix prev merge errors
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java 2007-07-09 17:01:33 UTC (rev 3830)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java 2007-07-09 17:20:05 UTC (rev 3831)
@@ -1,47 +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.core.jaxws;
-
-import org.jboss.ws.WSException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-/**
- * Doesn't do anything fancy. It just delegates to <code>JAXBContext.newInstance(clazzes)</code>
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jun 26, 2007
- */
-public class DefaultJAXBContextFactory extends JAXBContextFactory
-{
- public JAXBContext createContext(Class[] clazzes) throws WSException
- {
- try
- {
- return JAXBContext.newInstance(clazzes);
- }
- catch (JAXBException e) {
- throw new WSException("Failed to create JAXBContext", e);
- }
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-07-09 17:01:33 UTC (rev 3830)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-07-09 17:20:05 UTC (rev 3831)
@@ -63,6 +63,7 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
+
JAXBContext jaxbContext = getJAXBContext(javaTypes);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-07-09 17:01:33 UTC (rev 3830)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-07-09 17:20:05 UTC (rev 3831)
@@ -33,7 +33,6 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -58,8 +57,7 @@
@Override
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if (log.isDebugEnabled())
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if (log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Result result = null;
try
@@ -68,7 +66,6 @@
// This should be more efficient and accurate than searching the type mapping
Class expectedType = serContext.getJavaType();
Class actualType = value.getClass();
-
Class[] types = shouldFilter(actualType) ? new Class[]{expectedType} : new Class[]{expectedType, actualType};
JAXBContext jaxbContext = getJAXBContext(types);
@@ -82,8 +79,7 @@
result = new BufferedStreamResult();
marshaller.marshal(new JAXBElement(xmlName, expectedType, value), result);
- if (log.isDebugEnabled())
- log.debug("serialized: " + result);
+ if (log.isDebugEnabled()) log.debug("serialized: " + result);
}
catch (Exception ex)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-09 17:01:33 UTC (rev 3830)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-09 17:20:05 UTC (rev 3831)
@@ -129,8 +129,6 @@
private ConfigObservable configObservable = new ConfigObservable();
- private JAXBContextCache jaxbCache = new JAXBContextCache();
-
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new ArrayList<UnifiedPortComponentRefMetaData>();
private JAXBContextCache jaxbCache = new JAXBContextCache();
16 years, 10 months
JBossWS SVN: r3830 - trunk/integration/spi/src/main/java/org/jboss/ws/integration.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 13:01:33 -0400 (Mon, 09 Jul 2007)
New Revision: 3830
Modified:
trunk/integration/spi/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
Log:
svn merge -r 3763:3764 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-07-09 16:58:25 UTC (rev 3829)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-07-09 17:01:33 UTC (rev 3830)
@@ -29,12 +29,11 @@
import java.net.URL;
import java.net.URLClassLoader;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-
/**
- * The default file adapter loads resources through an associated classloader.
- * If no classload is set, the the thread context classloader will be used.
+ * Load resources through a URLClassLoader.<br>
+ * NOTE: The associated classloader doesn't do parent delegation.
*
+ *
* @author Heiko.Braun(a)jboss.org
* @since 25.01.2007
*/
@@ -118,8 +117,7 @@
{
if (loader == null)
{
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- loader = new URLClassLoader(new URL[]{rootURL}, ctxLoader);
+ loader = new URLClassLoader(new URL[]{rootURL});
}
return loader;
}
16 years, 10 months
JBossWS SVN: r3829 - in trunk/jbossws-core/src: test/java/org/jboss/test/ws/jaxws/binding and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 12:58:25 -0400 (Mon, 09 Jul 2007)
New Revision: 3829
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
Log:
svn merge -r 3756:3758 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2007-07-09 16:56:38 UTC (rev 3828)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2007-07-09 16:58:25 UTC (rev 3829)
@@ -53,7 +53,7 @@
import org.jboss.ws.core.jaxrpc.binding.QNameSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SimpleDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SimpleSerializerFactory;
-import org.jboss.wsf.spi.utils.HashCodeUtil;
+import org.jboss.ws.core.utils.HashCodeUtil;
import org.jboss.wsf.spi.utils.JavaUtils;
/**
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-09 16:56:38 UTC (rev 3828)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-09 16:58:25 UTC (rev 3829)
@@ -53,7 +53,7 @@
fail("It should not be possible to change bindinig customizations on a started endpoint");
}
- catch (IllegalAccessError e)
+ catch (Exception e)
{
// all fine, this should happen
}
16 years, 10 months
JBossWS SVN: r3828 - in trunk: integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF and 13 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 12:56:38 -0400 (Mon, 09 Jul 2007)
New Revision: 3828
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCustomisation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java
Modified:
trunk/build/ant.properties.example
trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml
trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeployer.java
trunk/jbossws-core/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java
Log:
svn merge -r 3755:3756 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Modified: trunk/build/ant.properties.example
===================================================================
--- trunk/build/ant.properties.example 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/build/ant.properties.example 2007-07-09 16:56:38 UTC (rev 3828)
@@ -37,7 +37,7 @@
hudson.jboss50.rev=HEAD
hudson.jboss42.url=https://svn.jboss.org/repos/jbossas/branches/Branch_4_2
-hudson.jboss42.build=jboss-4.2.0.GA
+hudson.jboss42.build=jboss-4.2.1.GA
hudson.jboss42.rev=HEAD
hudson.jboss40.url=https://svn.jboss.org/repos/jbossas/branches/Branch_4_0
Modified: trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans-no-ejb3.xml 2007-07-09 16:56:38 UTC (rev 3828)
@@ -125,8 +125,7 @@
<bean name="WSEagerInitializeDeployer" class="org.jboss.wsf.stack.jbws.EagerInitializeDeployer"/>
<bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
<property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
- <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
- <property name="jaxbHandler">org.jboss.wsf.spi.binding.jaxb.JAXBContextCache</property>
+ <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
<property name="invocationHandler">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
Modified: trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/native/src/main/resources/jbossws-native40.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 16:56:38 UTC (rev 3828)
@@ -125,8 +125,7 @@
<bean name="WSEagerInitializeDeployer" class="org.jboss.wsf.stack.jbws.EagerInitializeDeployer"/>
<bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
<property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
- <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
- <property name="jaxbHandler">org.jboss.wsf.spi.binding.jaxb.JAXBContextCache</property>
+ <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
<property name="invocationHandler">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
Modified: trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 16:56:38 UTC (rev 3828)
@@ -131,8 +131,7 @@
<bean name="WSEagerInitializeDeployer" class="org.jboss.wsf.stack.jbws.EagerInitializeDeployer"/>
<bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
<property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
- <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
- <property name="jaxbHandler">org.jboss.wsf.spi.binding.jaxb.JAXBContextCache</property>
+ <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
<property name="invocationHandler">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
Modified: trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-09 16:56:38 UTC (rev 3828)
@@ -52,7 +52,7 @@
2) WebServiceDeployerJSE < WarDeployer
3) WebServiceMainDeployer
- Each WebServiceDeployer has a number of DeployerHooks registerd with it
+ Each WebServiceDeployer has a number of DeployerHooks registered with it
- WebServiceDeployerEJB
- WSDeployerHook_JAXRPC_EJB21
@@ -140,8 +140,7 @@
<bean name="WSEagerInitializeDeployer" class="org.jboss.wsf.stack.jbws.EagerInitializeDeployer"/>
<bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
<property name="requestHandler">org.jboss.wsf.stack.jbws.RequestHandlerImpl</property>
- <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
- <property name="jaxbHandler">org.jboss.wsf.spi.binding.jaxb.JAXBContextCache</property>
+ <property name="lifecycleHandler">org.jboss.wsf.stack.jbws.LifecycleHandlerImpl</property>
<property name="invocationHandler">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java (from rev 3756, branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,39 @@
+/*
+ * 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.binding;
+
+import java.util.HashMap;
+
+/**
+ * Allows introduction of arbitrary binding customization properties.<p>
+ * This may be different between stacks and addresses meta data binding
+ * (i.e JSR-181 to UnifiedMetaData) as well as JAVA to XML binding operations.
+ * <p>
+ * Supported properties need to be documented in subclasses.
+ *
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 28, 2007
+ */
+public abstract class BindingCustomization extends HashMap {
+
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -21,17 +21,14 @@
*/
package org.jboss.wsf.spi.deployment;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
+import org.jboss.wsf.spi.binding.BindingCustomization;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import javax.management.ObjectName;
+import java.util.*;
+
/**
* A general JAXWS endpoint.
*
@@ -49,10 +46,10 @@
private RequestHandler requestHandler;
private InvocationHandler invocationHandler;
private LifecycleHandler lifecycleHandler;
- private JAXBHandler jaxbHandler;
private Map<Class, Object> attachments = new HashMap<Class, Object>();
private Map<String, Object> properties = new HashMap<String, Object>();
private EndpointMetrics metrics;
+ private List<BindingCustomization> bindingCustomizsations = new ArrayList<BindingCustomization>();
public BasicEndpoint()
{
@@ -81,15 +78,15 @@
this.targetBean = targetBean;
}
- public Class getTargetBeanClass()
+ public Class getTargetBeanClass()
{
if (targetBean == null)
throw new IllegalStateException("Target bean not set");
-
+
ClassLoader classLoader = service.getDeployment().getClassLoader();
if (classLoader == null)
throw new IllegalStateException("Deployment classloader not set");
-
+
Class beanClass;
try
{
@@ -101,7 +98,7 @@
}
return beanClass;
}
-
+
public ObjectName getName()
{
return name;
@@ -178,15 +175,33 @@
this.invocationHandler = handler;
}
- public JAXBHandler getJAXBHandler()
+ public List<BindingCustomization> getBindingCustomizations()
{
- return jaxbHandler;
+ return Collections.unmodifiableList(bindingCustomizsations);
}
- public void setJAXBHandler(JAXBHandler jaxbHandler)
+ /* Get a concrete binding customization */
+ public BindingCustomization getBindingCustomization(BindingCustomization customization)
{
+ BindingCustomization match = null;
+
+ Iterator<BindingCustomization> it = bindingCustomizsations.iterator();
+ while(it.hasNext())
+ {
+ BindingCustomization bc = it.next();
+ if(bc.getClass().equals(customization.getClass()))
+ {
+ match = bc;
+ }
+ }
+
+ return match;
+ }
+
+ public void addBindingCustomization(BindingCustomization customization)
+ {
assertEndpointSetterAccess();
- this.jaxbHandler = jaxbHandler;
+ bindingCustomizsations.add(customization);
}
public <T> T addAttachment(Class<T> key, Object value)
@@ -203,7 +218,7 @@
{
return (T)attachments.get(key);
}
-
+
public Set<String> getProperties()
{
return properties.keySet();
@@ -234,9 +249,9 @@
assertEndpointSetterAccess();
metrics.setEndpoint(this);
this.metrics = metrics;
-
+
}
-
+
private void assertEndpointSetterAccess()
{
if (state == EndpointState.STARTED)
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,15 +23,15 @@
// $Id$
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
+import org.jboss.wsf.spi.binding.BindingCustomization;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import javax.management.ObjectName;
+import java.util.List;
+import java.util.Set;
+
/**
* A general JAXWS endpoint.
*
@@ -107,13 +107,16 @@
/** Set the endpoint bean invoker */
void setInvocationHandler(InvocationHandler invoker);
-
- /** Get the JAXBHandler for this endpoint */
- JAXBHandler getJAXBHandler();
-
- /** Set the JAXBHandler for this endpoint */
- void setJAXBHandler(JAXBHandler handler);
-
+
+ /** Get all binding customizations for this endpoint */
+ List<BindingCustomization> getBindingCustomizations();
+
+ /* Get a concrete binding customization */
+ BindingCustomization getBindingCustomization(BindingCustomization bindingCustomization);
+
+ /** Add a binding customization to this endpoint*/
+ void addBindingCustomization (BindingCustomization bindingCustomization);
+
/** Get the endpoint metrics for this endpoint */
EndpointMetrics getEndpointMetrics();
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeployer.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeployer.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,9 +23,6 @@
//$Id$
-import java.util.Map;
-
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
import org.jboss.wsf.spi.invocation.InvocationExceptionHandler;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
@@ -33,6 +30,8 @@
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import java.util.Map;
+
/**
* A deployer that assigns the handlers to the Endpoint
*
@@ -43,9 +42,9 @@
{
private String requestHandler;
private String lifecycleHandler;
+
private Map<String, String> invocationHandler;
private String invocationExceptionHandler;
- private String jaxbHandler;
public void setLifecycleHandler(String handler)
{
@@ -67,11 +66,6 @@
this.invocationExceptionHandler = handler;
}
- public void setJaxbHandler(String jaxbHandler)
- {
- this.jaxbHandler = jaxbHandler;
- }
-
@Override
public void create(Deployment dep)
{
@@ -80,7 +74,6 @@
ep.setRequestHandler(getRequestHandler(dep));
ep.setLifecycleHandler(getLifecycleHandler(dep));
ep.setInvocationHandler(getInvocationHandler(ep));
- ep.setJAXBHandler(getJAXBHandler(dep));
}
}
@@ -110,19 +103,6 @@
}
}
- private JAXBHandler getJAXBHandler(Deployment dep)
- {
- try
- {
- Class<?> handlerClass = dep.getClassLoader().loadClass(jaxbHandler);
- return (JAXBHandler)handlerClass.newInstance();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot load jaxb handler: " + jaxbHandler);
- }
- }
-
private InvocationHandler getInvocationHandler(Endpoint ep)
{
Deployment dep = ep.getService().getDeployment();
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -1,146 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.utils;
-
-import java.lang.reflect.Array;
-
-/**
- * Collected methods which allow easy implementation of <code>hashCode</code>.
- *
- * Example use case:
- * <pre>
- * public int hashCode(){
- * int result = HashCodeUtil.SEED;
- * //collect the contributions of various fields
- * result = HashCodeUtil.hash(result, fPrimitive);
- * result = HashCodeUtil.hash(result, fObject);
- * result = HashCodeUtil.hash(result, fArray);
- * return result;
- * }
- * </pre>
- */
-public final class HashCodeUtil
-{
-
- /**
- * An initial value for a <code>hashCode</code>, to which is added contributions
- * from fields. Using a non-zero value decreases collisons of <code>hashCode</code>
- * values.
- */
- public static final int SEED = 23;
-
- /**
- * booleans.
- */
- public static int hash(int aSeed, boolean aBoolean)
- {
- return firstTerm(aSeed) + (aBoolean ? 1 : 0);
- }
-
- /**
- * chars.
- */
- public static int hash(int aSeed, char aChar)
- {
- return firstTerm(aSeed) + (int)aChar;
- }
-
- /**
- * ints.
- */
- public static int hash(int aSeed, int aInt)
- {
- /*
- * Implementation Note
- * Note that byte and short are handled by this method, through
- * implicit conversion.
- */
- return firstTerm(aSeed) + aInt;
- }
-
- /**
- * longs.
- */
- public static int hash(int aSeed, long aLong)
- {
- return firstTerm(aSeed) + (int)(aLong ^ (aLong >>> 32));
- }
-
- /**
- * floats.
- */
- public static int hash(int aSeed, float aFloat)
- {
- return hash(aSeed, Float.floatToIntBits(aFloat));
- }
-
- /**
- * doubles.
- */
- public static int hash(int aSeed, double aDouble)
- {
- return hash(aSeed, Double.doubleToLongBits(aDouble));
- }
-
- /**
- * <code>aObject</code> is a possibly-null object field, and possibly an array.
- *
- * If <code>aObject</code> is an array, then each element may be a primitive
- * or a possibly-null object.
- */
- public static int hash(int aSeed, Object aObject)
- {
- int result = aSeed;
- if (aObject == null)
- {
- result = hash(result, 0);
- }
- else if (!isArray(aObject))
- {
- result = hash(result, aObject.hashCode());
- }
- else
- {
- int length = Array.getLength(aObject);
- for (int idx = 0; idx < length; ++idx)
- {
- Object item = Array.get(aObject, idx);
- //recursive call!
- result = hash(result, item);
- }
- }
- return result;
- }
-
- /// PRIVATE ///
- private static final int fODD_PRIME_NUMBER = 37;
-
- private static int firstTerm(int aSeed)
- {
- return fODD_PRIME_NUMBER * aSeed;
- }
-
- private static boolean isArray(Object aObject)
- {
- return aObject.getClass().isArray();
- }
-}
Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -42,6 +42,7 @@
import javax.xml.ws.WebServiceException;
import org.w3c.dom.Element;
+import org.jboss.ws.core.jaxws.JAXBContextFactory;
/**
@@ -66,12 +67,12 @@
@XmlRootElement(name="EndpointReference",namespace=W3CEndpointReference.NS)
@XmlType(name="EndpointReferenceType",namespace=W3CEndpointReference.NS)
public final class W3CEndpointReference extends EndpointReference {
-
+
private final static JAXBContext w3cjc = getW3CJaxbContext();
protected W3CEndpointReference() {
}
-
+
/**
* construct an EPR from infoset representation
*
@@ -79,10 +80,10 @@
* instance consistent with the W3C WS-Addressing Core
* recommendation.
*
- * @throws WebServiceException
+ * @throws WebServiceException
* If the source does NOT contain a valid W3C WS-Addressing
* EndpointReference.
- * @throws NullPointerException
+ * @throws NullPointerException
* If the <code>null</code> <code>source</code> value is given
*/
public W3CEndpointReference(Source source) {
@@ -97,7 +98,7 @@
throw new WebServiceException("Source did not contain W3CEndpointReference", e);
}
}
-
+
/**
* {@inheritDoc}
*/
@@ -110,15 +111,11 @@
throw new WebServiceException("Error marshalling W3CEndpointReference. ", e);
}
}
-
+
private static JAXBContext getW3CJaxbContext() {
- try {
- return JAXBContext.newInstance(W3CEndpointReference.class);
- } catch (JAXBException e) {
- throw new WebServiceException("Error creating JAXBContext for W3CEndpointReference. ", e);
- }
+ return JAXBContextFactory.newInstance().createContext(new Class[] { W3CEndpointReference.class});
}
-
+
// private but necessary properties for databinding
@XmlElement(name="Address",namespace=NS)
private Address address;
@@ -130,8 +127,8 @@
Map<QName,String> attributes;
@XmlAnyElement
List<Element> elements;
-
-
+
+
private static class Address {
protected Address() {}
@XmlValue
@@ -139,8 +136,8 @@
@XmlAnyAttribute
Map<QName,String> attributes;
}
-
-
+
+
private static class Elements {
protected Elements() {}
@XmlAnyElement
@@ -148,6 +145,6 @@
@XmlAnyAttribute
Map<QName,String> attributes;
}
-
+
protected static final String NS = "http://www.w3.org/2005/08/addressing";
}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,90 @@
+/*
+ * 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.core.jaxws;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import java.util.Iterator;
+
+/**
+ * The default factory checks if a {@link JAXBBindingCustomization} exists
+ * and uses it to customize the JAXBContext that will be created.
+ *
+ * @see org.jboss.wsf.spi.deployment.Endpoint
+ * @see org.jboss.wsf.spi.binding.BindingCustomization
+ * @see JAXBBindingCustomization
+ *
+ * @see JAXBContext#newInstance(Class...)
+ * @see JAXBContext#newInstance(String, ClassLoader, java.util.Map<java.lang.String,?>)
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 26, 2007
+ */
+public class CustomizableJAXBContextFactory extends JAXBContextFactory
+{
+ public JAXBContext createContext(Class[] clazzes) throws WSException
+ {
+ try
+ {
+ BindingCustomization customization = getCustomization();
+ if(null == customization)
+ return JAXBContext.newInstance(clazzes);
+ else
+ return JAXBContext.newInstance(clazzes, customization);
+ }
+ catch (JAXBException e) {
+ throw new WSException("Failed to create JAXBContext", e);
+ }
+ }
+
+ public JAXBContext createContext(Class clazz) throws WSException
+ {
+ return createContext(new Class[] {clazz});
+ }
+
+ private BindingCustomization getCustomization()
+ {
+ BindingCustomization customization = null;
+
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if(msgContext!=null) // may not be available anytime
+ {
+ Iterator<BindingCustomization> it = msgContext.getEndpointMetaData().getBindingCustomizations().iterator();
+ while(it.hasNext())
+ {
+ BindingCustomization current = it.next();
+ if(current instanceof JAXBBindingCustomization)
+ {
+ customization = current;
+ break;
+ }
+ }
+ }
+
+ return customization;
+ }
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,47 @@
+/*
+ * 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.core.jaxws;
+
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import com.sun.xml.bind.api.JAXBRIContext;
+
+/**
+ * Supported JAXB 2.1 customizations.
+ *
+ * @see org.jboss.wsf.spi.deployment.Endpoint
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 28, 2007
+ */
+public class JAXBBindingCustomization extends BindingCustomization {
+
+ // Use an alternative RuntimeAnnotationReader implementation
+ public final static String ANNOTATION_READER = JAXBRIContext.ANNOTATION_READER;
+
+ // Reassign the default namespace URI to something else at the runtime
+ public final static String DEFAULT_NAMESPACE_REMAP = JAXBRIContext.DEFAULT_NAMESPACE_REMAP;
+
+ // Enable the c14n marshalling support in the JAXBContext.
+ public final static String CANONICALIZATION_SUPPORT = JAXBRIContext.CANONICALIZATION_SUPPORT;
+
+
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,89 @@
+/*
+ * 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.core.jaxws;
+
+// $Id$
+
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.HashCodeUtil;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+
+import javax.xml.bind.JAXBContext;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Cache JAXBContext's.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @since 26.01.2007
+ */
+public class JAXBContextCache
+{
+ private Map<Integer, JAXBContext> cache = new ConcurrentHashMap<Integer, JAXBContext>();
+
+ public JAXBContext get(Class[] clazzes)
+ {
+ Integer id = buildId(clazzes);
+ return get(id);
+ }
+
+ public void add(Class[] clazzes, JAXBContext context)
+ {
+ Integer id = buildId(clazzes);
+ add(id, context);
+ }
+
+ private JAXBContext get(Integer id)
+ {
+ return cache.get(id);
+ }
+
+ private void add(Integer id, JAXBContext context)
+ {
+ cache.put(id, context);
+ }
+
+ private static Integer buildId(Class[] classes)
+ {
+ int sum = HashCodeUtil.SEED;
+ for (Class cls : classes)
+ {
+ sum = HashCodeUtil.hash(sum, cls.getName());
+ }
+ return sum;
+ }
+
+ /**
+ * Access the JAXBContext cache through the message context.
+ * The actual instance is assiciated with the EndpointMetaData.
+ * @return JAXBContextCache
+ */
+ public static JAXBContextCache getContextCache()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+ return epMetaData.getJaxbCache();
+ }
+}
+
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCustomisation.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCustomisation.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCustomisation.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCustomisation.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,31 @@
+/*
+ * 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.core.jaxws;
+
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 27, 2007
+ */
+public class JAXBContextCustomisation extends HashMap {
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -28,18 +28,23 @@
/**
* Creates JAXBContext's.<p>
- * The factory uses the WSF {@link ServiceLoader} to find
- * the actual factory that's going to be used.
*
* @author Heiko.Braun(a)jboss.com
* Created: Jun 26, 2007
*/
public abstract class JAXBContextFactory {
- public final static String DEFAULT_JAXB_CONTEXT_FACTORY = "org.jboss.ws.core.jaxws.DefaultJAXBContextFactory";
+ public final static String DEFAULT_JAXB_CONTEXT_FACTORY = "org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory";
public abstract JAXBContext createContext(Class[] clazzes) throws WSException;
+ public abstract JAXBContext createContext(Class clazz) throws WSException;
+
+ /**
+ * Retrieve JAXBContextFactory instance through the {@link ServiceLoader}.
+ * Defaults to {@link CustomizableJAXBContextFactory}
+ * @return JAXBContextFactory
+ */
public static JAXBContextFactory newInstance()
{
return (JAXBContextFactory)ServiceLoader.loadService(
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,6 +23,13 @@
// $Id$
+import org.jboss.ws.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.TypeMappingImpl;
+import org.jboss.ws.core.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.logging.Logger;
+
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
@@ -30,13 +37,6 @@
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.ComplexTypeDeserializer;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.TypeMappingImpl;
-import org.jboss.ws.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
-
/**
* A Deserializer that can handle complex types by delegating to JAXB.
*
@@ -63,8 +63,8 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
- JAXBContext jaxbContext = ((SerializationContextJAXWS)serContext).getJAXBContext(javaTypes);
-
+ JAXBContext jaxbContext = getJAXBContext(javaTypes);
+
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller( new AttachmentUnmarshallerImpl());
@@ -81,6 +81,22 @@
}
+ /**
+ * Retrieve JAXBContext from cache or create new one and cache it.
+ * @param types
+ * @return JAXBContext
+ */
+ private JAXBContext getJAXBContext(Class[] types){
+ JAXBContextCache cache = JAXBContextCache.getContextCache();
+ JAXBContext context = cache.get(types);
+ if(null==context)
+ {
+ context = JAXBContextFactory.newInstance().createContext(types);
+ cache.add(types, context);
+ }
+ return context;
+ }
+
// 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
// a request or unmarshall a response, an implementation MUST throw a WebServiceException whose
// cause is set to the original JAXBException.
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,6 +23,14 @@
// $Id$
+import org.jboss.logging.Logger;
+import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.ComplexTypeSerializer;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.w3c.dom.NamedNodeMap;
+
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
@@ -32,18 +40,6 @@
import javax.xml.transform.Result;
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.BufferedStreamResult;
-import org.jboss.ws.core.binding.ComplexTypeSerializer;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.wsf.spi.binding.jaxb.JAXBContextCache;
-import org.w3c.dom.NamedNodeMap;
-
/**
* A Serializer that can handle complex types by delegating to JAXB.
*
@@ -72,9 +68,10 @@
// This should be more efficient and accurate than searching the type mapping
Class expectedType = serContext.getJavaType();
Class actualType = value.getClass();
- Class[] javaTypes = shouldFilter(actualType) ? new Class[] { expectedType } : new Class[] { expectedType, actualType };
- JAXBContext jaxbContext = ((SerializationContextJAXWS)serContext).getJAXBContext(javaTypes);
+ Class[] types = shouldFilter(actualType) ? new Class[]{expectedType} : new Class[]{expectedType, actualType};
+ JAXBContext jaxbContext = getJAXBContext(types);
+
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
@@ -96,6 +93,22 @@
return result;
}
+ /**
+ * Retrieve JAXBContext from cache or create new one and cache it.
+ * @param types
+ * @return JAXBContext
+ */
+ private JAXBContext getJAXBContext(Class[] types){
+ JAXBContextCache cache = JAXBContextCache.getContextCache();
+ JAXBContext context = cache.get(types);
+ if(null==context)
+ {
+ context = JAXBContextFactory.newInstance().createContext(types);
+ cache.add(types, context);
+ }
+ return context;
+ }
+
// Remove this when we add a XMLGregorianCalendar Serializer
private boolean shouldFilter(Class<?> actualType)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -39,16 +39,5 @@
*/
public class SerializationContextJAXWS extends SerializationContext
{
- public static final String JAXB_CONTEXT_TYPES = "org.jboss.ws.jaxb.context.types";
-
- /**
- * Access the JAXBContext through the message context.
- * The actual instance is assiciated with the EndpointMetaData.
- */
- public static JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- return epMetaData.getJAXBContext(javaTypes);
- }
+ public static final String JAXB_CONTEXT_TYPES = "org.jboss.ws.jaxb.context.types";
}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,146 @@
+/*
+ * 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.core.utils;
+
+import java.lang.reflect.Array;
+
+/**
+ * Collected methods which allow easy implementation of <code>hashCode</code>.
+ *
+ * Example use case:
+ * <pre>
+ * public int hashCode(){
+ * int result = HashCodeUtil.SEED;
+ * //collect the contributions of various fields
+ * result = HashCodeUtil.hash(result, fPrimitive);
+ * result = HashCodeUtil.hash(result, fObject);
+ * result = HashCodeUtil.hash(result, fArray);
+ * return result;
+ * }
+ * </pre>
+ */
+public final class HashCodeUtil
+{
+
+ /**
+ * An initial value for a <code>hashCode</code>, to which is added contributions
+ * from fields. Using a non-zero value decreases collisons of <code>hashCode</code>
+ * values.
+ */
+ public static final int SEED = 23;
+
+ /**
+ * booleans.
+ */
+ public static int hash(int aSeed, boolean aBoolean)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.firstTerm(aSeed) + (aBoolean ? 1 : 0);
+ }
+
+ /**
+ * chars.
+ */
+ public static int hash(int aSeed, char aChar)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.firstTerm(aSeed) + (int)aChar;
+ }
+
+ /**
+ * ints.
+ */
+ public static int hash(int aSeed, int aInt)
+ {
+ /*
+ * Implementation Note
+ * Note that byte and short are handled by this method, through
+ * implicit conversion.
+ */
+ return org.jboss.ws.core.utils.HashCodeUtil.firstTerm(aSeed) + aInt;
+ }
+
+ /**
+ * longs.
+ */
+ public static int hash(int aSeed, long aLong)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.firstTerm(aSeed) + (int)(aLong ^ (aLong >>> 32));
+ }
+
+ /**
+ * floats.
+ */
+ public static int hash(int aSeed, float aFloat)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.hash(aSeed, Float.floatToIntBits(aFloat));
+ }
+
+ /**
+ * doubles.
+ */
+ public static int hash(int aSeed, double aDouble)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.hash(aSeed, Double.doubleToLongBits(aDouble));
+ }
+
+ /**
+ * <code>aObject</code> is a possibly-null object field, and possibly an array.
+ *
+ * If <code>aObject</code> is an array, then each element may be a primitive
+ * or a possibly-null object.
+ */
+ public static int hash(int aSeed, Object aObject)
+ {
+ int result = aSeed;
+ if (aObject == null)
+ {
+ result = org.jboss.ws.core.utils.HashCodeUtil.hash(result, 0);
+ }
+ else if (!org.jboss.ws.core.utils.HashCodeUtil.isArray(aObject))
+ {
+ result = org.jboss.ws.core.utils.HashCodeUtil.hash(result, aObject.hashCode());
+ }
+ else
+ {
+ int length = Array.getLength(aObject);
+ for (int idx = 0; idx < length; ++idx)
+ {
+ Object item = Array.get(aObject, idx);
+ //recursive call!
+ result = org.jboss.ws.core.utils.HashCodeUtil.hash(result, item);
+ }
+ }
+ return result;
+ }
+
+ /// PRIVATE ///
+ private static final int fODD_PRIME_NUMBER = 37;
+
+ private static int firstTerm(int aSeed)
+ {
+ return org.jboss.ws.core.utils.HashCodeUtil.fODD_PRIME_NUMBER * aSeed;
+ }
+
+ private static boolean isArray(Object aObject)
+ {
+ return aObject.getClass().isArray();
+ }
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -25,6 +25,7 @@
import javax.xml.namespace.QName;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxws.JAXBContextFactory;
import org.jboss.ws.metadata.umdm.Accessor;
import org.jboss.ws.metadata.umdm.AccessorFactory;
import org.jboss.ws.metadata.umdm.AccessorFactoryCreator;
@@ -60,18 +61,8 @@
}
private AccessorFactory create(final Class clazz)
- {
- final JAXBRIContext ctx;
- try
- {
- ctx = (JAXBRIContext)JAXBRIContext.newInstance(new Class[] { clazz });
- }
- catch (JAXBException e)
- {
- WSException ex = new WSException(e.getMessage());
- ex.setStackTrace(e.getStackTrace());
- throw ex;
- }
+ {
+ final JAXBRIContext ctx = (JAXBRIContext) JAXBContextFactory.newInstance().createContext(clazz);
return new AccessorFactory()
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,15 +23,11 @@
// $Id$
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-
import org.jboss.ws.metadata.config.ConfigurationProvider;
-import org.jboss.wsf.spi.binding.jaxb.JAXBContextCache;
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+import javax.xml.namespace.QName;
+
/**
* Client side endpoint meta data.
*
@@ -40,7 +36,6 @@
*/
public class ClientEndpointMetaData extends EndpointMetaData
{
- private JAXBHandler jaxbHandler = new JAXBContextCache();
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName portTypeName, Type type)
{
@@ -53,12 +48,6 @@
configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
}
- @Override
- public JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException
- {
- return jaxbHandler.getJAXBContext(javaTypes);
- }
-
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,25 +23,6 @@
// $Id$
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Observable;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.Service.Mode;
-
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -52,22 +33,27 @@
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
+import org.jboss.ws.core.jaxws.JAXBContextCache;
+import org.jboss.ws.core.jaxws.JAXBContextFactory;
import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
import org.jboss.ws.core.jaxws.client.DispatchBinding;
import org.jboss.ws.core.soap.Style;
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.metadata.config.CommonConfig;
-import org.jboss.ws.metadata.config.Configurable;
-import org.jboss.ws.metadata.config.ConfigurationProvider;
-import org.jboss.ws.metadata.config.EndpointFeature;
-import org.jboss.ws.metadata.config.JBossWSConfigFactory;
-import org.jboss.wsf.spi.binding.jaxb.JAXBContextCache;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.config.*;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.utils.JavaUtils;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.Service.Mode;
+import java.lang.reflect.Method;
+import java.util.*;
+
/**
* A Service component describes a set of endpoints.
*
@@ -147,6 +133,10 @@
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new ArrayList<UnifiedPortComponentRefMetaData>();
+ private JAXBContextCache jaxbCache = new JAXBContextCache();
+
+ private List<BindingCustomization> bindingCustomization = new ArrayList<BindingCustomization>();
+
public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName, Type type)
{
this.serviceMetaData = service;
@@ -327,7 +317,9 @@
return type;
}
- public abstract JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException;
+ public List<BindingCustomization> getBindingCustomizations() {
+ return bindingCustomization;
+ }
public String getAuthMethod()
{
@@ -649,6 +641,11 @@
configObservable.addObserver(observer);
}
+ public JAXBContextCache getJaxbCache()
+ {
+ return jaxbCache;
+ }
+
public String getConfigFile()
{
return configFile;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,17 +23,16 @@
// $Id$
-import javax.management.ObjectName;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.config.ConfigurationProvider;
-import org.jboss.wsf.spi.binding.jaxb.JAXBHandler;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import java.util.List;
+
/**
* Client side endpoint meta data.
*
@@ -44,14 +43,14 @@
public class ServerEndpointMetaData extends EndpointMetaData
{
protected static final Logger log = Logger.getLogger(ServerEndpointMetaData.class);
-
+
public static final String SEPID_DOMAIN = "jboss.ws";
public static final String SEPID_PROPERTY_CONTEXT = "context";
public static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
-
+
// The associated SPI endpoint
private Endpoint endpoint;
-
+
// The REQUIRED link name
private String linkName;
// Legacy JSR-109 port component name
@@ -187,11 +186,14 @@
{
this.secureWSDLAccess = secureWSDLAccess;
}
-
- @Override
- public JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException
+
+ /**
+ * Will be set through a deployment aspect
+ * @return List<BindingCustomization> of available customizations
+ */
+ public List<BindingCustomization> getBindingCustomizations()
{
- return endpoint.getJAXBHandler().getJAXBContext(javaTypes);
+ return endpoint.getBindingCustomizations();
}
public String toString()
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -23,15 +23,12 @@
// $Id$
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.wsf.spi.binding.jaxb.BasicJAXBHandler;
+import javax.xml.namespace.QName;
+
/**
* Tools Endpoint Metadata
* @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
@@ -47,10 +44,4 @@
super.configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
super.configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
}
-
- @Override
- public JAXBContext getJAXBContext(Class[] javaTypes) throws JAXBException
- {
- return new BasicJAXBHandler().getJAXBContext(javaTypes);
- }
}
\ No newline at end of file
Copied: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java (from rev 3756, branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java)
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java (rev 0)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.binding;
+
+import junit.framework.TestCase;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.BasicEndpoint;
+import org.jboss.ws.core.jaxws.JAXBBindingCustomization;
+
+import static org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+
+import java.util.List;
+import java.util.Iterator;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 28, 2007
+ */
+public class BindingCustomizationTestCase extends TestCase {
+
+ public void testCustomizationWriteAccess() throws Exception
+ {
+ Endpoint endpoint = new BasicEndpoint();
+ JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
+ endpoint.addBindingCustomization(jaxbCustomization);
+
+ // a started endpoint should deny customizations
+ try
+ {
+ endpoint.setState(EndpointState.STARTED);
+ endpoint.addBindingCustomization(jaxbCustomization);
+
+ fail("It should not be possible to change bindinig customizations on a started endpoint");
+ }
+ catch (IllegalAccessError e)
+ {
+ // all fine, this should happen
+ }
+ }
+
+ public void testCustomizationReadAccess() throws Exception
+ {
+ Endpoint endpoint = new BasicEndpoint();
+ JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
+ endpoint.addBindingCustomization(jaxbCustomization);
+ endpoint.setState(EndpointState.STARTED);
+
+ // read a single customization
+ List<BindingCustomization> customizations = endpoint.getBindingCustomizations();
+
+ BindingCustomization knownCustomization = null;
+ Iterator<BindingCustomization> it = customizations.iterator();
+ while(it.hasNext())
+ {
+ knownCustomization = it.next();
+ break;
+ }
+
+ assertNotNull(knownCustomization);
+
+ // however the iteratoion should be unmodifiable
+ try
+ {
+ customizations.add( new JAXBBindingCustomization() );
+ fail("Started Endpoints should only axpose read acccess to their binding customizations");
+ }
+ catch (Exception e)
+ {
+ // all fine, we'd expect this
+ }
+
+
+ }
+}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java 2007-07-09 16:35:34 UTC (rev 3827)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java 2007-07-09 16:56:38 UTC (rev 3828)
@@ -39,6 +39,7 @@
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.ws.core.jaxws.JAXBContextFactory;
/**
* Arrays with JSR181 endpoints
@@ -73,8 +74,8 @@
public void testNullArray() throws Exception
{
Integer[] intArr = null;
-
- JAXBContext jbc = JAXBContext.newInstance(Integer[].class);
+
+ JAXBContext jbc = JAXBContextFactory.newInstance().createContext(Integer[].class);
Marshaller m = jbc.createMarshaller();
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
StringWriter strw = new StringWriter();
@@ -83,7 +84,7 @@
String xmlFragment = strw.toString();
// <myarr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
// System.out.println(xmlFragment);
-
+
Unmarshaller um = jbc.createUnmarshaller();
Source source = new StreamSource(new ByteArrayInputStream(xmlFragment.getBytes()));
JAXBElement jbel = um.unmarshal(source, Integer[].class);
@@ -93,8 +94,8 @@
public void testEmptyArray() throws Exception
{
Integer[] intArr = new Integer[0];
-
- JAXBContext jbc = JAXBContext.newInstance(Integer[].class);
+
+ JAXBContext jbc = JAXBContextFactory.newInstance().createContext(Integer[].class);
Marshaller m = jbc.createMarshaller();
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
StringWriter strw = new StringWriter();
@@ -103,7 +104,7 @@
String xmlFragment = strw.toString();
// <myarr/>
// System.out.println(xmlFragment);
-
+
Unmarshaller um = jbc.createUnmarshaller();
Source source = new StreamSource(new ByteArrayInputStream(xmlFragment.getBytes()));
JAXBElement jbel = um.unmarshal(source, Integer[].class);
@@ -113,8 +114,8 @@
public void testSingleValueArray() throws Exception
{
Integer[] intArr = new Integer[] { new Integer(1) };
-
- JAXBContext jbc = JAXBContext.newInstance(Integer[].class);
+
+ JAXBContext jbc = JAXBContextFactory.newInstance().createContext(Integer[].class);
Marshaller m = jbc.createMarshaller();
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
StringWriter strw = new StringWriter();
@@ -123,7 +124,7 @@
String xmlFragment = strw.toString();
// <myarr><item>1</item></myarr>
// System.out.println(xmlFragment);
-
+
Unmarshaller um = jbc.createUnmarshaller();
Source source = new StreamSource(new ByteArrayInputStream(xmlFragment.getBytes()));
JAXBElement jbel = um.unmarshal(source, Integer[].class);
@@ -133,8 +134,8 @@
public void testMultipleValueArray() throws Exception
{
Integer[] intArr = new Integer[] { new Integer(1), new Integer(2), new Integer(3) };
-
- JAXBContext jbc = JAXBContext.newInstance(Integer[].class);
+
+ JAXBContext jbc = JAXBContextFactory.newInstance().createContext(Integer[].class);
Marshaller m = jbc.createMarshaller();
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
StringWriter strw = new StringWriter();
@@ -143,13 +144,13 @@
String xmlFragment = strw.toString();
// <myarr><item>1</item><item>2</item><item>3</item></myarr>
// System.out.println(xmlFragment);
-
+
Unmarshaller um = jbc.createUnmarshaller();
Source source = new StreamSource(new ByteArrayInputStream(xmlFragment.getBytes()));
JAXBElement jbel = um.unmarshal(source, Integer[].class);
assertEquals(intArr, jbel.getValue());
}
-
+
public void testEchoNullArray() throws Exception
{
Integer[] outArr = endpoint.intArr("null", null);
16 years, 10 months
JBossWS SVN: r3827 - branches/jbossws-2.0/build/eclipse.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-09 12:35:34 -0400 (Mon, 09 Jul 2007)
New Revision: 3827
Modified:
branches/jbossws-2.0/build/eclipse/jbossws.userlibraries
Log:
Use jbossas tag releases in eclipse library dependencies
Modified: branches/jbossws-2.0/build/eclipse/jbossws.userlibraries
===================================================================
--- branches/jbossws-2.0/build/eclipse/jbossws.userlibraries 2007-07-09 16:32:37 UTC (rev 3826)
+++ branches/jbossws-2.0/build/eclipse/jbossws.userlibraries 2007-07-09 16:35:34 UTC (rev 3827)
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-userlibraries version="2">
<library name="jboss-4.0.x" systemlibrary="false">
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-common.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-jmx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-system.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/lib/jboss.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-common.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/lib/jboss.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
</library>
<library name="jboss-4.2.x" systemlibrary="false">
<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_0_GA/build/output/jboss-4.2.0.GA/lib/jboss-jmx.jar"/>
@@ -29,24 +29,24 @@
<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_0_GA/build/output/jboss-4.2.0.GA/server/default/lib/jbosssx.jar"/>
</library>
<library name="jboss-5.0.x" systemlibrary="false">
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-aop-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-deployers.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-j2se.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss-javaee.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-system.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-system-jmx.jar" source="/home/tdiesler/svn/jbossas/trunk/system-jmx/src/main"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-vfs.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss.jar" source="/home/tdiesler/svn/jbossas/trunk/server/src/main"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jnpserver.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-logging-spi.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-xml-binding.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/client/jboss-ejb3-client.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-common-core.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jbosssx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/antlr.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss-security-spi.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-deployers.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-j2se.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss-javaee.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-system-jmx.jar" source="/home/tdiesler/svn/jbossas/trunk/system-jmx/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-vfs.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss.jar" source="/home/tdiesler/svn/jbossas/trunk/server/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jnpserver.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-logging-spi.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-xml-binding.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/client/jboss-ejb3-client.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/lib/jboss-common-core.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jbosssx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/antlr.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta2_JBossWS_2_0_0_GA/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss-security-spi.jar"/>
</library>
</eclipse-userlibraries>
16 years, 10 months
JBossWS SVN: r3826 - trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/soap.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 12:32:37 -0400 (Mon, 09 Jul 2007)
New Revision: 3826
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
Log:
svn merge -r 3542:3544 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2007-07-09 16:22:39 UTC (rev 3825)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2007-07-09 16:32:37 UTC (rev 3826)
@@ -257,8 +257,12 @@
appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction());
// Write wsa:MessageID
- if (getMessageID() != null)
+ if( (getReplyTo()!=null || getFaultTo()!=null) && null==getMessageID())
{
+ throw new AddressingException("Required addressing header missing:" + ADDR.getMessageIDQName());
+ }
+ else if (getMessageID() != null)
+ {
SOAPElement wsaMessageId = soapHeader.addChildElement(new NameImpl(ADDR.getMessageIDQName()));
wsaMessageId.addTextNode(getMessageID().getURI().toString());
}
16 years, 10 months
JBossWS SVN: r3825 - in trunk/jbossws-core/src/main: java/org/jboss/ws/tools and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 12:22:39 -0400 (Mon, 09 Jul 2007)
New Revision: 3825
Modified:
trunk/jbossws-core/src/main/etc/wsrunclient.bat
trunk/jbossws-core/src/main/etc/wsrunclient.sh
trunk/jbossws-core/src/main/etc/wstools.bat
trunk/jbossws-core/src/main/etc/wstools.sh
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
Log:
Cleanup previous merge from branch 2.0
Modified: trunk/jbossws-core/src/main/etc/wsrunclient.bat
===================================================================
--- trunk/jbossws-core/src/main/etc/wsrunclient.bat 2007-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/etc/wsrunclient.bat 2007-07-09 16:22:39 UTC (rev 3825)
@@ -63,7 +63,6 @@
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/commons-logging.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-remoting.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: trunk/jbossws-core/src/main/etc/wsrunclient.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wsrunclient.sh 2007-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/etc/wsrunclient.sh 2007-07-09 16:22:39 UTC (rev 3825)
@@ -58,7 +58,6 @@
# Setup the client classpath
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
# JBossAS-5.0 subset of jbossall-client.jar
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-logging-spi.jar"
Modified: trunk/jbossws-core/src/main/etc/wstools.bat
===================================================================
--- trunk/jbossws-core/src/main/etc/wstools.bat 2007-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/etc/wstools.bat 2007-07-09 16:22:39 UTC (rev 3825)
@@ -35,13 +35,7 @@
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wstx.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/log4j.jar
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/concurrent.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
Modified: trunk/jbossws-core/src/main/etc/wstools.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wstools.sh 2007-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/etc/wstools.sh 2007-07-09 16:22:39 UTC (rev 3825)
@@ -53,13 +53,7 @@
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/wstx.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/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"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/concurrent.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-spi.jar"
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-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-07-09 16:22:39 UTC (rev 3825)
@@ -76,7 +76,6 @@
{
String configLocation = null;
String outputDir = null;
-
if(args.length==0)
{
usage();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-07-09 16:17:39 UTC (rev 3824)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-07-09 16:22:39 UTC (rev 3825)
@@ -109,9 +109,7 @@
String defaultNamespace = getDefaultNamespace(wsdlDoc);
if (Constants.NS_WSDL11.equals(defaultNamespace))
{
-
WSDLFactory wsdlFactory = WSDLFactory.newInstance(JBossWSDLFactoryImpl.class.getName());
-
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
16 years, 10 months
JBossWS SVN: r3824 - in trunk/jbossws-core/src: main/java/org/jboss/ws/tools and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-09 12:17:39 -0400 (Mon, 09 Jul 2007)
New Revision: 3824
Modified:
trunk/jbossws-core/src/main/etc/wsrunclient.bat
trunk/jbossws-core/src/main/etc/wsrunclient.sh
trunk/jbossws-core/src/main/etc/wstools.bat
trunk/jbossws-core/src/main/etc/wstools.sh
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
Log:
svn merge -r 3458:3463 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
svn merge -r 3474:3482 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
svn merge -r 3486:3504 https://svn.jboss.org/repos/jbossws/branches/jbossws-2.0
Modified: trunk/jbossws-core/src/main/etc/wsrunclient.bat
===================================================================
--- trunk/jbossws-core/src/main/etc/wsrunclient.bat 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/etc/wsrunclient.bat 2007-07-09 16:17:39 UTC (rev 3824)
@@ -63,6 +63,7 @@
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/commons-logging.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-remoting.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: trunk/jbossws-core/src/main/etc/wsrunclient.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wsrunclient.sh 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/etc/wsrunclient.sh 2007-07-09 16:17:39 UTC (rev 3824)
@@ -58,6 +58,7 @@
# Setup the client classpath
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
# JBossAS-5.0 subset of jbossall-client.jar
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-logging-spi.jar"
Modified: trunk/jbossws-core/src/main/etc/wstools.bat
===================================================================
--- trunk/jbossws-core/src/main/etc/wstools.bat 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/etc/wstools.bat 2007-07-09 16:17:39 UTC (rev 3824)
@@ -35,7 +35,13 @@
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wstx.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/log4j.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/concurrent.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
Modified: trunk/jbossws-core/src/main/etc/wstools.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wstools.sh 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/etc/wstools.sh 2007-07-09 16:17:39 UTC (rev 3824)
@@ -53,7 +53,13 @@
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/wstx.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/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"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/concurrent.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-spi.jar"
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-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-07-09 16:17:39 UTC (rev 3824)
@@ -82,7 +82,7 @@
usage();
}
- for (int i = 0; i < args.length; i++)
+ for (int i = 0; i < args.length; i++)
{
String arg = args[i];
@@ -117,7 +117,7 @@
}
else
{
- usage();
+ usage();
}
}
@@ -128,16 +128,16 @@
{
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
+ private boolean process(Configuration config, String outputDir) throws IOException
{
if (config == null)
throw new IllegalArgumentException("Configuration is null");
-
+
if (outputDir == null)
outputDir = ".";
-
+
ToolsHelper helper = new ToolsHelper();
if (config.getJavaToWSDLConfig(false) != null)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-07-09 16:17:39 UTC (rev 3824)
@@ -23,19 +23,6 @@
// $Id$
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.ConnectException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.parsers.DocumentBuilder;
-
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.core.utils.JBossWSEntityResolver;
@@ -47,6 +34,18 @@
import org.w3c.dom.Element;
import org.xml.sax.EntityResolver;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.parsers.DocumentBuilder;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.ConnectException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
/**
* A factory that creates a <code>WSDLDefinitions</code> object from an URL.
*
@@ -110,7 +109,9 @@
String defaultNamespace = getDefaultNamespace(wsdlDoc);
if (Constants.NS_WSDL11.equals(defaultNamespace))
{
+
WSDLFactory wsdlFactory = WSDLFactory.newInstance(JBossWSDLFactoryImpl.class.getName());
+
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-07-09 11:34:47 UTC (rev 3823)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-07-09 16:17:39 UTC (rev 3824)
@@ -21,27 +21,24 @@
*/
package org.jboss.test.ws.jaxws.jbws1283;
+import junit.framework.Test;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
-import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
-import org.jboss.test.ws.jaxws.jbws1357.JBWS1357;
-import junit.framework.Test;
import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-import javax.activation.DataHandler;
import java.net.URL;
-import java.net.HttpURLConnection;
-import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
/**
* Attachment dropped on outbound messages if they have been
16 years, 10 months
JBossWS SVN: r3823 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-09 07:34:47 -0400 (Mon, 09 Jul 2007)
New Revision: 3823
Modified:
trunk/build/version.properties
Log:
repository.id=snaphot
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-07-09 11:32:21 UTC (rev 3822)
+++ trunk/build/version.properties 2007-07-09 11:34:47 UTC (rev 3823)
@@ -6,7 +6,7 @@
specification.version=jbossws-2.1
version.id=2.1.0.DEV
-repository.id=2.0.0.GA
+repository.id=snapshot
implementation.title=JBoss Web Services - JBossWS
implementation.url=http://www.jboss.org/products/jbossws
16 years, 10 months
JBossWS SVN: r3822 - in trunk: build/ant-import and 14 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-09 07:32:21 -0400 (Mon, 09 Jul 2007)
New Revision: 3822
Added:
trunk/jbossws-core/src/test/resources/jaxrpc/xop/xml-media-types.xsd
Modified:
trunk/build/ant-import/build-release.xml
trunk/build/build.xml
trunk/build/dist/ReleaseNotes.txt
trunk/build/version.properties
trunk/integration/native/ant-import/build-bin-dist.xml
trunk/integration/native/ant-import/build-release.xml
trunk/integration/native/build.xml
trunk/integration/native/src/main/etc/component-info40.xml
trunk/integration/native/src/main/etc/component-info42.xml
trunk/integration/native/src/main/etc/component-info50.xml
trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/native/version.properties
trunk/integration/spi/src/main/etc/component-info.xml
trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
trunk/jbossws-core/ant-import/build-release.xml
trunk/jbossws-core/src/main/etc/component-info.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
trunk/jbossws-core/src/test/resources/jaxrpc/xop/schema.xsd
Log:
Set the context class loader for handleRequest
Add revision switch to jaxws tools. Allows to specify the JAX-WS target specification (2.0|2.1)
Account for backward compatible bean name 'ServiceRefHandler'
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/build/ant-import/build-release.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -24,7 +24,7 @@
<echo message="* - Update portal-content/counter.xml"/>
<echo message="* - Update news in portal-content/freezone/projectDescription.html"/>
<echo message="* - Verify release notes and install instructions"/>
- <echo message="* - Publish the interop endpoints (ant -f jboss-tests/build.xml publish-interop-endpoints)"/>
+ <echo message="* - Publish the interop endpoints"/>
<echo message="* - Commit the portal-content"/>
<echo message="* - Commit the repository jars"/>
<echo message="* - Write a sticky post on the user forum"/>
@@ -47,12 +47,8 @@
</target>
<!-- Release to portal content -->
- <target name="check-portal-content" depends="prepare" unless="jbossws.portal.content.available">
- <echo message="*********************************************"/>
- <echo message="* Not available: ${jbossws.portal.content}"/>
- <echo message="*********************************************"/>
- </target>
- <target name="release-to-portal" depends="check-portal-content" description="Release to portal-content" if="jbossws.portal.content.available">
+ <target name="release-to-portal" depends="check-portal-content, build-src-dist"
+ description="Release to portal-content" if="jbossws.portal.content.available">
<property name="portal.freezone" value="${jbossws.portal.content}/freezone"/>
<property name="portal.userguide" value="${portal.freezone}/user-guide"/>
@@ -60,20 +56,36 @@
<!-- Copy downloads -->
<copy todir="${portal.downloads}" overwrite="true">
- <fileset dir="${build.output.dir}">
- <include name="jbossws-${version.id}.zip"/>
+ <fileset dir="${build.dir}/output">
<include name="jbossws-src-${version.id}.zip"/>
- <include name="jbossws-samples-${version.id}.zip"/>
</fileset>
+ <fileset dir="${int.native.dir}/output">
+ <include name="jbossws-native-${version.id}.zip"/>
+ </fileset>
</copy>
<!-- Copy Release Notes -->
- <copy tofile="${portal.downloads}/ReleaseNotes-${version.id}.txt" file="${build.bin.dist}/ReleaseNotes.txt" overwrite="true"/>
- <copy tofile="${portal.downloads}/Install-${version.id}.txt" file="${build.bin.dist}/Install.txt" overwrite="true"/>
+ <copy todir="${build.dir}/output" filtering="yes">
+ <fileset dir="${build.dir}/dist">
+ <include name="Install.txt"/>
+ <include name="ReleaseNotes.txt"/>
+ </fileset>
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+ <copy tofile="${portal.downloads}/ReleaseNotes-${version.id}.txt" file="${build.dir}/output/ReleaseNotes.txt" overwrite="true"/>
+ <copy tofile="${portal.downloads}/Install-${version.id}.txt" file="${build.dir}/output/Install.txt" overwrite="true"/>
</target>
-
+
+ <target name="check-portal-content" depends="prepare" unless="jbossws.portal.content.available">
+ <echo message="*********************************************"/>
+ <echo message="* Not available: ${jbossws.portal.content}"/>
+ <echo message="*********************************************"/>
+ </target>
+
<!-- ================================================================== -->
- <!-- Build distributions -->
+ <!-- Build source distributions -->
<!-- ================================================================== -->
<!-- Build the src dist -->
@@ -83,31 +95,14 @@
<mkdir dir="${build.src.dist}/jbossws-src-${version.id}"/>
<copy todir="${build.src.dist}/jbossws-src-${version.id}">
<fileset dir="${basedir}">
- <exclude name="*.md5"/>
+ <exclude name="**/*.md5"/>
<exclude name="**/output*/**"/>
<exclude name="**/thirdparty/**"/>
+ <exclude name="mergeinfo.txt"/>
</fileset>
</copy>
<zip destfile="${build.dir}/output/jbossws-src-${version.id}.zip" basedir="${build.src.dist}"
includes="jbossws-src-${version.id}/**"/>
</target>
-
- <!-- ================================================================== -->
- <!-- Documentation -->
- <!-- ================================================================== -->
- <!-- Generate the JavaDoc -->
- <target name="build-javadoc" depends="prepare" description="Generate the Javadoc">
- <mkdir dir="${build.output.dir}/docs/api"/>
- <javadoc destdir="${build.output.dir}/docs/api" author="true" version="true" use="true" windowtitle="JBossWS API">
- <packageset dir="${core.java.dir}" defaultexcludes="yes"/>
- <packageset dir="${jboss42.java.dir}" defaultexcludes="yes"/>
- <packageset dir="${jboss50.java.dir}" defaultexcludes="yes"/>
- <packageset dir="${tomcat.java.dir}" defaultexcludes="yes"/>
- <classpath refid="core.classpath"/>
- </javadoc>
- <zip destfile="${build.output.dir}/jbossws-${version.id}-api.zip" basedir="${build.output.dir}/docs"
- includes="api/**"/>
- </target>
-
</project>
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/build/build.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -122,6 +122,7 @@
<!-- ================================================================== -->
<target name="clean" depends="prepare" description="Cleans up most generated files.">
+ <delete dir="${build.dir}/output"/>
<ant antfile="${spi.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${int.jboss50.dir}/build.xml" target="clean" inheritall="false"/>
@@ -134,6 +135,7 @@
</target>
<target name="clobber" depends="prepare" description="Cleans up all generated files.">
+ <delete dir="${build.dir}/output"/>
<ant antfile="${spi.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${testsuite.dir}/build.xml" target="clobber" inheritall="false"/>
Modified: trunk/build/dist/ReleaseNotes.txt
===================================================================
--- trunk/build/dist/ReleaseNotes.txt 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/build/dist/ReleaseNotes.txt 2007-07-09 11:32:21 UTC (rev 3822)
@@ -7,9 +7,12 @@
Release Notes
=============
-The UserGuide accessible from http://labs.jboss.com/portal/jbossws is usally a good starting point
-A list of examples that accompany the UserGuide can be found in the samples
+The wiki (http://labs.jboss.com/portal/jbossws/) is usally a good starting point.
+It contains the User Guide and Quick Start instructions.
+A list of examples that accompany the UserGuide can be found in the tests directory
+that ship with the distribution.
+
If you have any questions, please post to the JBossWS User Forum
http://www.jboss.org/index.html?module=bb&op=viewforum&f=200
@@ -24,6 +27,98 @@
Feature Request
+ * [JBWS-434] - Support sequences of anys in JAXRPC
+ * [JBWS-1460] - @XmlMimeType and @XmlAttachmentRef on SEI parameter declarations
+ * [JBWS-1518] - Add support for jdk-1.6
+ * [JBWS-1597] - WSDL To Java - Add support for bound headers.
+ * [JBWS-1666] - Simplify jbosws jar dependencies
+ * [JBWS-1564] - Support swaRef with JAX-WS
+ * [JBWS-1618] - Make default context root for jaxws ejb endpoint configurable
+ * [JBWS-429] - WSDL To Java - Create Custom Holders for Custom types that define INOUT parameters and OUT parameters
+ * [JBWS-771] - Use part names that are friendly to .NET
+
+Bug
+
+ * [JBWS-801] - Chunked transfer of large attachments
+ * [JBWS-805] - Fault code is always 'Client'
+ * [JBWS-859] - SOAPMessageUnMarshaller doesn't support HTTP server response [204] - No Content
+ * [JBWS-862] - Return SOAP Fault for invalid soap messages
+ * [JBWS-1093] - Deploying a war that also contains normal servlets the web.xml is modified as if they are all endpoints
+ * [JBWS-1263] - Addressing does not disable the mustUnderstand attribute, which causes HandlerchainBaseImple.checkMustUnderstand to fail
+ * [JBWS-1283] - Soap attachments were dropped on server responses. Attachment is added on a handler's handleResponse method; however it mysteriously disappeared on the outgoing soap message.
+ * [JBWS-1339] - @Security domain vs. <security-domain>
+ * [JBWS-1346] - wsa:ReplyTo alwayt null
+ * [JBWS-1403] - NumberFormatException When Using StubExt.PROPERTY_CLIENT_TIMEOUT
+ * [JBWS-1422] - NPE if @WebParam.name like "mX.."
+ * [JBWS-1439] - Jdk 1.6.0 Requests get the error "setProperty must be overridden by all subclasses of SOAPMessage"
+ * [JBWS-1446] - Invalid WSDL when a parameter of type Object is part of a webmethod
+ * [JBWS-1468] - @Resource WebServiceContext for jbossas-4.x
+ * [JBWS-1472] - Address in WSDL is now always replaced regardless of 'alwaysModifySOAPAddress' value.
+ * [JBWS-1511] - MessageFactory does not preserve comments
+ * [JBWS-1520] - No server response on invalid soap request
+ * [JBWS-1553] - fails to read operations for portType from different namespace
+ * [JBWS-1556] - @WebWservice does not work with class isolation
+ * [JBWS-1563] - WSDLDefinitionsFactory doesn't resolve schema references locally
+ * [JBWS-1566] - JBossWS-1.2.0.GA invalid wsdl generated when using @XmlSchema annotations on Types inheriting from >1 java package
+ * [JBWS-1579] - @EndpointConfig ignored on SEI
+ * [JBWS-1588] - Review jar in classpath for wsrunclient.sh
+ * [JBWS-1594] - Support certificate password different from keystore
+ * [JBWS-1595] - No typemapping for xsd:anyType with soap encoding
+ * [JBWS-1607] - WSDL To Java - document/literal, IN OUT parameter incorectly used as return type.
+ * [JBWS-1609] - Address in WSDL - Port value is -1 when server is requested with default port 80
+ * [JBWS-1611] - SOAPAction is not sent in dispath requests
+ * [JBWS-1616] - Verify correct bahaviour of @WebService.wsdlLocation
+ * [JBWS-1619] - ServletEndpointContext.getHttpSession always creates HTTPSession
+ * [JBWS-1620] - Incorrect handling of MIME boundaries in MultipartRelatedDecoder
+ * [JBWS-1621] - wstools.sh contain the wrong client libs and will fail
+ * [JBWS-1622] - Multiple context root not supported
+ * [JBWS-1624] - JBossWS samples don't work with JMX authentication
+ * [JBWS-1625] - Calling SOAPPart.setContent() with a DOMSource containing an Element which is a SOAPElement the contents of the body are added twice.
+ * [JBWS-1627] - WSDL To Java - Array Unwrapping uses incorect case to reference array type.
+ * [JBWS-1647] - Text Node Preservation For Messages Sent Across The Wire
+ * [JBWS-1653] - Post-handler-chain not invoked for "Standard Client" configuration
+ * [JBWS-1657] - Error resolving swaref schema
+ * [JBWS-1658] - SwaRef fails with doclit/wrapped endpoints
+ * [JBWS-1659] - @XmlAttachmentRef ignored on method level
+ * [JBWS-1660] - Resolve swaref schema through entity resolver
+ * [JBWS-1680] - Dispatch.invoke does not throw a ProtocolException on Fault
+ * [JBWS-1690] - Review wstools scripts and jars copied to client.
+ * [JBWS-1691] - WSDL To Java - Initial Character of Service and SEI names should be upper case.
+ * [JBWS-1692] - SOAPElement.importNode() not supported
+ * [JBWS-1696] - MIssing wsdl4j.jar in scripts
+ * [JBWS-1697] - WSDL To Java - Incorrect handling of Simple types derived by restriction for holders.
+ * [JBWS-1698] - WSDL To Java - If fault name contains 'Fault' the generated Exception does not match the throws clause on the SEI
+ * [JBWS-1706] - SOAPConnection.get fails with ProtocolException
+ * [JBWS-1710] - StackOverflowError when calling SOAPDocument.createCDATASection
+ * [JBWS-1711] - NoClassDefFoundError: com/sun/xml/stream/buffer/XMLStreamBuffer
+
+Task
+
+ * [JBWS-1661] - Update to jaxb-ri-2.1
+
+Errata
+------
+ FIXME: [JBAS-3595] - Tomcat allows http access with transport guarantie CONFIDENTIAL
+ FIXME: [JBWEB-68] Servlet.init(ServletConfig) not called
+ FIXME: [JBCTS-540] EJB3 proxy does not implement the Home interface
+ FIXME: [JBWS-1312] Fix JMS transport in trunk
+ FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0
+ FIXME: [JBWS-1397] Fix <wsdl-publish-location> for jboss-5.0.x
+ FIXME: [JBWS-1460] @XmlMimeType on SEI parameter declarations
+ FIXME: [JBWS-1617] JAXRPC doc/literal trims empty string
+ FIXME: [JBWS-751] Multiple schema imports with the same namespace
+ FIXME: [JBWS-798] Complete EventingTestCase
+ FIXME: [JBWS-981] Virtual host configuration for EJB endpoints
+
+Enjoy,
+The JBossWS Team
+
+Previous Releases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+What's new in JBossWS-1.2.1
+---------------------------
+Feature Request
+
* [JBWS-1156] - Implement injection of WebServiceRef
* [JBWS-1021] - Implement javax.xml.ws.Endpoint
* [JBWS-1022] - Implement javax.xml.ws.WebServiceContext
@@ -111,11 +206,6 @@
FIXME: [JBWS-434] Support sequences of anys in JAXRPC
FIXME: [JBWS-751] Multiple schema imports with the same namespace
-Enjoy,
-The JBossWS Team
-
-Previous Releases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
What's new in jbossws-1.0.4
---------------------------
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/build/version.properties 2007-07-09 11:32:21 UTC (rev 3822)
@@ -6,7 +6,7 @@
specification.version=jbossws-2.1
version.id=2.1.0.DEV
-repository.id=snapshot
+repository.id=2.0.0.GA
implementation.title=JBoss Web Services - JBossWS
implementation.url=http://www.jboss.org/products/jbossws
Modified: trunk/integration/native/ant-import/build-bin-dist.xml
===================================================================
--- trunk/integration/native/ant-import/build-bin-dist.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/ant-import/build-bin-dist.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -42,7 +42,6 @@
</copy>
<copy tofile="${bindist.dir}/build.xml" file="${native.etc.dir}/bin-dist-build.xml"/>
<copy tofile="${bindist.build.dir}/build-deploy.xml" file="${native.etc.dir}/bin-dist-deploy.xml"/>
- <copy todir="${bindist.dir}" file="${native.dir}/version.properties"/>
<!-- build -->
<copy todir="${bindist.build.dir}">
@@ -87,9 +86,20 @@
<!-- docs -->
- <zip destfile="${bindist.docs.dir}/apidocs-${version.id}.zip">
- <fileset dir="${native.output.dir}/apidocs"/>
- </zip>
+ <copy todir="${bindist.docs.dir}" >
+ <fileset dir="${native.output.dir}">
+ <include name="apidocs/**"/>
+ </fileset>
+ </copy>
+ <copy todir="${bindist.docs.dir}" filtering="yes">
+ <fileset dir="${build.dir}/dist">
+ <include name="Install.txt"/>
+ <include name="ReleaseNotes.txt"/>
+ </fileset>
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
<copy todir="${bindist.docs.dir}">
<fileset dir="${build.dir}/etc">
Modified: trunk/integration/native/ant-import/build-release.xml
===================================================================
--- trunk/integration/native/ant-import/build-release.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/ant-import/build-release.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -26,11 +26,7 @@
<include name="jbossws-native50-deployer.zip"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-native50/${repository.id}/component-info.xml" file="${native.etc.dir}/component-info50.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="${build.dir}/version.properties"/>
- </filterset>
- </copy>
+ <copy tofile="${jboss.repository.dir}/jbossws-native50/${repository.id}/component-info.xml" file="${native.output.etc.dir}/component-info50.xml" overwrite="true"/>
<!-- jboss/jbossws-native42 -->
<property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
@@ -40,11 +36,7 @@
<include name="jbossws-native42.sar"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-native42/${repository.id}/component-info.xml" file="${native.etc.dir}/component-info42.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="${build.dir}/version.properties"/>
- </filterset>
- </copy>
+ <copy tofile="${jboss.repository.dir}/jbossws-native42/${repository.id}/component-info.xml" file="${native.output.etc.dir}/component-info42.xml" overwrite="true"/>
<!-- jboss/jbossws-native40 -->
<property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
@@ -54,11 +46,7 @@
<include name="jbossws-native40.sar"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-native40/${repository.id}/component-info.xml" file="${native.etc.dir}/component-info40.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="${build.dir}/version.properties"/>
- </filterset>
- </copy>
+ <copy tofile="${jboss.repository.dir}/jbossws-native40/${repository.id}/component-info.xml" file="${native.output.etc.dir}/component-info40.xml" overwrite="true"/>
</target>
Modified: trunk/integration/native/build.xml
===================================================================
--- trunk/integration/native/build.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/build.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -71,9 +71,9 @@
<!-- Compile etc files (manifests and such) -->
<target name="compile-etc" depends="init">
<mkdir dir="${native.output.etc.dir}"/>
- <copy todir="${native.output.etc.dir}" filtering="yes">
+ <copy todir="${native.output.etc.dir}" filtering="yes" overwrite="true">
<fileset dir="${native.etc.dir}">
- <include name="component-info-*.xml"/>
+ <include name="component-info*.xml"/>
</fileset>
<fileset dir="${build.dir}/etc">
<include name="default.mf"/>
@@ -84,6 +84,7 @@
<filter token="build.id" value="${build.id}"/>
<filter token="implementation.version" value="jbossws-native-${version.id}"/>
<filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${native.dir}/version.properties"/>
</filterset>
</copy>
</target>
Modified: trunk/integration/native/src/main/etc/component-info40.xml
===================================================================
--- trunk/integration/native/src/main/etc/component-info40.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/src/main/etc/component-info40.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -10,15 +10,12 @@
<import componentref="jboss/jbossxb">
<compatible version="@jboss-jbossxb@"/>
</import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss40@"/>
</import>
<import componentref="jboss/jbossws">
<compatible version="@repository.id@"/>
</import>
- <import componentref="jboss/jbossws-jboss50">
- <compatible version="@repository.id@"/>
- </import>
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id@"/>
</import>
Modified: trunk/integration/native/src/main/etc/component-info42.xml
===================================================================
--- trunk/integration/native/src/main/etc/component-info42.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/src/main/etc/component-info42.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -7,18 +7,21 @@
<artifact id="jbossws-native42.sar"/>
+ <import componentref="javassist">
+ <compatible version="@javassist-jboss42@"/>
+ <compatible version="@javassist-jboss42@-brew"/>
+ </import>
<import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
+ <compatible version="@jboss-jbossxb-jboss42@"/>
+ <compatible version="@jboss-jbossxb-jboss42@-brew"/>
</import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss42@"/>
+ <compatible version="@jboss-remoting-jboss42@-brew"/>
</import>
<import componentref="jboss/jbossws">
<compatible version="@repository.id@"/>
</import>
- <import componentref="jboss/jbossws-jboss50">
- <compatible version="@repository.id@"/>
- </import>
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id@"/>
</import>
Modified: trunk/integration/native/src/main/etc/component-info50.xml
===================================================================
--- trunk/integration/native/src/main/etc/component-info50.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/src/main/etc/component-info50.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -8,18 +8,18 @@
<artifact id="jbossws-native50.sar"/>
<artifact id="jbossws-native50-deployer.zip"/>
+ <import componentref="javassist">
+ <compatible version="@javassist-jboss50@"/>
+ </import>
<import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
+ <compatible version="@jboss-jbossxb-jboss50@"/>
</import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss50@"/>
</import>
<import componentref="jboss/jbossws">
<compatible version="@repository.id@"/>
</import>
- <import componentref="jboss/jbossws-jboss50">
- <compatible version="@repository.id@"/>
- </import>
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id@"/>
</import>
Modified: trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -34,7 +34,9 @@
</bean>
<!-- Bind Service objects in client environment context -->
- <!-- The bean name is compiled into the server. Changeit with the next release. -->
+ <bean name="WSServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
+
+ <!-- Note, JBoss_4_2_0_GA uses this hardcoded bean name -->
<bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
<!-- Locate the single instance of the kernel -->
Modified: trunk/integration/native/version.properties
===================================================================
--- trunk/integration/native/version.properties 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/native/version.properties 2007-07-09 11:32:21 UTC (rev 3822)
@@ -3,3 +3,16 @@
native.implementation.title=JBoss Web Services - JBossWS/Native
+# JBossAS-5.0
+javassist-jboss50=3.5.0.CR1
+jboss-jbossxb-jboss50=2.0.0.CR2
+jboss-remoting-jboss50=2.2.0.GA
+
+# JBossAS-4.2
+javassist-jboss42=3.5.0.GA
+jboss-jbossxb-jboss42=1.0.0.GA
+jboss-remoting-jboss42=2.2.1.GA
+
+# JBossAS-4.0
+jboss-jbossxb-jboss40=1.0.0.GA
+jboss-remoting-jboss40=1.4.3.GA
Modified: trunk/integration/spi/src/main/etc/component-info.xml
===================================================================
--- trunk/integration/spi/src/main/etc/component-info.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/etc/component-info.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -1,31 +1,29 @@
<project name="jboss/jbossws-spi">
+ <artifact id="jbossws-spi-src.zip"/>
+ <artifact id="jbossws-spi-scripts.zip"/>
+
+ <component id="jboss/jbossws-spi" description="JBossWS SPI" version="@repository.id@" licenseType="lgpl">
+
+ <artifact id="jbossws-spi.jar"/>
<artifact id="jbossws-spi-scripts.zip"/>
-
- <component id="jboss/jbossws-spi"
- description="JBossWS SPI"
- version="@repository.id@"
- licenseType="lgpl">
-
- <artifact id="jbossws-spi.jar"/>
- <artifact id="jbossws-spi-scripts.zip"/>
-
- <import componentref="sun-jaxb">
- <compatible version="@sun-jaxb@"/>
- </import>
-
- <import componentref="sun-jaxws">
- <compatible version="@sun-jaxws@"/>
- </import>
-
- <import componentref="woodstox">
- <compatible version="@woodstox@"/>
- </import>
-
- <export>
- <include input="jbossws-spi.jar"/>
- <include input="jbossws-spi-scripts.zip"/>
- </export>
-
- </component>
-
+
+ <import componentref="sun-jaxb">
+ <compatible version="@sun-jaxb@"/>
+ </import>
+
+ <import componentref="sun-jaxws">
+ <compatible version="@sun-jaxws@"/>
+ </import>
+
+ <import componentref="woodstox">
+ <compatible version="@woodstox@"/>
+ </import>
+
+ <export>
+ <include input="jbossws-spi.jar"/>
+ <include input="jbossws-spi-scripts.zip"/>
+ </export>
+
+ </component>
+
</project>
Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -37,6 +37,8 @@
*/
public interface ServiceRefHandler
{
+ final String BEAN_NAME = "WSServiceRefHandler";
+
ServiceRefMetaData newServiceRefMetaData();
Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs);
Modified: trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -54,7 +54,7 @@
{
Kernel kernel = KernelLocator.getKernel();
KernelRegistry registry = kernel.getRegistry();
- KernelRegistryEntry entry = registry.getEntry("WSServiceRefHandler");
+ KernelRegistryEntry entry = registry.getEntry(ServiceRefHandler.BEAN_NAME);
ServiceRefHandler handler = (ServiceRefHandler)entry.getTarget();
// Try legancy JBossAS-4.2 name
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -48,7 +48,7 @@
* Obtain a new instance of a WSContractProvider. This will use the current
* thread's context class loader to locate the WSContractProviderFactory
* implementation.
- *
+ *
* @return a new WSContractProvider
*/
public static WSContractConsumer newInstance()
@@ -59,7 +59,7 @@
/**
* Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be used to
* locate the WebServiceImporterProvide implementation
- *
+ *
* @param loader the ClassLoader to use
* @return a new WSContractConsumer
*/
@@ -80,37 +80,37 @@
/**
* 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,
+ * If the directory does not exist, it will be created. If not specified,
* the output directory will be used instead.
- *
+ *
* @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);
@@ -118,14 +118,14 @@
/**
* Sets the target package for generated source. If not specified the default
* is based off of the XML namespace.
- *
+ *
* @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);
@@ -133,25 +133,31 @@
/**
* Sets the PrintStream to use for status feedback. The simplest example
* would be to use System.out.
- *
+ *
* @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>
+ * Typically an implementation will use the system <code>java.class.path</code>
* property. So for most normal applications this method is not needed. However,
* if this API is being used from an isolated classloader, then it needs to
- * be called in order to reference all jars that are required by the
+ * be called in order to reference all jars that are required by the
* implementation.
- *
- * @param classPath a list of strings where each entry references a
+ *
+ * @param classPath a list of strings where each entry references a
* single jar or directory
*/
public abstract void setAdditionalCompilerClassPath(List<String> classPath);
/**
+ * Set the target JAX-WS specification target. Defaults to <code>2.0</code>
+ * @param target the JAX-WS specification version. Allowed values are 2.0, 2.1
+ */
+ public abstract void setTarget(String target);
+
+ /**
* Generate the required artifacts using the specified WSDL URL. This method
* may be called more than once, although this is probably not desireable
*
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -1,27 +1,37 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * 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.ant;
-import org.apache.tools.ant.*;
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.ExecuteJava;
import org.apache.tools.ant.taskdefs.LogOutputStream;
import org.apache.tools.ant.types.Commandline;
@@ -30,15 +40,9 @@
import org.apache.tools.ant.types.Path;
import org.jboss.wsf.spi.tools.WSContractConsumer;
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* Ant task which consumes a Web Service contract.
- *
+ *
* <table border="1">
* <tr align="left" BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
* <tr><td>fork</td><td>Whether or not to run the generation task in a separate VM.</td><td>true</td></tr>
@@ -49,13 +53,14 @@
* <tr><td>wsdlLocation</td><td>Value to use for @(a)WebService.wsdlLocation</td><td>generated</td></tr>
* <tr><td>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
+ * <tr><td>target</td><td>The JAX-WS specification target</td><td>2.0 | 2.1</td></tr>
* <tr><td>verbose</td><td>Enables more informational output about cmd progress.</td><td>false</td><tr>
* <tr><td>wsdl*</td><td>The WSDL file or URL</td><td>n/a</td><tr>
* </table>
* <b>* = required.</b>
- *
+ *
* <p>Example:
- *
+ *
* <pre>
* <WSConsumeTask
* fork="true"
@@ -63,36 +68,37 @@
* destdir="output"
* sourcedestdir="gen-src"
* keep="true"
- * wsdllocation="handEdited.wsdl"
+ * wsdllocation="handEdited.wsdl"
* wsdl="foo.wsdl">
* <binding dir="binding-files" includes="*.xml" excludes="bad.xml"/>
* </wsimport>
* </pre>
- *
+ *
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
* @version $Revision$
*/
public class WSConsumeTask extends Task
{
private CommandlineJava command = new CommandlineJava();
- private String wsdl = null;
- private File destdir = null;
- private File sourcedestdir = null;
+ private String wsdl;
+ private File destdir;
+ private File sourcedestdir;
private List<File> bindingFiles = new ArrayList<File>();
- private File catalog = null;
- private String wsdlLocation = null;
- private String targetPackage = null;
- private boolean keep = false;
- private boolean verbose = false;
- private boolean fork = false;
- private boolean debug = false;
-
+ private File catalog;
+ private String wsdlLocation;
+ private String targetPackage;
+ private boolean keep;
+ private boolean verbose;
+ private boolean fork;
+ private boolean debug;
+ private String target;
+
// Not actually used right now
public void setDebug(boolean debug)
{
this.debug = debug;
}
-
+
public Commandline.Argument createJvmarg()
{
return command.createVmArgument();
@@ -128,6 +134,11 @@
this.sourcedestdir = sourcedestdir;
}
+ public void setTarget(String target)
+ {
+ this.target = target;
+ }
+
public void setPackage(String targetPackage)
{
this.targetPackage = targetPackage;
@@ -147,7 +158,7 @@
{
this.wsdlLocation = wsdlLocation;
}
-
+
public void addConfiguredBinding(FileSet fs)
{
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
@@ -179,17 +190,19 @@
importer.setCatalog(catalog);
if (bindingFiles != null && bindingFiles.size() > 0)
importer.setBindingFiles(bindingFiles);
-
+ if (target != null)
+ importer.setTarget(target);
+
log("Consuming wsdl: " + wsdl, Project.MSG_INFO);
-
+
if (verbose)
{
importer.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
}
-
+
try
{
- importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
+ importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
importer.consume(wsdl);
}
catch (MalformedURLException e)
@@ -207,13 +220,12 @@
{
if (wsdl == null)
throw new BuildException("The wsdl attribute must be specified!", getLocation());
-
+
if (fork)
executeForked();
- else
- executeNonForked();
+ else executeNonForked();
}
-
+
private Path getTaskClassPath()
{
// Why is everything in the Ant API a big hack???
@@ -222,10 +234,10 @@
{
return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
}
-
+
return new Path(getProject());
}
-
+
private List<String> getTaskClassPathStrings()
{
// Why is everything in the Ant API a big hack???
@@ -236,66 +248,72 @@
for (String string : ((AntClassLoader)cl).getClasspath().split(File.pathSeparator))
strings.add(string);
}
-
+
return strings;
}
private void executeForked() throws BuildException
{
command.setClassname(org.jboss.wsf.spi.tools.cmd.WSConsume.class.getName());
-
+
Path path = command.createClasspath(getProject());
path.append(getTaskClassPath());
-
+
if (keep)
command.createArgument().setValue("-k");
-
+
for (File file : bindingFiles)
{
command.createArgument().setValue("-b");
command.createArgument().setFile(file);
}
-
+
if (catalog != null)
{
command.createArgument().setValue("-c");
command.createArgument().setFile(catalog);
}
-
+
if (targetPackage != null)
{
command.createArgument().setValue("-p");
command.createArgument().setValue(targetPackage);
}
-
+
if (wsdlLocation != null)
{
command.createArgument().setValue("-w");
command.createArgument().setValue(wsdlLocation);
}
-
+
if (destdir != null)
{
command.createArgument().setValue("-o");
command.createArgument().setFile(destdir);
}
-
+
if (sourcedestdir != null)
{
command.createArgument().setValue("-s");
command.createArgument().setFile(sourcedestdir);
}
-
- if (!verbose)
- command.createArgument().setValue("-q");
-
- // Always dump traces
- command.createArgument().setValue("-t");
+
+ if (target != null)
+ {
+ command.createArgument().setValue("-t");
+ command.createArgument().setValue(target);
+ }
+
+ if (verbose)
+ command.createArgument().setValue("-v");
+
command.createArgument().setValue(wsdl);
+
+ log("Consuming wsdl: " + wsdl, Project.MSG_INFO);
if (verbose)
log("Command invoked: " + command.getJavaCommand().toString());
-
+
ExecuteJava execute = new ExecuteJava();
execute.setClasspath(path);
execute.setJavaCommand(command.getJavaCommand());
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -35,23 +35,24 @@
/**
* WSConsumeTask is a cmd line tool that generates portable JAX-WS artifacts
* from a WSDL file.
- *
+ *
* <pre>
* usage: WSConsumeTask [options] <wsdl-url>
- * options:
- * -h, --help Show this help message
- * -b, --binding=<file> One or more JAX-WS or JAXB binding files
- * -k, --keep Keep/Generate Java source
- * -c --catalog=<file> Oasis XML Catalog file for entity resolution
- * -p --package=<name> The target package for generated source
- * -w --wsdlLocation=<loc> Value to use for @(a)WebService.wsdlLocation
- * -o, --output=<directory> The directory to put generated artifacts
- * -s, --source=<directory> The directory to put Java source
- * -q, --quiet Be somewhat more quiet
- * -t, --show-traces Show full exception stack traces
- * -l, --load-consumer Load the consumer and exit (debug utility)
+ * options:
+ * -h, --help Show this help message
+ * -b, --binding=<file> One or more JAX-WS or JAXB binding files
+ * -k, --keep Keep/Generate Java source
+ * -c --catalog=<file> Oasis XML Catalog file for entity resolution
+ * -p --package=<name> The target package for generated source
+ * -w --wsdlLocation=<loc> Value to use for @(a)WebService.wsdlLocation
+ * -o, --output=<directory> The directory to put generated artifacts
+ * -s, --source=<directory> The directory to put Java source
+ * -t, --target=<2.0|2.1> The target specification target
+ * -q, --quiet Be somewhat more quiet
+ * -v, --verbose Show full exception stack traces
+ * -l, --load-consumer Load the consumer and exit (debug utility)
* </pre>
- *
+ *
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
* @version $Revision$
*/
@@ -63,11 +64,12 @@
private String targetPackage = null;
private String wsdlLocation = null;
private boolean quiet = false;
- private boolean showTraces = false;
+ private boolean verbose = false;
private boolean loadConsumer = false;
private File outputDir = new File("output");
private File sourceDir = null;
-
+ private String target = null;
+
public static String PROGRAM_NAME = System.getProperty("program.name", WSConsume.class.getName());
public static void main(String[] args)
@@ -76,25 +78,26 @@
URL wsdl = importer.parseArguments(args);
System.exit(importer.importServices(wsdl));
}
-
+
private URL parseArguments(String[] args)
{
- String shortOpts = "hb:kc:p:w:o:s:qtl";
- LongOpt[] longOpts =
+ String shortOpts = "b:c:p:w:o:s:t:khqvl";
+ LongOpt[] longOpts =
{
- new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
- new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("target", LongOpt.REQUIRED_ARGUMENT, null, 't'),
+ new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+ new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
- new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
+ new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
};
-
+
Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
int c;
while ((c = getopt.getopt()) != -1)
@@ -122,11 +125,14 @@
case 's':
sourceDir = new File(getopt.getOptarg());
break;
+ case 't':
+ target = getopt.getOptarg();
+ break;
case 'q':
quiet = true;
break;
- case 't':
- showTraces = true;
+ case 'v':
+ verbose = true;
break;
case 'l':
loadConsumer = true;
@@ -154,7 +160,7 @@
printHelp();
System.exit(1);
}
-
+
URL url = null;
try
{
@@ -173,11 +179,11 @@
System.err.println("Error: Invalid URI: " + args[wsdlPos]);
System.exit(1);
}
-
+
return url;
}
-
-
+
+
private int importServices(URL wsdl)
{
WSContractConsumer importer = WSContractConsumer.newInstance();
@@ -189,19 +195,22 @@
if (! quiet)
importer.setMessageStream(System.out);
-
+
if (catalog != null)
importer.setCatalog(catalog);
-
+
if (targetPackage != null)
importer.setTargetPackage(targetPackage);
-
+
if (wsdlLocation != null)
importer.setWsdlLocation(wsdlLocation);
-
+
if (bindingFiles != null && bindingFiles.size() > 0)
importer.setBindingFiles(bindingFiles);
-
+
+ if(target!=null)
+ importer.setTarget(target);
+
try
{
importer.consume(wsdl);
@@ -209,8 +218,8 @@
}
catch (Throwable t)
{
- System.err.println("Error: Could not import. (use --show-traces to see full traces)");
- if (!showTraces)
+ System.err.println("Error: Could not import. (use --verbose to see full traces)");
+ if (!verbose)
{
String message = t.getMessage();
if (message == null)
@@ -221,9 +230,9 @@
{
t.printStackTrace(System.err);
}
-
+
}
-
+
return 1;
}
@@ -241,8 +250,9 @@
out.println(" -w --wsdlLocation=<loc> Value to use for @WebService.wsdlLocation");
out.println(" -o, --output=<directory> The directory to put generated artifacts");
out.println(" -s, --source=<directory> The directory to put Java source");
+ out.println(" -t, --target=<2.0|2.1> The JAX-WS specification target");
out.println(" -q, --quiet Be somewhat more quiet");
- out.println(" -t, --show-traces Show full exception stack traces");
+ out.println(" -v, --verbose Show full exception stack traces");
out.println(" -l, --load-consumer Load the consumer and exit (debug utility)");
out.flush();
}
Modified: trunk/jbossws-core/ant-import/build-release.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-release.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/jbossws-core/ant-import/build-release.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -28,7 +28,7 @@
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-core-src.zip"/>
- <include name="jbossws-resources.zip"/>
+ <include name="jbossws-core-scripts.zip"/>
</fileset>
</copy>
<copy tofile="${jboss.repository.dir}/jbossws/${repository.id}/component-info.xml" file="${core.output.etc.dir}/component-info.xml" filtering="true" overwrite="true">
Modified: trunk/jbossws-core/src/main/etc/component-info.xml
===================================================================
--- trunk/jbossws-core/src/main/etc/component-info.xml 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/jbossws-core/src/main/etc/component-info.xml 2007-07-09 11:32:21 UTC (rev 3822)
@@ -11,7 +11,7 @@
<artifact id="jboss-jaxws.jar"/>
<artifact id="jboss-saaj.jar"/>
<artifact id="jbossws-core-src.zip"/>
- <artifact id="jbossws-resources.zip"/>
+ <artifact id="jbossws-core-scripts.zip"/>
<import componentref="apache-xmlsec">
<compatible version="@apache-xmlsec@"/>
@@ -21,19 +21,12 @@
<compatible version="@ibm-wsdl4j@"/>
<compatible version="@ibm-wsdl4j@-brew"/>
</import>
- <import componentref="javassist">
- <compatible version="@javassist@"/>
- <compatible version="@javassist@-brew"/>
- </import>
<import componentref="jbpm/bpel">
<compatible version="@jbpm-bpel@"/>
</import>
<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>
@@ -43,6 +36,9 @@
<import componentref="sun-jaxws">
<compatible version="@sun-jaxws@"/>
</import>
+ <import componentref="wscommons-policy">
+ <compatible version="@wscommons-policy@"/>
+ </import>
<export>
<include input="jbossws-core.jar"/>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-09 11:32:21 UTC (rev 3822)
@@ -48,6 +48,7 @@
private PrintStream messageStream;
private String wsdlLocation;
private List<String> additionalCompilerClassPath;
+ private String target = "2.0";
@Override
public void setBindingFiles(List<File> bindingFiles)
@@ -102,6 +103,11 @@
this.additionalCompilerClassPath = additionalCompilerClassPath;
}
+ public void setTarget(String target)
+ {
+ this.target = target;
+ }
+
@Override
public void consume(URL wsdl)
{
@@ -163,8 +169,14 @@
// Always add the output directory and the wsdl location
args.add("-d");
args.add(outputDir.getAbsolutePath());
+
+ // Always set the target
+ args.add("-target");
+ args.add(target);
+
+ // finally the WSDL file
args.add(wsdl.toString());
-
+
try
{
// enforce woodstox
@@ -172,10 +184,10 @@
System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
WsimportTool compileTool = new WsimportTool(stream);
- boolean success = compileTool.run(args.toArray(new String[0]));
+ boolean success = compileTool.run(args.toArray(new String[args.size()]));
if (!success)
- throw new IllegalStateException("WsImport invocation failed");
+ throw new IllegalStateException("WsImport invocation failed. Try the verbose switch for more information");
}
catch (Throwable t)
{
Modified: trunk/jbossws-core/src/test/resources/jaxrpc/xop/schema.xsd
===================================================================
--- trunk/jbossws-core/src/test/resources/jaxrpc/xop/schema.xsd 2007-07-09 11:31:57 UTC (rev 3821)
+++ trunk/jbossws-core/src/test/resources/jaxrpc/xop/schema.xsd 2007-07-09 11:32:21 UTC (rev 3822)
@@ -3,7 +3,7 @@
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:tns="http://jboss.org/test/ws/xop/doclit">
- <s:import schemaLocation="http://www.w3.org/2005/05/xmlmime" namespace="http://www.w3.org/2005/05/xmlmime"/>
+ <s:import schemaLocation="xml-media-types.xsd" namespace="http://www.w3.org/2005/05/xmlmime"/>
<s:element name="PingMsg">
<s:complexType>
Copied: trunk/jbossws-core/src/test/resources/jaxrpc/xop/xml-media-types.xsd (from rev 3817, branches/jbossws-2.0/jbossws-core/src/test/resources/jaxrpc/xop/xml-media-types.xsd)
===================================================================
--- trunk/jbossws-core/src/test/resources/jaxrpc/xop/xml-media-types.xsd (rev 0)
+++ trunk/jbossws-core/src/test/resources/jaxrpc/xop/xml-media-types.xsd 2007-07-09 11:32:21 UTC (rev 3822)
@@ -0,0 +1,36 @@
+<!--
+ Describing Media Content of Binary Data in XML
+ http://www.w3.org/TR/2005/NOTE-xml-media-types-20050504
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+ targetNamespace="http://www.w3.org/2005/05/xmlmime">
+
+ <xs:attribute name="contentType">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:minLength value="3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="expectedContentTypes" type="xs:string"/>
+
+ <xs:complexType name="base64Binary">
+ <xs:simpleContent>
+ <xs:extension base="xs:base64Binary">
+ <xs:attribute ref="xmime:contentType"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="hexBinary">
+ <xs:simpleContent>
+ <xs:extension base="xs:hexBinary">
+ <xs:attribute ref="xmime:contentType"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
16 years, 10 months