JBossWS SVN: r10866 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 08:16:00 -0400 (Thu, 08 Oct 2009)
New Revision: 10866
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2715] Updating excludes
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-08 10:40:23 UTC (rev 10865)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-08 12:16:00 UTC (rev 10866)
@@ -48,3 +48,7 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2715] JAXBIntroductions support
+org/jboss/test/ws/jaxws/jaxbcust/**
+org/jboss/test/ws/jaxws/samples/jaxbintros/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-08 10:40:23 UTC (rev 10865)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-08 12:16:00 UTC (rev 10866)
@@ -45,3 +45,7 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2715] JAXBIntroductions support
+org/jboss/test/ws/jaxws/jaxbcust/**
+org/jboss/test/ws/jaxws/samples/jaxbintros/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-08 10:40:23 UTC (rev 10865)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-08 12:16:00 UTC (rev 10866)
@@ -45,3 +45,7 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2715] JAXBIntroductions support
+org/jboss/test/ws/jaxws/jaxbcust/**
+org/jboss/test/ws/jaxws/samples/jaxbintros/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-08 10:40:23 UTC (rev 10865)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-08 12:16:00 UTC (rev 10866)
@@ -45,3 +45,7 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2715] JAXBIntroductions support
+org/jboss/test/ws/jaxws/jaxbcust/**
+org/jboss/test/ws/jaxws/samples/jaxbintros/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-08 10:40:23 UTC (rev 10865)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-08 12:16:00 UTC (rev 10866)
@@ -45,3 +45,7 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2715] JAXBIntroductions support
+org/jboss/test/ws/jaxws/jaxbcust/**
+org/jboss/test/ws/jaxws/samples/jaxbintros/**
14 years, 8 months
JBossWS SVN: r10865 - in stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws: jaxbintros and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 06:40:23 -0400 (Thu, 08 Oct 2009)
New Revision: 10865
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java
Log:
[JBWS-2714] Removing tests moved to framework
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 10:39:42 UTC (rev 10864)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 10:40:23 UTC (rev 10865)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jaxbintros;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.jboss.jaxb.intros.BindingCustomizationFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * @author alessio.soldano(a)jboss.com
- */
-public class AnnotationReaderTestCase extends JBossWSTest
-{
- public void testUnmarshal() throws Exception
- {
- String reqString =
- " <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" +
- " <qname>The Frog</qname>" +
- " </ns1:user>";
-
- Map<String, Object> jaxbConfig = BindingCustomizationFactory.getBindingCustomization(new FileInputStream(getResourceFile(
- "jaxws/jaxbintros/WEB-INF/jaxb-intros.xml").getPath()), "http://org.jboss.ws/provider");
-
- JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig);
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-
- JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes())
-
- ), UserType.class);
-
- UserType ut = (UserType)jbe.getValue();
- assertEquals("Kermit", ut.getString());
- assertEquals("The Frog", ut.getQname().getLocalPart());
-
- }
-}
14 years, 8 months
JBossWS SVN: r10864 - in stack/cxf/trunk/modules/testsuite: cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 06:39:42 -0400 (Thu, 08 Oct 2009)
New Revision: 10864
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2714] Removing tests move to framework + excluding test depending on CXF update
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 10:39:42 UTC (rev 10864)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.cxf.jaxbintros;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
-import org.jboss.jaxb.intros.IntroductionsConfigParser;
-import org.jboss.jaxb.intros.configmodel.JaxbIntros;
-import org.jboss.wsf.test.JBossWSTest;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- */
-public class AnnotationReaderTestCase extends JBossWSTest
-{
- public void testUnmarshal() throws Exception
- {
- String reqString =
- " <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" +
- " <qname>The Frog</qname>" +
- " </ns1:user>";
-
- JaxbIntros config = IntroductionsConfigParser.parseConfig(new FileInputStream(getResourceFile("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").getPath()));
-
- IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
- Map<String, Object> jaxbConfig = new HashMap<String, Object>();
-
- jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.ws/provider");
- jaxbConfig.put(JAXBRIContext.ANNOTATION_READER, reader);
-
- JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig);
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-
- JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes())
-
- ), UserType.class);
-
- UserType ut = (UserType)jbe.getValue();
- assertEquals("Kermit", ut.getString());
- assertEquals("The Frog", ut.getQname().getLocalPart());
-
- }
-}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2009-10-08 10:39:42 UTC (rev 10864)
@@ -86,27 +86,26 @@
*/
public void testEndpoint() throws Exception
{
- System.out.println("FIXME: [CXF-2460][JBWS-2714] Re-enable test after updating to CXF 2.2.4");
-// try
-// {
-// URL wsdlURL = new URL(endpointAddress + "?wsdl");
-// QName serviceName = new QName("http://org.jboss.ws/cxf/jaxbintros", "EndpointBeanService");
-//
-// setBindingCustomizationOnClientSide();
-// Service service = Service.create(wsdlURL, serviceName);
-// Endpoint port = service.getPort(Endpoint.class);
-// UserType user = new UserType();
-// QName qname = new QName("ns", "local", "prefix");
-// user.setQname(qname);
-// user.setString("Foo");
-// UserType result = port.echo(user);
-// assertEquals("Foo", result.getString());
-// assertEquals(qname, result.getQname());
-// }
-// finally
-// {
-// restoreConfigurer();
-// }
+ try
+ {
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/cxf/jaxbintros", "EndpointBeanService");
+
+ setBindingCustomizationOnClientSide();
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = service.getPort(Endpoint.class);
+ UserType user = new UserType();
+ QName qname = new QName("ns", "local", "prefix");
+ user.setQname(qname);
+ user.setString("Foo");
+ UserType result = port.echo(user);
+ assertEquals("Foo", result.getString());
+ assertEquals(qname, result.getQname());
+ }
+ finally
+ {
+ restoreConfigurer();
+ }
}
/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-10-08 10:39:42 UTC (rev 10864)
@@ -44,3 +44,6 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
+
+# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
+org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-10-08 10:39:42 UTC (rev 10864)
@@ -44,3 +44,6 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
+
+# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
+org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-10-08 10:39:42 UTC (rev 10864)
@@ -44,3 +44,6 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
+
+# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
+org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-10-08 10:39:42 UTC (rev 10864)
@@ -50,3 +50,6 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
+
+# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
+org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-08 10:39:04 UTC (rev 10863)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-10-08 10:39:42 UTC (rev 10864)
@@ -44,3 +44,6 @@
# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
org/jboss/test/ws/jaxws/binding/**
+
+# [JBWS-2780] Update to CXF 2.2.4 to get fix for [CXF-2460]
+org/jboss/test/ws/jaxws/cxf/jaxbintros/**
14 years, 8 months
JBossWS SVN: r10863 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 06:39:04 -0400 (Thu, 08 Oct 2009)
New Revision: 10863
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserEndpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.java
framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/
framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/
framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
Log:
[JBWS-2714] Adding common test to jbossws-framework
Modified: framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2009-10-08 09:28:27 UTC (rev 10862)
+++ framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2009-10-08 10:39:04 UTC (rev 10863)
@@ -137,6 +137,18 @@
<include name="wsdl/HttpBinding.wsdl"/>
</webinf>
</war>
+
+ <!-- jaxws-samples-jaxbintros -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-samples-jaxbintros.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jaxbintros/META-INF">
+ <include name="**/*" />
+ </metainf>
+ </jar>
<!-- jaxws-samples-logicalhandler -->
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-logicalhandler-source.war"
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jaxbcust;
+
+import junit.framework.TestCase;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
+ *
+ * @since 28-Jun-2007
+ */
+public class BindingCustomizationTestCase extends TestCase {
+
+ DeploymentModelFactory deploymentModelFactory;
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ }
+
+ public void testCustomizationWriteAccess() throws Exception
+ {
+ Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
+ BindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", "http://org.jboss.bindingCustomization");
+ endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
+
+ // a started endpoint should deny customizations
+ try
+ {
+ endpoint.setState(EndpointState.STARTED);
+ endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
+
+ fail("It should not be possible to change bindinig customizations on a started endpoint");
+ }
+ catch (Exception e)
+ {
+ // all fine, this should happen
+ }
+ }
+
+ public void testCustomizationReadAccess() throws Exception
+ {
+ Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
+ BindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", "http://org.jboss.bindingCustomization");
+ endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
+ endpoint.setState(EndpointState.STARTED);
+
+ // read a single customization
+ BindingCustomization knownCustomization = endpoint.getAttachment(BindingCustomization.class);
+ assertNotNull(knownCustomization);
+
+ // however the iteratoion should be unmodifiable
+ try
+ {
+ endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
+ fail("Started Endpoints should only axpose read acccess to their binding customizations");
+ }
+ catch (Exception e)
+ {
+ // all fine, we'd expect this
+ }
+
+
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserEndpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserEndpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserEndpoint.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/samples/jaxbintros")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+public interface AnnotatedUserEndpoint
+{
+ public AnnotatedUserType echo(AnnotatedUserType foo);
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserType.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.namespace.QName;
+
+/**
+ * <p>Java class for UserType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="UserType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="string" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlRootElement(namespace = "http://org.jboss.ws/provider", name = "user")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "UserType", propOrder = { "string", "qname" })
+public class AnnotatedUserType
+{
+
+ @XmlAttribute(required = true)
+ protected String string;
+ @XmlElement(required = true)
+ protected QName qname;
+
+ /**
+ * Gets the value of the string property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getString()
+ {
+ return string;
+ }
+
+ /**
+ * Sets the value of the string property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setString(String value)
+ {
+ this.string = value;
+ }
+
+ /**
+ * Gets the value of the qname property.
+ *
+ * @return
+ * possible object is
+ * {@link javax.xml.namespace.QName }
+ *
+ */
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ /**
+ * Sets the value of the qname property.
+ *
+ * @param value
+ * allowed object is
+ * {@link javax.xml.namespace.QName }
+ *
+ */
+ public void setQname(QName value)
+ {
+ this.qname = value;
+ }
+
+}
+
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotatedUserType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.jaxb.intros.BindingCustomizationFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
+ */
+public class AnnotationReaderTestCase extends JBossWSTest
+{
+ public void testUnmarshal() throws Exception
+ {
+ String reqString =
+ " <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" +
+ " <qname>The Frog</qname>" +
+ " </ns1:user>";
+
+ Map<String, Object> jaxbConfig = BindingCustomizationFactory.getBindingCustomization(new FileInputStream(getResourceFile(
+ "jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml").getPath()), "http://org.jboss.ws/provider");
+
+ JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig);
+ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+ JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes())
+
+ ), UserType.class);
+
+ UserType ut = (UserType)jbe.getValue();
+ assertEquals("Kermit", ut.getString());
+ assertEquals("The Frog", ut.getQname().getLocalPart());
+
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/AnnotationReaderTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/samples/jaxbintros")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+public interface Endpoint
+{
+ public UserType echo(UserType user);
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/Endpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/samples/jaxbintros")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+@Stateless
+public class EndpointBean implements Endpoint
+{
+ public UserType echo(UserType user)
+ {
+ System.out.println("user: " + user);
+ return user;
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/EndpointBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+/**
+ * Test the JAXBIntroduction features.
+ *
+ * jaxb-intros.xml can reside under META-INF or WEB-INF and should be
+ * picked up by JAXBIntroduction deployment aspect on server side.
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class JAXBIntroTestCase extends JBossWSTest
+{
+ private String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-samples-jaxbintros/EndpointBean";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JAXBIntroTestCase.class, "jaxws-samples-jaxbintros.jar");
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Element wsdl = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(wsdl);
+ Iterator<Element> it = DOMUtils.getChildElements(wsdl, new QName("http://www.w3.org/2001/XMLSchema","attribute"), true);
+ boolean attributeFound = false;
+ while (it.hasNext())
+ {
+ Element el = it.next();
+ if ("string".equals(el.getAttribute("name")))
+ {
+ attributeFound = true;
+ }
+ }
+ assertTrue("<xs:attribute name=\"string\" ..> not found in wsdl", attributeFound);
+ }
+
+ /**
+ * Client side uses the annotated user type class, server side uses the plain one but has jaxbintros in place
+ *
+ * @throws Exception
+ */
+ public void testAnnotatedUserEndpoint() throws Exception
+ {
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/samples/jaxbintros", "EndpointBeanService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ AnnotatedUserEndpoint port = service.getPort(AnnotatedUserEndpoint.class);
+ AnnotatedUserType user = new AnnotatedUserType();
+ QName qname = new QName("ns", "local", "prefix");
+ user.setQname(qname);
+ user.setString("Foo");
+ AnnotatedUserType result = port.echo(user);
+ assertEquals("Foo", result.getString());
+ assertEquals(qname, result.getQname());
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.java 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jaxbintros;
+
+import javax.xml.namespace.QName;
+
+/**
+ * <p>Java class for UserType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="UserType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="string" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class UserType
+{
+ protected String string;
+
+ protected QName qname;
+
+ /**
+ * Gets the value of the string property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getString()
+ {
+ return string;
+ }
+
+ /**
+ * Sets the value of the string property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setString(String value)
+ {
+ this.string = value;
+ }
+
+ /**
+ * Gets the value of the qname property.
+ *
+ * @return
+ * possible object is
+ * {@link javax.xml.namespace.QName }
+ *
+ */
+ public QName getQname()
+ {
+ return qname;
+ }
+
+ /**
+ * Sets the value of the qname property.
+ *
+ * @param value
+ * allowed object is
+ * {@link javax.xml.namespace.QName }
+ *
+ */
+ public void setQname(QName value)
+ {
+ this.qname = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/jaxbintros/UserType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml 2009-10-08 10:39:04 UTC (rev 10863)
@@ -0,0 +1,27 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros" default-namespace="http://org.jboss.ws/provider">
+
+ <!--
+ Note: how the "name" attributes on class, field and method configs can be regular expressions.
+ -->
+
+ <!--
+@XmlRootElement(namespace = "http://org.jboss.ws/provider", name = "user")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "UserType", propOrder = { "string", "qname" })
+public class UserType {}
+ -->
+
+ <!--
+ The type namespaces on the customerOrder are different from the rest of the message...
+ -->
+ <Class name="org.jboss.test.ws.jaxws.samples.jaxbintros.UserType">
+ <XmlAccessorType value="FIELD"/>
+ <XmlRootElement name="user" namespace="http://org.jboss.ws/provider"/>
+
+ <Field name="string">
+ <XmlAttribute />
+ </Field>
+ </Class>
+
+</jaxb-intros>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/samples/jaxbintros/META-INF/jaxb-intros.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 8 months
JBossWS SVN: r10862 - in stack/native/trunk: modules/core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:28:27 -0400 (Thu, 08 Oct 2009)
New Revision: 10862
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/core/src/main/resources/jbossws-native-config.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java
stack/native/trunk/pom.xml
Log:
[JBWS-2714] Using JAXBIntroDeploymentAspect from framework, removing direct dependency on jaxbintros and using the transitive one coming from jbossws-common, leveraging BindingCustomizationFactory of jaxbintros
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/core/pom.xml 2009-10-08 09:28:27 UTC (rev 10862)
@@ -154,10 +154,6 @@
<artifactId>mail</artifactId>
</dependency>
<dependency>
- <groupId>jboss.jaxbintros</groupId>
- <artifactId>jboss-jaxb-intros</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</dependency>
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java 2009-10-08 09:28:27 UTC (rev 10862)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxws;
-
-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 org.jboss.wsf.spi.binding.JAXBBindingCustomization
-{
- // 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;
-}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java 2009-10-08 09:28:27 UTC (rev 10862)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.jbws;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
-import org.jboss.jaxb.intros.IntroductionsConfigParser;
-import org.jboss.jaxb.intros.configmodel.JaxbIntros;
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.JAXBBindingCustomization;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.*;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- */
-public class JAXBIntroDeploymentAspect extends DeploymentAspect
-{
- private static Logger logger = Logger.getLogger(JAXBIntroDeploymentAspect.class);
- private static final String META_INF_JAXB_INTROS_XML = "META-INF/jaxb-intros.xml";
- private static final String WEB_INF_JAXB_INTROS_XML = "WEB-INF/jaxb-intros.xml";
-
- public void start(Deployment deployment)
- {
-
- // assert ArchiveDeployment
- if(! (deployment instanceof ArchiveDeployment) )
- {
- if (log.isDebugEnabled())
- log.debug("JAXBIntroDeploymentAspect doesn't work on " + deployment.getClass());
- return;
- }
-
- ArchiveDeployment archive = (ArchiveDeployment)deployment;
- InputStream introsConfigStream = null;
-
- try
- {
- // META-INF first
- UnifiedVirtualFile vfs = archive.getRootFile().findChild(META_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
- } catch (Exception e) {}
-
- if(null == introsConfigStream)
- {
- try
- {
- // WEB-INF second
- UnifiedVirtualFile vfs = archive.getRootFile().findChild(WEB_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
- } catch (Exception e) {
- return;
- }
- }
-
- try
- {
-
- if(introsConfigStream != null)
- {
- JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
- IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
- String defaultNamespace = jaxbIntros.getDefaultNamespace();
- BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
-
- jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
- if(defaultNamespace != null) {
- jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
- }
-
- // ServerEndpointMetaData#getBindingCustomization becomes the consumer later on
- for(Endpoint endpoint : deployment.getService().getEndpoints())
- {
- endpoint.addAttachment(BindingCustomization.class, jaxbCustomizations);
- }
-
- }
-
- }
- finally
- {
- if(introsConfigStream != null)
- {
- try {
- introsConfigStream.close();
- } catch (IOException e) {
- logger.error("[" + deployment.getService().getContextRoot() + "] Error closing JAXB Introductions Configurations stream ", e);
- }
- }
- }
- }
-}
Modified: stack/native/trunk/modules/core/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/jbossws-native-config.xml 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/core/src/main/resources/jbossws-native-config.xml 2009-10-08 09:28:27 UTC (rev 10862)
@@ -86,7 +86,7 @@
<property name="relativeOrder">22</property> <!-- [JBDEPLOY-201] workaround -->
</bean>
- <bean name="WSJAXBIntroDeploymentAspect" class="org.jboss.wsf.stack.jbws.JAXBIntroDeploymentAspect">
+ <bean name="WSJAXBIntroDeploymentAspect" class="org.jboss.wsf.framework.deployment.JAXBIntroDeploymentAspect">
<property name="provides">JAXBIntros</property>
<property name="relativeOrder">21</property> <!-- [JBDEPLOY-201] workaround -->
</bean>
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbcust/BindingCustomizationTestCase.java 2009-10-08 09:28:27 UTC (rev 10862)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -23,10 +23,10 @@
import junit.framework.TestCase;
-import org.jboss.ws.core.jaxws.JAXBBindingCustomization;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
@@ -50,8 +50,8 @@
public void testCustomizationWriteAccess() throws Exception
{
Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
- JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
- jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
+ BindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", "http://org.jboss.bindingCustomization");
endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
// a started endpoint should deny customizations
@@ -71,8 +71,8 @@
public void testCustomizationReadAccess() throws Exception
{
Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
- JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
- jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
+ BindingCustomization jaxbCustomization = new JAXBBindingCustomization();
+ jaxbCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", "http://org.jboss.bindingCustomization");
endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
endpoint.setState(EndpointState.STARTED);
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/AnnotationReaderTestCase.java 2009-10-08 09:28:27 UTC (rev 10862)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -23,7 +23,6 @@
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
-import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.JAXBContext;
@@ -31,15 +30,12 @@
import javax.xml.bind.Unmarshaller;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
-import org.jboss.jaxb.intros.IntroductionsConfigParser;
-import org.jboss.jaxb.intros.configmodel.JaxbIntros;
+import org.jboss.jaxb.intros.BindingCustomizationFactory;
import org.jboss.wsf.test.JBossWSTest;
-import com.sun.xml.bind.api.JAXBRIContext;
-
/**
* @author Heiko.Braun(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
*/
public class AnnotationReaderTestCase extends JBossWSTest
{
@@ -50,14 +46,9 @@
" <qname>The Frog</qname>" +
" </ns1:user>";
- JaxbIntros config = IntroductionsConfigParser.parseConfig(new FileInputStream(getResourceFile("jaxws/jaxbintros/WEB-INF/jaxb-intros.xml").getPath()));
-
- IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
- Map<String, Object> jaxbConfig = new HashMap<String, Object>();
-
- jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.ws/provider");
- jaxbConfig.put(JAXBRIContext.ANNOTATION_READER, reader);
-
+ Map<String, Object> jaxbConfig = BindingCustomizationFactory.getBindingCustomization(new FileInputStream(getResourceFile(
+ "jaxws/jaxbintros/WEB-INF/jaxb-intros.xml").getPath()), "http://org.jboss.ws/provider");
+
JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-10-08 09:26:12 UTC (rev 10861)
+++ stack/native/trunk/pom.xml 2009-10-08 09:28:27 UTC (rev 10862)
@@ -68,7 +68,6 @@
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.9</jaxb.impl.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
- <jboss.jaxbintros.version>1.0.0.GA</jboss.jaxbintros.version>
<jboss.logging.version>2.2.0.CR1</jboss.logging.version>
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
@@ -302,11 +301,6 @@
<version>${jaxb.impl.version}</version>
</dependency>
<dependency>
- <groupId>jboss.jaxbintros</groupId>
- <artifactId>jboss-jaxb-intros</artifactId>
- <version>${jboss.jaxbintros.version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.jaxr</groupId>
<artifactId>juddi-service</artifactId>
<version>${jboss.jaxr.version}</version>
14 years, 8 months
JBossWS SVN: r10861 - in stack/cxf/trunk: modules/client and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:26:12 -0400 (Thu, 08 Oct 2009)
New Revision: 10861
Removed:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
stack/cxf/trunk/pom.xml
Log:
[JBWS-2714] Using JAXBIntroDeploymentAspect from framework, removing direct jaxbintros dependency and using the transitive one from jbossws-common instead, leveraging BindingCustomizationFactory from jaxbintros
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/client/pom.xml 2009-10-08 09:26:12 UTC (rev 10861)
@@ -172,10 +172,6 @@
<artifactId>jboss-common-core</artifactId>
</dependency>
<dependency>
- <groupId>jboss.jaxbintros</groupId>
- <artifactId>jboss-jaxb-intros</artifactId>
- </dependency>
- <dependency>
<groupId>apache-log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
Deleted: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java 2009-10-08 09:26:12 UTC (rev 10861)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.client.configuration;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-public class JAXBBindingCustomization extends org.jboss.wsf.spi.binding.JAXBBindingCustomization
-{
- private static final long serialVersionUID = -5922902727331798457L;
-
- // 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;
-}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2009-10-08 09:26:12 UTC (rev 10861)
@@ -26,7 +26,6 @@
import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.jaxb.JAXBDataBinding;
-import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.jboss.wsf.spi.binding.BindingCustomization;
import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/server/pom.xml 2009-10-08 09:26:12 UTC (rev 10861)
@@ -177,10 +177,6 @@
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
- <groupId>jboss.jaxbintros</groupId>
- <artifactId>jboss-jaxb-intros</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jaxr</groupId>
<artifactId>juddi-service</artifactId>
<type>sar</type>
Deleted: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java 2009-10-08 09:26:12 UTC (rev 10861)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
-import org.jboss.jaxb.intros.IntroductionsConfigParser;
-import org.jboss.jaxb.intros.configmodel.JaxbIntros;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-/**
- * A CXF version of JAXBIntroDeploymentAspect, which installs JAXB Introduction
- * metadata into the deployment for later consumption. Despite being the same as the
- * Native one, this deployment aspect is not moved to jbossws-framework as it directly
- * depends on jaxb impl and we don't really want to enforce the same jaxb impl version
- * dependency on different stacks).
- *
- * @author Heiko.Braun(a)jboss.com
- * @author alessio.soldano(a)jboss.com
- */
-public class JAXBIntroDeploymentAspect extends DeploymentAspect
-{
- private static Logger logger = Logger.getLogger(JAXBIntroDeploymentAspect.class);
- private static final String META_INF_JAXB_INTROS_XML = "META-INF/jaxb-intros.xml";
- private static final String WEB_INF_JAXB_INTROS_XML = "WEB-INF/jaxb-intros.xml";
-
- public void start(Deployment deployment)
- {
- // assert ArchiveDeployment
- if(! (deployment instanceof ArchiveDeployment) )
- {
- if (log.isDebugEnabled())
- log.debug("JAXBIntroDeploymentAspect doesn't work on " + deployment.getClass());
- return;
- }
-
- ArchiveDeployment archive = (ArchiveDeployment)deployment;
- InputStream introsConfigStream = null;
-
- try
- {
- // META-INF first
- UnifiedVirtualFile vfs = archive.getRootFile().findChild(META_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
- } catch (Exception e) {}
-
- if(null == introsConfigStream)
- {
- try
- {
- // WEB-INF second
- UnifiedVirtualFile vfs = archive.getRootFile().findChild(WEB_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
- } catch (Exception e) {
- return;
- }
- }
-
- try
- {
-
- if(introsConfigStream != null)
- {
- JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
- IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
- String defaultNamespace = jaxbIntros.getDefaultNamespace();
- BindingCustomization jaxbCustomizations = new org.jboss.wsf.stack.cxf.client.configuration.JAXBBindingCustomization();
-
- jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
- if(defaultNamespace != null) {
- jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
- }
-
- // JBossWSBeanConfigurer#configureService becomes the consumer later on
- for(Endpoint endpoint : deployment.getService().getEndpoints())
- {
- endpoint.addAttachment(BindingCustomization.class, jaxbCustomizations);
- }
-
- }
-
- }
- finally
- {
- if(introsConfigStream != null)
- {
- try {
- introsConfigStream.close();
- } catch (IOException e) {
- logger.error("[" + deployment.getService().getContextRoot() + "] Error closing JAXB Introductions Configurations stream ", e);
- }
- }
- }
- }
-}
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config.xml
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config.xml 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config.xml 2009-10-08 09:26:12 UTC (rev 10861)
@@ -65,7 +65,7 @@
</property>
</bean>
- <bean name="WSCXFJAXBIntroDeploymentAspect" class="org.jboss.wsf.stack.cxf.JAXBIntroDeploymentAspect">
+ <bean name="WSCXFJAXBIntroDeploymentAspect" class="org.jboss.wsf.framework.deployment.JAXBIntroDeploymentAspect">
<property name="provides">JAXBIntros</property>
<property name="relativeOrder">20</property> <!-- [JBDEPLOY-201] workaround -->
</bean>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2009-10-08 09:26:12 UTC (rev 10861)
@@ -32,19 +32,15 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.configuration.Configurer;
-import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
-import org.jboss.jaxb.intros.IntroductionsConfigParser;
-import org.jboss.jaxb.intros.configmodel.JaxbIntros;
+import org.jboss.jaxb.intros.BindingCustomizationFactory;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.stack.cxf.client.configuration.JAXBBindingCustomization;
+import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.w3c.dom.Element;
-import com.sun.xml.bind.api.JAXBRIContext;
-
/**
* Test the JAXBIntroduction features.
*
@@ -123,7 +119,6 @@
URL wsdlURL = new URL(endpointAddress + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/cxf/jaxbintros", "EndpointBeanService");
- //setBindingCustomizationOnClientSide();
Service service = Service.create(wsdlURL, serviceName);
AnnotatedUserEndpoint port = service.getPort(AnnotatedUserEndpoint.class);
AnnotatedUserType user = new AnnotatedUserType();
@@ -142,15 +137,8 @@
*/
private void setBindingCustomizationOnClientSide() throws Exception
{
- JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(getResourceURL("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").openStream());
- IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
- String defaultNamespace = jaxbIntros.getDefaultNamespace();
BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
-
- jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
- if(defaultNamespace != null) {
- jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
- }
+ BindingCustomizationFactory.populateBindingCustomization(getResourceURL("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").openStream(), jaxbCustomizations);
bus = BusFactory.getThreadDefaultBus();
originalConfigurer = bus.getExtension(Configurer.class);
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-10-08 09:23:42 UTC (rev 10860)
+++ stack/cxf/trunk/pom.xml 2009-10-08 09:26:12 UTC (rev 10861)
@@ -62,7 +62,6 @@
<cxf.asm.version>2.2.3</cxf.asm.version>
<fastinfoset.api.version>1.2.7</fastinfoset.api.version>
<jboss.common.core.version>2.2.14.GA</jboss.common.core.version>
- <jboss.jaxbintros.version>1.0.0.GA</jboss.jaxbintros.version>
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.12</jaxb.impl.version>
<jaxrpc.api.version>1.1</jaxrpc.api.version>
@@ -391,11 +390,6 @@
<version>${jaxb.impl.version}</version>
</dependency>
<dependency>
- <groupId>jboss.jaxbintros</groupId>
- <artifactId>jboss-jaxb-intros</artifactId>
- <version>${jboss.jaxbintros.version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.jaxr</groupId>
<artifactId>juddi-service</artifactId>
<version>${jboss.jaxr.version}</version>
14 years, 8 months
JBossWS SVN: r10860 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:23:42 -0400 (Thu, 08 Oct 2009)
New Revision: 10860
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java
Log:
[JBWS-2714] Moving JAXBIntroDeploymentAspect to framework
Added: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java 2009-10-08 09:23:42 UTC (rev 10860)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.deployment;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.jboss.jaxb.intros.BindingCustomizationFactory;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+
+/**
+ * Installs jaxbintro binding customization into the deployment
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
+ */
+public class JAXBIntroDeploymentAspect extends DeploymentAspect
+{
+ private static Logger logger = Logger.getLogger(JAXBIntroDeploymentAspect.class);
+ private static final String META_INF_JAXB_INTROS_XML = "META-INF/jaxb-intros.xml";
+ private static final String WEB_INF_JAXB_INTROS_XML = "WEB-INF/jaxb-intros.xml";
+
+ public void start(Deployment deployment)
+ {
+ // assert ArchiveDeployment
+ if(! (deployment instanceof ArchiveDeployment) )
+ {
+ if (log.isDebugEnabled())
+ log.debug("JAXBIntroDeploymentAspect doesn't work on " + deployment.getClass());
+ return;
+ }
+
+ ArchiveDeployment archive = (ArchiveDeployment)deployment;
+ InputStream introsConfigStream = null;
+
+ try
+ {
+ // META-INF first
+ UnifiedVirtualFile vfs = archive.getRootFile().findChild(META_INF_JAXB_INTROS_XML);
+ introsConfigStream = vfs.toURL().openStream();
+ } catch (Exception e) {}
+
+ if(null == introsConfigStream)
+ {
+ try
+ {
+ // WEB-INF second
+ UnifiedVirtualFile vfs = archive.getRootFile().findChild(WEB_INF_JAXB_INTROS_XML);
+ introsConfigStream = vfs.toURL().openStream();
+ } catch (Exception e) {
+ return;
+ }
+ }
+
+ try
+ {
+
+ if(introsConfigStream != null)
+ {
+ BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
+ BindingCustomizationFactory.populateBindingCustomization(introsConfigStream, jaxbCustomizations);
+
+ // JBossWSBeanConfigurer#configureService becomes the consumer later on
+ for(Endpoint endpoint : deployment.getService().getEndpoints())
+ {
+ endpoint.addAttachment(BindingCustomization.class, jaxbCustomizations);
+ }
+
+ }
+
+ }
+ finally
+ {
+ if(introsConfigStream != null)
+ {
+ try {
+ introsConfigStream.close();
+ } catch (IOException e) {
+ logger.error("[" + deployment.getService().getContextRoot() + "] Error closing JAXB Introductions Configurations stream ", e);
+ }
+ }
+ }
+ }
+}
Property changes on: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/JAXBIntroDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 8 months
JBossWS SVN: r10859 - common/trunk/src/main/java/org/jboss/ws/tools/ant.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:22:13 -0400 (Thu, 08 Oct 2009)
New Revision: 10859
Modified:
common/trunk/src/main/java/org/jboss/ws/tools/ant/EclipseClasspathTask.java
Log:
Bug fix
Modified: common/trunk/src/main/java/org/jboss/ws/tools/ant/EclipseClasspathTask.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/tools/ant/EclipseClasspathTask.java 2009-10-08 09:21:45 UTC (rev 10858)
+++ common/trunk/src/main/java/org/jboss/ws/tools/ant/EclipseClasspathTask.java 2009-10-08 09:22:13 UTC (rev 10859)
@@ -130,7 +130,7 @@
String str;
while ((str = in.readLine()) != null)
{
- if (str.length() > 0 & !str.startsWith("#"))
+ if (str.length() > 0 && !str.startsWith("#"))
excludes.add(str);
}
}
14 years, 8 months