JBossWS SVN: r16085 - stack/native/trunk/modules/testsuite/src/test/resources/jboss712.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-04 01:19:59 -0400 (Wed, 04 Apr 2012)
New Revision: 16085
Modified:
stack/native/trunk/modules/testsuite/src/test/resources/jboss712/appclient-ws.xml
Log:
upgrade config version
Modified: stack/native/trunk/modules/testsuite/src/test/resources/jboss712/appclient-ws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/src/test/resources/jboss712/appclient-ws.xml 2012-04-03 13:02:57 UTC (rev 16084)
+++ stack/native/trunk/modules/testsuite/src/test/resources/jboss712/appclient-ws.xml 2012-04-04 05:19:59 UTC (rev 16085)
@@ -20,7 +20,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<server xmlns="urn:jboss:domain:1.2">
+<server xmlns="urn:jboss:domain:1.3">
<extensions>
<extension module="org.jboss.as.connector"/>
12 years, 9 months
JBossWS SVN: r16084 - in stack/cxf/trunk/modules/testsuite/cxf-tests: scripts and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-03 09:02:57 -0400 (Tue, 03 Apr 2012)
New Revision: 16084
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Endpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Foo.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Helper.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/my-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/spring-dd.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3478] Adding testcase for checking jbossws-cxf functionalities when Spring is available in user app
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2012-04-03 11:31:39 UTC (rev 16083)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2012-04-03 13:02:57 UTC (rev 16084)
@@ -14,6 +14,12 @@
<relativePath>../pom.xml</relativePath>
</parent>
+ <properties>
+ <!-- This is used for test archives embedding Spring and is intentionally different from the
+ version specified in the jbossws-cxf main pom.xml to test there're no classloading clashes -->
+ <test.spring.version>3.0.3.RELEASE</test.spring.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
@@ -97,6 +103,49 @@
</execution>
</executions>
</plugin>
+ <plugin> <!-- This downloads and copies some Spring libs into target/spring to be later picked up and included in some test jars -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-spring</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-asm</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${test.spring.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>target/spring</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-03 11:31:39 UTC (rev 16083)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-03 13:02:57 UTC (rev 16084)
@@ -225,6 +225,31 @@
</webinf>
</war>
+ <!-- jaxws-cxf-spring -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-spring.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/spring/Endpoint*.class"/>
+ </classes>
+ </war>
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-spring-client.war" needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/spring/Helper*.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/spring/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/spring/Foo.class"/>
+ <include name="org/jboss/wsf/test/TestServlet.class"/>
+ <include name="org/jboss/wsf/test/ClientHelper.class"/>
+ </classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/spring/"
+ prefix="WEB-INF/classes/"/>
+ <zipfileset
+ dir="${tests.output.dir}/spring/"
+ prefix="WEB-INF/lib/"/>
+ <manifest>
+ <attribute name="Dependencies" value="org.jboss.ws.cxf.jbossws-cxf-client services"/>
+ </manifest>
+ </war>
+
<!-- saaj-soap-connection -->
<war
warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.spring;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * An application embedding Spring jars acts as a client to an existing WS endpoint.
+ * This testcase verifies the spring availability in the app does not badly affect ws functionalities.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 02-Apr-2012
+ */
+public final class ClientSpringAppTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(ClientSpringAppTestCase.class, "jaxws-cxf-spring-client.war, jaxws-cxf-spring.war");
+ }
+
+ public void testSpringAvailability() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testSpringAvailability", Helper.class.getName()));
+ }
+
+ public void testJBossWSCXFBus() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testJBossWSCXFBus", Helper.class.getName()));
+ }
+
+ public void testJBossWSCXFSpringBus() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testJBossWSCXFSpringBus", Helper.class.getName()));
+ }
+
+ public void testJAXWSClient() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testJAXWSClient", Helper.class.getName()));
+ }
+
+ public void testSpringFunctionalities() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testSpringFunctionalities", Helper.class.getName()));
+ }
+
+ private String runTestInContainer(String test, String helper) throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-spring-client?path=/jaxws-cxf-spring&method="
+ + test + "&helper=" + helper);
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ return br.readLine();
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Endpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Endpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Endpoint.java 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.spring;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/spring")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint
+{
+ public String echo(final String message);
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/EndpointImpl.java 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.spring;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.servlet.annotation.WebServlet;
+
+@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/spring", endpointInterface = "org.jboss.test.ws.jaxws.cxf.spring.Endpoint")
+@WebServlet(name = "WSServlet", urlPatterns = "/*")
+public class EndpointImpl implements Endpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Foo.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Foo.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Foo.java 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.spring;
+
+public class Foo
+{
+
+ private String message;
+
+ public Foo()
+ {
+
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Helper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Helper.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/Helper.java 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,242 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.spring;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.configuration.Configurer;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
+import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
+import org.jboss.wsf.test.ClientHelper;
+
+/**
+ * Helper for performing various checks on Spring effects over the JBossWS-CXF integration when available in user applications.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 02-Apr-2012
+ *
+ */
+public class Helper implements ClientHelper
+{
+ private String targetEndpoint;
+ private final boolean springInAS = SpringUtils.isSpringAvailable(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
+
+ @Override
+ public void setTargetEndpoint(String address)
+ {
+ targetEndpoint = address;
+ }
+
+ /**
+ * Verify the web app classloader 'sees' Spring (i.e. Spring jars are in the web app)
+ *
+ * @return
+ */
+ public boolean testSpringAvailability()
+ {
+ return SpringUtils.isSpringAvailable(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Verify the BusFactory.newInstance() still return the JBossWS-CXF version of BusFactory
+ * (the web app has a dependency on jbossws-cxf-client) and that still create a plain bus
+ * version, without being fooled by the Spring availability in the TCCL when Spring is not
+ * installed in the AS.
+ *
+ * @return
+ */
+ public boolean testJBossWSCXFBus()
+ {
+ BusFactory factory = BusFactory.newInstance();
+ if (!(factory instanceof JBossWSBusFactory))
+ {
+ throw new RuntimeException("Expected JBossWSBusFactory");
+ }
+ Bus bus = null;
+ try
+ {
+ if (springInAS) {
+ bus = factory.createBus();
+ //the created bus should not be a SpringBus, as there's no spring descriptor involved
+ return !isSpringBus(bus);
+ }
+ else
+ {
+ //set Configurer.USER_CFG_FILE_PROPERTY_NAME so that if the SpringBusFactory is
+ //internally erroneously used, that won't fallback delegating to the non Spring
+ //one, which would shade the issue
+ final String prop = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+ try
+ {
+ System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME, "unexistentfile.xml");
+ bus = factory.createBus();
+ //the created bus should not be a SpringBus, as the classloader for CXF has no visibility over the deployment spring jars
+ return !isSpringBus(bus);
+ }
+ finally
+ {
+ if (prop == null)
+ {
+ System.clearProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+ }
+ else
+ {
+ System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME, prop);
+ }
+ }
+ }
+ }
+ finally
+ {
+ if (bus != null)
+ {
+ bus.shutdown(true);
+ }
+ }
+ }
+
+ /**
+ * Verify a Spring version of the Bus is created when actually required
+ * and Spring is installed on the AS (the creation process is expected
+ * to fail if Spring is not installed on the AS)
+ *
+ * @return
+ */
+ public boolean testJBossWSCXFSpringBus()
+ {
+ File f = copy(Thread.currentThread().getContextClassLoader().getResourceAsStream("my-cxf.xml"));
+ BusFactory factory = BusFactory.newInstance();
+ if (!(factory instanceof JBossWSBusFactory))
+ {
+ throw new RuntimeException("Expected JBossWSBusFactory");
+ }
+ Bus bus = null;
+ try
+ {
+ bus = ((JBossWSBusFactory) factory).createBus(f.getAbsolutePath());
+ //check the created Bus is a SpringBus and we have Spring installed on AS (if it's not installed, this *must* fail)
+ return springInAS && isSpringBus(bus);
+ }
+ catch (Throwable t)
+ {
+ if (!springInAS && (t instanceof NoClassDefFoundError) && t.getMessage().contains("org/springframework"))
+ {
+ //Spring is not installed on AS, so the SpringBus can't be created - fine
+ return true;
+ }
+ else
+ {
+ throw new RuntimeException(t);
+ }
+ }
+ finally
+ {
+ if (bus != null)
+ {
+ bus.shutdown(true);
+ }
+ if (f != null) {
+ f.delete();
+ }
+ }
+ }
+
+ /**
+ * Verify a JAXWS client can be properly created and used to invoke a ws endpoint
+ *
+ * @return
+ * @throws Exception
+ */
+ public boolean testJAXWSClient() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try
+ {
+ BusFactory.setThreadDefaultBus(bus);
+
+ URL wsdlURL = new URL(targetEndpoint + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/spring", "EndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint) service.getPort(Endpoint.class);
+ return "Hello".equals(port.echo("Hello"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ }
+
+ private static boolean isSpringBus(Bus bus) {
+ //avoid compile/runtime Spring dependency for the check only
+ return "org.apache.cxf.bus.spring.SpringBus".equals(bus.getClass().getName());
+ }
+
+ private static File copy(InputStream inputStream)
+ {
+ try
+ {
+ File f = File.createTempFile("jbws-cxf-testsuite", ".xml");
+ OutputStream out = new FileOutputStream(f);
+ byte buf[] = new byte[1024];
+ int len;
+ while ((len = inputStream.read(buf)) > 0)
+ {
+ out.write(buf, 0, len);
+ }
+ out.close();
+ inputStream.close();
+ return f;
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public boolean testSpringFunctionalities() throws Exception
+ {
+ //use reflection to avoid compile Spring dependency (this test is to be run within the non-spring testsuite too,
+ //the Spring classes are coming from the jars included in the app on server side)
+ URL url = Thread.currentThread().getContextClassLoader().getResource("spring-dd.xml");
+ Class<?> cpXmlAppCtxClass = Class.forName("org.springframework.context.support.ClassPathXmlApplicationContext");
+ Constructor<?> cons = cpXmlAppCtxClass.getConstructor(String.class);
+ Object applicationContext = cons.newInstance(url.toString());
+ Class<?> appCtxClass = applicationContext.getClass();
+ Method m = appCtxClass.getMethod("getBean", String.class, Class.class);
+ Foo foo = (Foo)m.invoke(applicationContext, "foo", Foo.class);
+ return "Bar".equals(foo.getMessage());
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/my-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/my-cxf.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/my-cxf.xml 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+ <cxf:bus/>
+</beans>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/spring-dd.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/spring-dd.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/spring/spring-dd.xml 2012-04-03 13:02:57 UTC (rev 16084)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean id="foo" class="org.jboss.test.ws.jaxws.cxf.spring.Foo">
+ <property name="message" value="Bar" />
+ </bean>
+</beans>
12 years, 9 months
JBossWS SVN: r16083 - in stack/native/trunk: modules/core and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-03 07:31:39 -0400 (Tue, 03 Apr 2012)
New Revision: 16083
Removed:
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/apache/
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/codehaus/
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jvnet/
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/trunk/pom.xml
Log:
[JBWS-3474] removing apache ant & org.jvnet dependencies
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2012-04-03 09:52:44 UTC (rev 16082)
+++ stack/native/trunk/modules/core/pom.xml 2012-04-03 11:31:39 UTC (rev 16083)
@@ -44,11 +44,6 @@
</dependency>
<!-- provided apis -->
<dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
Modified: stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-03 09:52:44 UTC (rev 16082)
+++ stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-03 11:31:39 UTC (rev 16083)
@@ -40,7 +40,6 @@
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
<include>javax.xml.stream:stax-api:jar</include>
- <include>org.jvnet.staxex:stax-ex:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>org.jboss.netty:netty:jar</include>
<include>commons-beanutils:commons-beanutils:jar</include>
Modified: stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-03 09:52:44 UTC (rev 16082)
+++ stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-03 11:31:39 UTC (rev 16083)
@@ -60,16 +60,6 @@
<include name="**/jbossxb.jar"/>
</fileset>
</copy>
- <copy todir="@{targetdir}/org/jvnet/staxex/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/stax-ex.jar"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/org/apache/commons/beanutils/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/commons-beanutils.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/jboss/ws/common/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-common.jar"/>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2012-04-03 09:52:44 UTC (rev 16082)
+++ stack/native/trunk/pom.xml 2012-04-03 11:31:39 UTC (rev 16083)
@@ -66,7 +66,6 @@
<jboss711.version>7.1.1.Final</jboss711.version>
<jboss712.version>7.1.2.Final-SNAPSHOT</jboss712.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
- <ant.version>1.7.1</ant.version>
<commons.logging.version>1.1.1</commons.logging.version>
<javassist.version>3.15.0-GA</javassist.version>
<jaxws.api.version>2.0.0.Final</jaxws.api.version>
@@ -126,12 +125,6 @@
</dependency>
<!-- provided apis -->
<dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>${ant.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
12 years, 9 months
JBossWS SVN: r16082 - in stack/native/trunk: modules/core and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-03 05:52:44 -0400 (Tue, 03 Apr 2012)
New Revision: 16082
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessor.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactoryCreator.java
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/com/
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/jaxws-client/
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/tools/
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/as/webservices/server/integration/main/module.xml
stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/native/jbossws-native-core/main/module.xml
stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/trunk/modules/testsuite/pom.xml
stack/native/trunk/pom.xml
Log:
[JBWS-3474] removing jaxb & sun tools dependencies
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/pom.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -93,30 +93,10 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-xjc</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-rt</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-tools</artifactId>
- </dependency>
- <dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.spec.javax.xml.bind</groupId>
- <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
- </dependency>
- <dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -131,7 +131,6 @@
if (desFactory == null)
throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_DESERIALIZER_FACTORY", xmlType));
- // Try jaxb deserialization
try
{
// http://jira.jboss.org/jira/browse/JBWS-955
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessor.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessor.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessor.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -1,71 +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.metadata.accessor;
-
-import org.jboss.ws.WSException;
-
-import com.sun.xml.bind.api.AccessorException;
-import com.sun.xml.bind.api.RawAccessor;
-
-/**
- * A JAXB object accessor.
- *
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- */
-@SuppressWarnings("unchecked")
-public class JAXBAccessor implements Accessor
-{
- private RawAccessor accessor;
-
- JAXBAccessor(RawAccessor accessor)
- {
- this.accessor = accessor;
- }
-
- public Object get(Object bean)
- {
- try
- {
- return accessor.get(bean);
- }
- catch (AccessorException a)
- {
- WSException ex = new WSException(a.getMessage());
- ex.setStackTrace(a.getStackTrace());
- throw ex;
- }
- }
-
- public void set(Object bean, Object value)
- {
- try
- {
- accessor.set(bean, value);
- }
- catch (AccessorException a)
- {
- WSException ex = new WSException(a.getMessage());
- ex.setStackTrace(a.getStackTrace());
- throw ex;
- }
- }
-}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactory.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactory.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -1,71 +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.metadata.accessor;
-
-import java.util.ResourceBundle;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.metadata.umdm.WrappedParameter;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-import com.sun.xml.bind.api.RawAccessor;
-
-final class JAXBAccessorFactory implements AccessorFactory
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXBAccessorFactory.class);
- private final Class clazz;
- private final JAXBRIContext ctx;
-
- JAXBAccessorFactory(Class clazz, JAXBRIContext ctx)
- {
- this.clazz = clazz;
- this.ctx = ctx;
- }
-
- public Accessor create(WrappedParameter parameter)
- {
- RawAccessor<Object, Object> accessor;
- try
- {
- QName name = parameter.getName();
- accessor = ctx.getElementPropertyAccessor(
- clazz,
- name.getNamespaceURI().intern(), // JAXB internally optimizes String usage towards intern()
- name.getLocalPart().intern() // see com.sun.xml.bind.v2.util.QNameMap;
- );
- }
- catch (Throwable t)
- {
- WSException ex = new WSException(t.getMessage());
- ex.setStackTrace(t.getStackTrace());
- throw ex;
- }
-
- if (accessor == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "COULD_NOT_OBTAIN_ACCESSOR", parameter));
-
- return new JAXBAccessor(accessor);
- }
-}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactoryCreator.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactoryCreator.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/JAXBAccessorFactoryCreator.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -1,55 +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.metadata.accessor;
-
-import java.util.ResourceBundle;
-
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.metadata.umdm.FaultMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-public class JAXBAccessorFactoryCreator implements AccessorFactoryCreator
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXBAccessorFactoryCreator.class);
- private JAXBRIContext ctx;
-
- public void setJAXBContext(JAXBRIContext ctx)
- {
- this.ctx = ctx;
- }
-
- public AccessorFactory create(ParameterMetaData parameter)
- {
- if (ctx == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "JAXBCONTEXT_NOT_AVAILABLE"));
- return new JAXBAccessorFactory(parameter.getJavaType(), ctx);
- }
-
- public AccessorFactory create(FaultMetaData fault)
- {
- if (ctx == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "JAXBCONTEXT_NOT_AVAILABLE"));
- return new JAXBAccessorFactory(fault.getFaultBean(), ctx);
- }
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -27,7 +27,6 @@
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;
@@ -58,7 +57,6 @@
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.metadata.accessor.AccessorFactory;
import org.jboss.ws.metadata.accessor.AccessorFactoryCreator;
-import org.jboss.ws.metadata.accessor.JAXBAccessorFactoryCreator;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
@@ -118,8 +116,6 @@
private List<OperationMetaData> operations = new ArrayList<OperationMetaData>();
// Maps the java method to the operation meta data
private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method, OperationMetaData>();
- // All of the registered types
- private List<Class> registeredTypes = new ArrayList<Class>();
// The features defined for this endpoint
private FeatureSet features = new FeatureSet();
@@ -527,7 +523,6 @@
{
TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
List<TypeMappingMetaData> typeMappings = serviceMetaData.getTypesMetaData().getTypeMappings();
- registeredTypes = new ArrayList<Class>(typeMappings.size());
for (TypeMappingMetaData tmMetaData : typeMappings)
{
String javaTypeName = tmMetaData.getJavaTypeName();
@@ -536,45 +531,27 @@
{
List<Class> types = typeMapping.getJavaTypes(xmlType);
- // TODO: Clarification. In which cases is the type already registered?
- boolean registered = false;
- for (Class current : types)
+ try
{
- if (current.getName().equals(javaTypeName))
- {
- registeredTypes.add(current);
- registered = true;
- break;
- }
- }
+ ClassLoader classLoader = getClassLoader();
+ Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
- if (registered == false)
- {
- try
- {
- ClassLoader classLoader = getClassLoader();
- Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
+ if (JavaUtils.isPrimitive(javaTypeName))
+ javaType = JavaUtils.getWrapperType(javaType);
- if (JavaUtils.isPrimitive(javaTypeName))
- javaType = JavaUtils.getWrapperType(javaType);
-
- // Needed for runtime JAXB context
- registeredTypes.add(javaType);
-
- if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
- {
- typeMapping.register(javaType, xmlType, new SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
- }
- else
- {
- typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
- }
+ if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
+ {
+ typeMapping.register(javaType, xmlType, new SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
}
- catch (ClassNotFoundException e)
+ else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_LOAD_CLASS", new Object[]{ xmlType, javaTypeName}));
+ typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
}
}
+ catch (ClassNotFoundException e)
+ {
+ log.warn(BundleUtils.getMessage(bundle, "CANNOT_LOAD_CLASS", new Object[]{ xmlType, javaTypeName}));
+ }
}
}
}
@@ -582,26 +559,17 @@
private void eagerInitializeAccessors()
{
// Collect the list of all used types
- boolean useJAXBAccessorFactory = false;
List<Class> types = new ArrayList<Class>();
for (OperationMetaData opMetaData : operations)
{
for (ParameterMetaData paramMetaData : opMetaData.getParameters())
{
- AccessorFactoryCreator factoryCreator = paramMetaData.getAccessorFactoryCreator();
- if (factoryCreator instanceof JAXBAccessorFactoryCreator)
- useJAXBAccessorFactory = true;
-
types.add(paramMetaData.getJavaType());
}
ParameterMetaData retParam = opMetaData.getReturnParameter();
if (retParam != null)
{
- AccessorFactoryCreator factoryCreator = retParam.getAccessorFactoryCreator();
- if (factoryCreator instanceof JAXBAccessorFactoryCreator)
- useJAXBAccessorFactory = true;
-
types.add(retParam.getJavaType());
}
}
@@ -762,11 +730,6 @@
toInitialise.configHandlerMetaData();
}
- public List<Class> getRegisteredTypes()
- {
- return Collections.unmodifiableList(registeredTypes);
- }
-
class ConfigObservable extends Observable
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03 09:52:44 UTC (rev 16082)
@@ -27,8 +27,6 @@
import java.util.Arrays;
import java.util.ResourceBundle;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceException;
@@ -36,9 +34,6 @@
import org.jboss.ws.WSException;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
-import org.jboss.ws.metadata.accessor.AccessorFactory;
-import org.jboss.ws.metadata.accessor.ReflectiveFieldAccessorFactoryCreator;
-import org.jboss.ws.metadata.accessor.ReflectiveMethodAccessorFactoryCreator;
/**
* A Fault component describes a fault that a given operation supports.
@@ -211,17 +206,7 @@
if (JavaUtils.isAssignableFrom(Exception.class, javaType) == false)
throw new WSException(BundleUtils.getMessage(bundle, "FAULT_JAVA_TYPE_NOT_EXCEPTION", javaTypeName));
}
- private AccessorFactory getAccessorFactory(Class faultBean)
- {
- // This should catch all cases due to the constraints that JAX-WS puts on the fault bean
- // However, if issues arrise then switch this to a full jaxb reflection library
- XmlAccessorType type = (XmlAccessorType)faultBean.getAnnotation(XmlAccessorType.class);
- if (type != null && type.value() == XmlAccessType.FIELD)
- return new ReflectiveFieldAccessorFactoryCreator().create(this);
- return new ReflectiveMethodAccessorFactoryCreator().create(this);
- }
-
public Object toFaultBean(Exception serviceException)
{
Object faultBeanInstance;
Modified: stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -36,17 +36,11 @@
<include>org.jboss.ws.native:jbossws-native-services:jar</include>
<include>org.jboss.ws.native:jbossws-native-core</include>
<include>javax.jws:jsr181-api:jar</include>
- <include>com.sun.xml.bind:jaxb-impl:jar</include>
- <include>com.sun.xml.bind:jaxb-xjc:jar</include>
- <include>com.sun.xml.ws:jaxws-tools:jar</include>
- <include>com.sun.xml.ws:jaxws-rt:jar</include>
<include>org.jboss.ws:jbossws-api:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
- <include>com.sun.xml.ws:policy:jar</include>
<include>javax.xml.stream:stax-api:jar</include>
<include>org.jvnet.staxex:stax-ex:jar</include>
- <include>com.sun.xml.stream.buffer:streambuffer:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>org.jboss.netty:netty:jar</include>
<include>commons-beanutils:commons-beanutils:jar</include>
@@ -110,21 +104,9 @@
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
-
<dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
- <outputFileNameMapping>jaxb-api.jar</outputFileNameMapping>
- <includes>
- <include>org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar</include>
- </includes>
- <useProjectArtifact>false</useProjectArtifact>
- </dependencySet>
-
-
- <dependencySet>
- <outputDirectory>deploy-artifacts/lib</outputDirectory>
- <unpack>false</unpack>
<outputFileNameMapping>jaxws-api.jar</outputFileNameMapping>
<includes>
<include>org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar</include>
Modified: stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/as/webservices/server/integration/main/module.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/as/webservices/server/integration/main/module.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/as/webservices/server/integration/main/module.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -32,12 +32,9 @@
<module name="javax.jws.api" export="true"/>
<module name="javax.wsdl4j.api" export="true"/>
<module name="javax.xml.ws.api" export="true"/>
- <module name="com.sun.xml.bind" services="export" export="true"/>
- <module name="com.sun.tools.javac" export="true"/>
<module name="org.jboss.ws.api" export="true"/>
<module name="org.jboss.ws.spi" export="true"/>
<module name="org.jboss.ws.common" services="import" export="true"/>
- <module name="org.jboss.ws.jaxws-client" services="export" export="true"/>
<module name="org.jboss.ws.native.jbossws-native-factories" services="export" export="true"/>
<module name="org.jboss.ws.native.jbossws-native-core" services="export" export="true">
<imports>
Modified: stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/native/jbossws-native-core/main/module.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/native/jbossws-native-core/main/module.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/native/jbossws-native-core/main/module.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -29,14 +29,11 @@
</resources>
<dependencies>
- <module name="com.sun.tools.ws" services="import" optional="true"/>
- <module name="com.sun.xml.bind" services="import"/>
<module name="javax.api" />
<module name="javax.servlet.api" />
<module name="javax.jws.api" />
<module name="javax.mail.api" />
<module name="javax.wsdl4j.api" />
- <module name="javax.xml.bind.api" />
<module name="javax.xml.stream.api" />
<module name="javax.xml.rpc.api" />
<module name="javax.xml.ws.api" />
Modified: stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -60,26 +60,6 @@
<include name="**/jbossxb.jar"/>
</fileset>
</copy>
- <copy todir="@{targetdir}/com/sun/tools/ws/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jaxws-tools.jar"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/com/sun/xml/stream/buffer/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/streambuffer.jar"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/com/sun/xml/ws/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jaxws-rt.jar"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/com/sun/xml/ws/policy/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/policy.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/jvnet/staxex/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/stax-ex.jar"/>
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -57,13 +57,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.5.0</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
@@ -128,42 +121,6 @@
</testResource>
</testResources>
<plugins>
- <plugin> <!-- This copies jboss-jaxws-api_2.2_spec & jboss-jaxb-api_2.2_spec jars to endorsed dir before the integration-tests are run -->
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.spec.javax.xml.ws</groupId>
- <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.spec.javax.xml.bind</groupId>
- <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin> <!-- This copies jbossws-native-factories jar to endorsed dir before the integration-tests are run -->
<artifactId>maven-resources-plugin</artifactId>
<executions>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2012-04-03 08:54:31 UTC (rev 16081)
+++ stack/native/trunk/pom.xml 2012-04-03 09:52:44 UTC (rev 16082)
@@ -73,13 +73,9 @@
<jaxrpc.api.version>1.0.0.Final</jaxrpc.api.version>
<saaj.api.version>1.0.1.Final</saaj.api.version>
<jsr181.api.version>1.0-MR1</jsr181.api.version>
- <jaxb.api.version>1.0.3.Final</jaxb.api.version>
- <jaxb.impl.version>2.2.4</jaxb.impl.version>
<jboss.common.core.version>2.2.16.GA</jboss.common.core.version>
<jboss.logging.version>3.1.0.GA</jboss.logging.version>
<netty.version>3.2.6.Final</netty.version>
- <sun.jaxws.version>2.2</sun.jaxws.version>
- <sun.policy.version>2.0-b01</sun.policy.version>
<stax.api.version>1.0-2</stax.api.version>
<woodstox.version>3.2.6</woodstox.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
@@ -185,87 +181,6 @@
<version>${commons.logging.version}</version>
</dependency>
<dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>policy</artifactId>
- <version>${sun.policy.version}</version>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.txw2</groupId>
- <artifactId>txw2</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.istack</groupId>
- <artifactId>istack-commons-runtime</artifactId>
- </exclusion>
- <exclusion>
- <groupId>woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-tools</artifactId>
- <version>${sun.jaxws.version}</version>
- <exclusions>
- <exclusion>
- <groupId>com.sun.xml.stream</groupId>
- <artifactId>sjsxp</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.ws</groupId>
- <artifactId>jaxws-rt</artifactId>
- <version>${sun.jaxws.version}</version>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.ws</groupId>
- <artifactId>jaxws-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.messaging.saaj</groupId>
- <artifactId>saaj-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.stream</groupId>
- <artifactId>sjsxp</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.stream</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jvnet</groupId>
- <artifactId>mimepull</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.glassfish.gmbal</groupId>
- <artifactId>gmbal-api-only</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>javax.jws</groupId>
<artifactId>jsr181-api</artifactId>
<version>${jsr181.api.version}</version>
@@ -291,21 +206,6 @@
<version>${saaj.api.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.spec.javax.xml.bind</groupId>
- <artifactId>jboss-jaxb-api_2.2_spec</artifactId>
- <version>${jaxb.api.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>${jaxb.impl.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-xjc</artifactId>
- <version>${jaxb.impl.version}</version>
- </dependency>
- <dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>${stax.api.version}</version>
12 years, 9 months
JBossWS SVN: r16081 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/core/binding and 17 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-03 04:54:31 -0400 (Tue, 03 Apr 2012)
New Revision: 16081
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
Log:
[JBWS-3474] removing jaxws native packages
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -24,18 +24,13 @@
import java.util.Observable;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC;
import org.jboss.ws.core.jaxrpc.SOAP12BindingJAXRPC;
-import org.jboss.ws.core.jaxws.binding.HTTPBindingJAXWS;
-import org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS;
-import org.jboss.ws.core.jaxws.binding.SOAP12BindingJAXWS;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* Provides access to the protocol binding.
@@ -54,15 +49,15 @@
public CommonBindingProvider(EndpointMetaData epMetaData)
{
this.epMetaData = epMetaData;
- initBinding(epMetaData.getBindingId(), epMetaData.getType());
+ initBinding(epMetaData.getBindingId());
this.epMetaData.registerConfigObserver(this);
configure();
}
- public CommonBindingProvider(String bindingId, Type type)
+ public CommonBindingProvider(String bindingId)
{
- initBinding(bindingId, type);
+ initBinding(bindingId);
configure();
}
@@ -74,20 +69,16 @@
}
}
- protected void initBinding(String bindingId, Type type)
+ protected void initBinding(String bindingId)
{
if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId))
{
- binding = (type == Type.JAXWS ? new SOAP11BindingJAXWS() : new SOAP11BindingJAXRPC());
+ binding = new SOAP11BindingJAXRPC();
}
else if (SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
{
- binding = (type == Type.JAXWS ? new SOAP12BindingJAXWS() : new SOAP12BindingJAXRPC());
+ binding = new SOAP12BindingJAXRPC();
}
- else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
- {
- binding = new HTTPBindingJAXWS();
- }
}
public CommonBinding getCommonBinding()
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -36,7 +36,6 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
@@ -56,7 +55,6 @@
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -211,7 +209,7 @@
QName anonQName = new QName(Constants.NS_JBOSSWS_URI, "Anonymous");
QName anonPort = new QName(Constants.NS_JBOSSWS_URI, "AnonymousPort");
- epMetaData = new ClientEndpointMetaData(serviceMetaData, anonPort, anonQName, Type.JAXRPC);
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, anonPort, anonQName);
epMetaData.setStyle(Style.RPC);
serviceMetaData.addEndpoint(epMetaData);
@@ -282,20 +280,6 @@
// Create the invocation and sync the input parameters
EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
-
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
- && epInv.getRequestParamNames() != null)
- {
- for (QName qname : epInv.getRequestParamNames())
- {
- ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
- if ((paramMetaData.getMode().equals(ParameterMode.IN) || paramMetaData.getMode().equals(ParameterMode.INOUT))
- && epInv.getRequestParamValue(qname) == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "RPC_LITERAL_OPERATION_PARAMS_IS_NULL"));
- }
- }
- }
// Set the required outbound properties
setOutboundContextProperties();
@@ -549,8 +533,6 @@
retValue = epInv.getReturnValue();
if (opMetaData.isDocumentWrapped() && retMetaData.isMessageType() == false)
retValue = ParameterWrapping.unwrapResponseParameters(retMetaData, retValue, inParams);
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral() && retValue == null)
- throw new WebServiceException(BundleUtils.getMessage(bundle, "RPC_LITERAL_OPERATION_RETURN_IS_NULL", opMetaData.getQName()));
}
// Set the holder values for INOUT parameters
@@ -563,15 +545,6 @@
{
QName xmlName = paramMetaData.getXmlName();
Object value = epInv.getResponseParamValue(xmlName);
- //JBWS-2969:Check if reponse parameter or return value is null
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
- {
- if (value == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "RPC_LITERAL_OPERATION_RETURN_IS_NULL",
- opMetaData.getQName()));
- }
- }
// document/literal wrapped return value header
if (index == -1)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -43,7 +43,6 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
import org.apache.xerces.xs.XSElementDeclaration;
import org.apache.xerces.xs.XSTypeDefinition;
@@ -55,7 +54,6 @@
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
@@ -176,14 +174,6 @@
CIDGenerator cidGenerator = reqMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
reqMessage.addAttachmentPart(part);
-
- // Add the attachment to the standard property
- if (value instanceof DataHandler && msgContext instanceof MessageContextJAXWS)
- {
- DataHandler dataHandler = (DataHandler)value;
- Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(dataHandler.getContentType(), dataHandler);
- }
}
else
{
@@ -339,9 +329,6 @@
}
}
- // Add all attachments to the standard property
- this.propagateAttachmentsToJAXWSMessageContext(reqMessage, msgContext);
-
return epInv;
}
catch (Exception e)
@@ -401,8 +388,6 @@
}
}
- this.propagateAttachmentsFromJAXWSMessageContext(resMessage, msgContext);
-
// Add the return to the message
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (retMetaData != null)
@@ -419,14 +404,6 @@
AttachmentPart part = createAttachmentPart(retMetaData, value, cidGenerator);
resMessage.addAttachmentPart(part);
epInv.setReturnValue(part);
-
- // Add the attachment to the standard property
- if (part.getDataHandler() != null && msgContext instanceof MessageContextJAXWS)
- {
- DataHandler dataHandler = part.getDataHandler();
- Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(part.getContentId(), dataHandler);
- }
}
else
{
@@ -446,14 +423,6 @@
CIDGenerator cidGenerator = resMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
resMessage.addAttachmentPart(part);
-
- // Add the attachment to the standard property
- if (value instanceof DataHandler && msgContext instanceof MessageContextJAXWS)
- {
- DataHandler dataHandler = (DataHandler)value;
- Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(dataHandler.getContentType(), dataHandler);
- }
}
else
{
@@ -477,31 +446,6 @@
}
}
- /**
- * Propagates attachments from JAXWS message context to soap message.
- *
- * @param message soap message to bind attachments to
- * @param msgContext message context to read attachments from
- */
- private void propagateAttachmentsFromJAXWSMessageContext(final SOAPMessage message, final CommonMessageContext msgContext)
- {
- if (msgContext instanceof MessageContextJAXWS)
- {
- @SuppressWarnings("unchecked")
- final Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- final Iterator<?> attachmentsIterator = attachments.keySet().iterator();
-
- AttachmentPart part = null;
- while (attachmentsIterator.hasNext())
- {
- final String contentId = (String)attachmentsIterator.next();
- final DataHandler handler = attachments.get(contentId);
- part = this.createAttachmentPart(contentId, handler);
- ((SOAPMessageImpl)message).addAttachmentPart(part);
- }
- }
- }
-
/** On the client side, extract the OUT parameters from the payload and return them to the client. */
public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction payload, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
@@ -607,9 +551,6 @@
epInv.setResponseParamValue(xmlName, value);
}
}
-
- // Add all attachments to the standard property
- this.propagateAttachmentsToJAXWSMessageContext(resMessage, msgContext);
}
catch (Exception e)
{
@@ -617,30 +558,6 @@
}
}
- /**
- * Propagates all the attachments from SOAPMessage to JAXWS Message context standard property.
- *
- * @param message soap message to read attachments from
- * @param msgContext to propagate attachments to
- * @throws SOAPException if something went wrong
- */
- private void propagateAttachmentsToJAXWSMessageContext(final SOAPMessage message, final CommonMessageContext msgContext) throws SOAPException
- {
- if (msgContext instanceof MessageContextJAXWS)
- {
- final SOAPMessageImpl implMessage = (SOAPMessageImpl)message;
- final Iterator<?> attachmentsIterator = implMessage.getAttachments();
- final Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);
-
- AttachmentPart part = null;
- while (attachmentsIterator.hasNext())
- {
- part = (AttachmentPart)attachmentsIterator.next();
- attachments.put(part.getContentId(), part.getDataHandler()); // TODO: test on getDataHandler() == null?
- }
- }
- }
-
public MessageAbstraction bindFaultMessage(Exception ex)
{
SOAPMessageImpl faultMessage = (SOAPMessageImpl)createFaultMessageFromException(ex);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -31,8 +31,8 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.Normalizer;
import org.jboss.ws.core.soap.SOAPContentElement;
-import org.jboss.ws.common.Normalizer;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.core.client;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -1,41 +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.client;
-
-import org.jboss.ws.core.jaxws.binding.HTTPMessageMarshaller;
-import org.jboss.ws.core.jaxws.binding.HTTPMessageUnMarshaller;
-
-/**
- * @since 02-Apr-2007
- */
-public class HTTPProtocolConnection extends HTTPRemotingConnection
-{
- public UnMarshaller getUnmarshaller()
- {
- return new HTTPMessageUnMarshaller();
- }
-
- public Marshaller getMarshaller()
- {
- return new HTTPMessageMarshaller();
- }
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,25 +22,23 @@
package org.jboss.ws.core.client;
import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceRefBinderJAXRPC;
-import org.jboss.ws.core.jaxws.client.serviceref.NativeServiceRefBinderJAXWS;
import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public final class NativeServiceRefBinderFactoryImpl implements ServiceRefBinderFactory
{
private static final ServiceRefBinder JAXRPC_BINDER = new NativeServiceRefBinderJAXRPC();
- private static final ServiceRefBinder JAXWS_BINDER = new NativeServiceRefBinderJAXWS();
-
public ServiceRefBinder newServiceRefBinder(final Type type)
{
- return type == Type.JAXRPC ? JAXRPC_BINDER : JAXWS_BINDER;
+ if (type == Type.JAXRPC)
+ {
+ return JAXRPC_BINDER;
+ }
+ throw new UnsupportedOperationException();
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -26,7 +26,6 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,15 +22,15 @@
package org.jboss.ws.core.jaxrpc;
import java.util.HashMap;
+import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.Map;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.encoding.TypeMapping;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.TypeMappingImpl;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -25,11 +25,11 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,12 +23,12 @@
import java.util.Calendar;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,12 +23,12 @@
import java.util.Calendar;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,17 +21,18 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import java.util.ResourceBundle;
+
import javax.xml.namespace.QName;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -25,11 +25,11 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.DeserializerSupport;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.SerializerSupport;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.DeserializerSupport;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.SerializerSupport;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,18 +21,19 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import java.util.ResourceBundle;
+
import javax.xml.namespace.QName;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.soap.SOAPElement;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.NamedNodeMap;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,8 +22,6 @@
package org.jboss.ws.core.jaxrpc.client;
import java.rmi.RemoteException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -33,6 +31,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -46,7 +45,9 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
@@ -69,7 +70,6 @@
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.ws.common.JavaUtils;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,15 +21,15 @@
*/
package org.jboss.ws.core.server;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.logging.Logger;
-import java.util.ResourceBundle;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointResolver;
-import java.util.Iterator;
-
/**
* @author Heiko.Braun(a)jboss.com
* Created: Jul 23, 2007
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,27 +21,18 @@
*/
package org.jboss.ws.core.server;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsEndpoint;
-
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
-import java.util.HashMap;
-import java.util.Map;
import java.util.ResourceBundle;
-import javax.activation.DataHandler;
import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
@@ -61,16 +52,11 @@
import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -113,16 +99,8 @@
if (sepMetaData == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_META_DATA"));
- if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
- {
- bindingProvider = new CommonBindingProvider(sepMetaData);
- delegate = new HandlerDelegateJAXRPC(sepMetaData);
- }
- else
- {
- bindingProvider = new BindingProviderImpl(sepMetaData);
- delegate = new HandlerDelegateJAXWS(sepMetaData);
- }
+ bindingProvider = new CommonBindingProvider(sepMetaData);
+ delegate = new HandlerDelegateJAXRPC(sepMetaData);
}
public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
@@ -159,9 +137,6 @@
HandlerType[] handlerType = delegate.getHandlerTypeOrder();
HandlerType[] faultType = delegate.getHandlerTypeOrder();
- // Set the required inbound context properties
- setInboundContextProperties();
-
try
{
boolean oneway = false;
@@ -211,21 +186,7 @@
reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- //JBWS-2969:check if the RPC/Lit input paramter is null
- if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
- && opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
- {
- for (QName qname : sepInv.getRequestParamNames())
- {
- ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
- if ((paramMetaData.getMode().equals(ParameterMode.IN) || paramMetaData.getMode().equals(ParameterMode.INOUT)) && sepInv.getRequestParamValue(qname) == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "RPC/LITERAL_PAPAMETERS_IS_NULL", opMetaData.getQName()));
- }
- }
- }
-
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
@@ -247,9 +208,6 @@
// Reverse the message direction
msgContext = processPivotInternal(msgContext, direction);
- // Set the required outbound context properties
- setOutboundContextProperties();
-
// Bind the response message
MessageAbstraction resMessage = binding.bindResponseMessage(opMetaData, sepInv);
msgContext.setMessageAbstraction(resMessage);
@@ -311,22 +269,6 @@
protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof SOAPMessageContextJAXWS)
- {
- if (isJaxwsEndpoint(ep))
- {
- if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
- {
- WebServiceContext wsContext = contextFactory.newWebServiceContext((SOAPMessageContextJAXWS)msgContext);
- invContext.addAttachment(WebServiceContext.class, wsContext);
- }
- else
- {
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_PROVIDE_WEBSERVICECONTEXT"));
- }
- }
- invContext.addAttachment(javax.xml.ws.handler.MessageContext.class, msgContext);
- }
if (msgContext instanceof SOAPMessageContextJAXRPC)
{
invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext);
@@ -378,7 +320,7 @@
Method seiMethod = sepInv.getJavaMethod();
Method implMethod = null;
- if (seiMethod != null) // RM hack
+ if (seiMethod != null)
{
String methodName = seiMethod.getName();
Class[] paramTypes = seiMethod.getParameterTypes();
@@ -412,50 +354,11 @@
return implMethod;
}
- protected void setInboundContextProperties()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof MessageContextJAXWS)
- {
- // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
- msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
- }
- }
-
- protected void setOutboundContextProperties()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof MessageContextJAXWS)
- {
- Map<String, DataHandler> outboundAttachments = (Map<String, DataHandler>)msgContext.get(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS);
- Map<String, DataHandler> newAttachments = new HashMap<String, DataHandler>(); // to protect against attacks from endpoint
-
- // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
- msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, newAttachments);
-
- if (outboundAttachments != null)
- {
- for (final String key : outboundAttachments.keySet())
- {
- newAttachments.put(key, outboundAttachments.get(key));
- }
- }
- }
- }
-
private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
{
if (direction.getDirection() == Direction.InBound)
{
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
- {
- msgContext = MessageContextJAXRPC.processPivot(msgContext);
- }
- else
- {
- msgContext = MessageContextJAXWS.processPivot(msgContext);
- }
+ msgContext = MessageContextJAXRPC.processPivot(msgContext);
direction.setDirection(Direction.OutBound);
}
return msgContext;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,13 +21,13 @@
*/
package org.jboss.ws.core.server;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
/**
* Implementation of ServletEndpointContext
*
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,10 +22,9 @@
package org.jboss.ws.core.soap;
import java.util.ArrayList;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.util.Iterator;
import java.util.List;
+import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.soap.Detail;
@@ -36,6 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,7 +22,6 @@
package org.jboss.ws.core.soap;
import java.lang.reflect.Method;
-import java.util.List;
import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -40,7 +39,6 @@
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.NullValueSerializer;
-import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
@@ -150,8 +148,6 @@
serContext.setJavaType(javaType);
ParameterMetaData pmd = container.getParamMetaData();
OperationMetaData opMetaData = pmd.getOperationMetaData();
- List<Class> registeredTypes = opMetaData.getEndpointMetaData().getRegisteredTypes();
- serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));
TypeMappingImpl typeMapping = serContext.getTypeMapping();
XMLFragment xmlFragment = null;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,13 +22,12 @@
package org.jboss.ws.core.soap;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.InputStream;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.ResourceBundle;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPElement;
@@ -41,6 +40,7 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.api.util.ServiceLoader;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,7 +23,6 @@
import java.lang.reflect.Array;
import java.lang.reflect.Method;
-import java.util.List;
import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -42,7 +41,6 @@
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.TypeMappingImpl;
-import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.w3c.dom.Comment;
@@ -162,8 +160,6 @@
OperationMetaData opMetaData = pmd.getOperationMetaData();
serContext.setProperty(ParameterMetaData.class.getName(), pmd);
serContext.setJavaType(javaType);
- List<Class> registeredTypes = opMetaData.getEndpointMetaData().getRegisteredTypes();
- serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));
try
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,11 +21,14 @@
*/
package org.jboss.ws.core.soap.attachment;
-import org.jboss.util.Base64;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Iterator;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.IOUtils;
-import org.jboss.ws.WSException;
import javax.activation.DataHandler;
import javax.activation.DataSource;
@@ -33,9 +36,12 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
-import java.io.*;
-import java.util.Iterator;
+import org.jboss.util.Base64;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.IOUtils;
+
/**
* Implementation of the <code>AttachmentPart</code> interface.
* @see javax.xml.soap.AttachmentPart
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -38,7 +38,6 @@
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -171,7 +170,7 @@
{
QName portName = wsdlEndpoint.getName();
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- ClientEndpointMetaData epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, interfaceQName, Type.JAXRPC);
+ ClientEndpointMetaData epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, interfaceQName);
epMetaData.setEndpointAddress(wsdlEndpoint.getAddress());
serviceMetaData.addEndpoint(epMetaData);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -32,7 +32,6 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -132,7 +131,7 @@
QName interfaceQName = wsdlEndpoint.getInterface().getName();
Endpoint ep = dep.getService().getEndpointByName(linkName);
- ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, Type.JAXRPC);
+ ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName);
sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
sepMetaData.setLinkName(linkName);
serviceMetaData.addEndpoint(sepMetaData);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,13 +21,11 @@
*/
package org.jboss.ws.metadata.umdm;
-import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
+import javax.xml.namespace.QName;
+
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.PortInfo;
-
/**
* Client side endpoint meta data.
*
@@ -43,17 +41,12 @@
{
}
- public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName portTypeName, Type type)
+ public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName portTypeName)
{
- super(service, qname, portTypeName, type);
+ super(service, qname, portTypeName);
String configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
+ String configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
- String configFile;
- if (type == Type.JAXRPC)
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
- else
- configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
-
EndpointConfigMetaData ecmd = getEndpointConfigMetaData();
ecmd.setConfigName(configName);
ecmd.setConfigFile(configFile);
@@ -69,15 +62,6 @@
this.endpointAddress = endpointAddress;
}
- public PortInfo getPortInfo()
- {
- QName serviceName = getServiceMetaData().getServiceName();
- QName portName = getPortName();
- String bindingID = getBindingId();
- PortInfo portInfo = new PortInfoImpl(serviceName, portName, bindingID);
- return portInfo;
- }
-
public EndpointConfigMetaData createEndpointConfigMetaData(String configName, String configFile)
{
return super.createEndpointConfigMetaData(configName, configFile);
@@ -86,7 +70,6 @@
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
- buffer.append("\n type=").append(getType());
buffer.append("\n qname=").append(getPortName());
buffer.append("\n address=").append(getEndpointAddress());
buffer.append("\n binding=").append(getBindingId());
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -39,7 +39,6 @@
import java.util.Set;
import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.ws.Service.Mode;
@@ -55,11 +54,6 @@
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.metadata.accessor.AccessorFactory;
@@ -67,15 +61,12 @@
import org.jboss.ws.metadata.accessor.JAXBAccessorFactoryCreator;
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.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.config.CommonConfig;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import com.sun.xml.bind.api.JAXBRIContext;
-
/**
* A Service component describes a set of endpoints.
*
@@ -88,11 +79,6 @@
// provide logging
private static Logger log = Logger.getLogger(EndpointMetaData.class);
- public enum Type
- {
- JAXRPC, JAXWS
- }
-
public static final Set<String> SUPPORTED_BINDINGS = new HashSet<String>();
static
{
@@ -128,8 +114,6 @@
private ParameterStyle parameterStyle;
// The JAXWS ServiceMode
private Mode serviceMode;
- // Whether the endpoint was deployed from annotations
- private Type type;
// The list of service meta data
private List<OperationMetaData> operations = new ArrayList<OperationMetaData>();
// Maps the java method to the operation meta data
@@ -143,20 +127,15 @@
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new ArrayList<UnifiedPortComponentRefMetaData>();
- private JAXBContextCache jaxbCache = new JAXBContextCache();
-
EndpointMetaData()
{
}
- public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName, Type type)
+ public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName)
{
this.serviceMetaData = service;
this.portName = portName;
this.portTypeName = portTypeName;
- this.type = type;
-
- // The default binding
this.bindingId = Constants.SOAP11HTTP_BINDING;
}
@@ -323,11 +302,6 @@
this.serviceMode = serviceMode;
}
- public Type getType()
- {
- return type;
- }
-
public String getAuthMethod()
{
return authMethod;
@@ -526,7 +500,6 @@
eagerInitializeOperations();
eagerInitializeTypes();
eagerInitializeAccessors();
- eagerInitializeJAXBContextCache();
}
private void eagerInitializeOperations()
@@ -594,14 +567,7 @@
}
else
{
- if (getType() == Type.JAXWS)
- {
- typeMapping.register(javaType, xmlType, new JAXBSerializerFactory(), new JAXBDeserializerFactory());
- }
- else
- {
- typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
- }
+ typeMapping.register(javaType, xmlType, new JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
}
}
catch (ClassNotFoundException e)
@@ -640,54 +606,24 @@
}
}
- // Create a JAXBContext for those types
- JAXBRIContext jaxbCtx = null;
- if (useJAXBAccessorFactory)
- {
- Class[] typeArr = new Class[types.size()];
- jaxbCtx = (JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
- }
-
// Create the accessors using a shared JAXBContext
for (OperationMetaData opMetaData : operations)
{
for (ParameterMetaData paramMetaData : opMetaData.getParameters())
{
- createAccessor(paramMetaData, jaxbCtx);
+ createAccessor(paramMetaData);
}
ParameterMetaData retParam = opMetaData.getReturnParameter();
if (retParam != null)
- createAccessor(retParam, jaxbCtx);
+ createAccessor(retParam);
}
}
- private void eagerInitializeJAXBContextCache()
+ private void createAccessor(ParameterMetaData paramMetaData)
{
- //initialize jaxb context cache
- if ("true".equalsIgnoreCase(System.getProperty(Constants.EAGER_INITIALIZE_JAXB_CONTEXT_CACHE)))
- {
- log.debug("Initializing JAXBContext cache...");
- try
- {
- Class[] classes = getRegisteredTypes().toArray(new Class[0]);
- JAXBContext context = JAXBContextFactory.newInstance().createContext(classes);
- jaxbCache.add(classes, context);
- }
- catch (Exception e)
- {
- //ignore
- }
- }
- }
-
- private void createAccessor(ParameterMetaData paramMetaData, JAXBRIContext jaxbCtx)
- {
AccessorFactoryCreator factoryCreator = paramMetaData.getAccessorFactoryCreator();
- if (factoryCreator instanceof JAXBAccessorFactoryCreator)
- ((JAXBAccessorFactoryCreator)factoryCreator).setJAXBContext(jaxbCtx);
-
if (paramMetaData.getWrappedParameters() != null)
{
AccessorFactory factory = factoryCreator.create(paramMetaData);
@@ -705,12 +641,7 @@
public void configure(Configurable configurable)
{
CommonConfig config = getConfig();
-
- if (configurable instanceof DispatchBinding)
- {
- DispatchBinding dpb = (DispatchBinding)configurable;
- dpb.setValidateDispatch(config.hasFeature(EndpointFeature.VALIDATE_DISPATCH));
- }
+ // TODO: remove this method
}
public UnifiedVirtualFile getRootFile()
@@ -723,11 +654,6 @@
configObservable.addObserver(observer);
}
- public JAXBContextCache getJaxbCache()
- {
- return jaxbCache;
- }
-
public String getConfigFile()
{
return getEndpointConfigMetaData().getConfigFile();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.metadata.umdm;
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -31,7 +29,6 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceException;
@@ -39,11 +36,9 @@
import org.jboss.ws.WSException;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.metadata.accessor.AccessorFactory;
import org.jboss.ws.metadata.accessor.ReflectiveFieldAccessorFactoryCreator;
import org.jboss.ws.metadata.accessor.ReflectiveMethodAccessorFactoryCreator;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* A Fault component describes a fault that a given operation supports.
@@ -208,16 +203,6 @@
public void eagerInitialize()
{
- Type epType = getOperationMetaData().getEndpointMetaData().getType();
- if (epType == EndpointMetaData.Type.JAXWS && faultBeanName != null)
- {
- if (loadFaultBean() == null)
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- new DynamicWrapperGenerator(loader).generate(this);
- }
- }
-
// Initialize the cache
javaType = getJavaType();
if (javaType == null)
@@ -225,99 +210,7 @@
if (JavaUtils.isAssignableFrom(Exception.class, javaType) == false)
throw new WSException(BundleUtils.getMessage(bundle, "FAULT_JAVA_TYPE_NOT_EXCEPTION", javaTypeName));
-
- if (epType == EndpointMetaData.Type.JAXWS)
- {
- faultBean = getFaultBean();
- if (faultBean != null)
- initializeFaultBean();
- }
}
-
- private void initializeFaultBean()
- {
- /* JAX-WS 3.7: For exceptions that match the pattern described in section
- * 2.5 (i.e. exceptions that have a getFaultInfo method), the FaultBean
- * is used as input to JAXB */
- try
- {
- /* JAX-WS 2.5: A wsdl:fault element refers to a wsdl:message that contains
- * a single part. The global element declaration referred to by that part
- * is mapped to a Java bean. A wrapper exception class contains the
- * following methods:
- * . WrapperException(String message, FaultBean faultInfo)
- * . WrapperException(String message, FaultBean faultInfo, Throwable cause)
- * . FaultBean getFaultInfo() */
- serviceExceptionConstructor = javaType.getConstructor(String.class, faultBean);
- faultInfoMethod = javaType.getMethod("getFaultInfo");
- }
- /* JAX-WS 3.7: For exceptions that do not match the pattern described in
- * section 2.5, JAX-WS maps those exceptions to Java beans and then uses
- * those Java beans as input to the JAXB mapping. */
- catch (NoSuchMethodException nsme)
- {
- /* For each getter in the exception and its superclasses, a property of
- * the same type and name is added to the bean. */
- XmlType xmlType = (XmlType)faultBean.getAnnotation(XmlType.class);
- if (xmlType == null)
- throw new WebServiceException(BundleUtils.getMessage(bundle, "XMLTYPE_MISSING", faultBeanName));
-
- AccessorFactory accessorFactory = getAccessorFactory(faultBean);
-
- String[] propertyNames = xmlType.propOrder();
- int propertyCount = propertyNames.length;
- propertyTypes = new Class[propertyCount];
- faultBeanProperties = new WrappedParameter[propertyCount];
- serviceExceptionGetters = new Method[propertyCount];
-
- for (int i = 0; i < propertyCount; i++)
- {
- String propertyName = propertyNames[i];
- // extract property metadata from the fault bean
- try
- {
- PropertyDescriptor propertyDescriptor = new PropertyDescriptor(propertyName, faultBean);
- Class propertyType = propertyDescriptor.getPropertyType();
-
- WrappedParameter faultBeanProperty = new WrappedParameter(null, propertyType.getName(), propertyName, i);
- faultBeanProperty.setAccessor(accessorFactory.create(faultBeanProperty));
- faultBeanProperties[i] = faultBeanProperty;
-
- propertyTypes[i] = propertyType;
- }
- catch (IntrospectionException ie)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "PROPERTY_NOT_FOUND_IN_BEAN", new Object[]{ propertyName, faultBeanName }), ie);
- }
-
- // extract property metadata from the service exception
- try
- {
- /* use PropertyDescriptor(String, Class, String, String) instead
- * of PropertyDescriptor(String, Class) because the latter requires
- * the setter method to be present */
- PropertyDescriptor propertyDescriptor = new PropertyDescriptor(propertyName, javaType, "is" + JavaUtils.capitalize(propertyName), null);
- serviceExceptionGetters[i] = propertyDescriptor.getReadMethod();
- }
- catch (IntrospectionException ie)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "PROPERTY_NOT_FOUND_IN_EXCEPTION", new Object[]{ propertyName , javaTypeName}), ie);
- }
- }
-
- try
- {
- // Attempt to locate a usable constructor
- serviceExceptionConstructor = javaType.asSubclass(Exception.class).getConstructor(propertyTypes);
- }
- catch (NoSuchMethodException e)
- {
- // Only needed for client side. The spec does not clarify this, and the TCK makes use of non matching constructors,
- // so we allow them for server side usage and only fail when used by the client.
- }
- }
- }
-
private AccessorFactory getAccessorFactory(Class faultBean)
{
// This should catch all cases due to the constraints that JAX-WS puts on the fault bean
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -38,12 +38,10 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.metadata.accessor.AccessorFactoryCreator;
import org.jboss.ws.metadata.accessor.ReflectiveMethodAccessorFactoryCreator;
import org.jboss.ws.metadata.config.EndpointFeature;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* A request/response parameter that a given operation supports.
@@ -441,15 +439,11 @@
javaType = null;
// TODO - Remove messageType hack
- Type epType = getOperationMetaData().getEndpointMetaData().getType();
if (getOperationMetaData().isDocumentWrapped() && !isInHeader() && !isSwA() && !isMessageType())
{
if (loadWrapperBean() == null)
{
- if (epType == EndpointMetaData.Type.JAXRPC)
- throw new WSException(BundleUtils.getMessage(bundle, "WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED"));
-
- new DynamicWrapperGenerator(getClassLoader()).generate(this);
+ throw new WSException(BundleUtils.getMessage(bundle, "WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED"));
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -68,17 +68,13 @@
// The optional secure wsdl access
private boolean secureWSDLAccess;
- public ServerEndpointMetaData(ServiceMetaData service, Endpoint endpoint, QName portName, QName portTypeName, Type type)
+ public ServerEndpointMetaData(ServiceMetaData service, Endpoint endpoint, QName portName, QName portTypeName)
{
- super(service, portName, portTypeName, type);
+ super(service, portName, portTypeName);
this.endpoint = endpoint;
String configName = ConfigurationProvider.DEFAULT_ENDPOINT_CONFIG_NAME;
- String configFile;
- if (type == Type.JAXRPC)
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
- else
- configFile = ConfigurationProvider.DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE;
+ String configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
EndpointConfigMetaData ecmd = getEndpointConfigMetaData();
ecmd.setConfigName(configName);
@@ -199,7 +195,6 @@
public String toString()
{
StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
- buffer.append("\n type=").append(getType());
buffer.append("\n qname=").append(getPortName());
buffer.append("\n id=").append(getServiceEndpointID().getCanonicalName());
buffer.append("\n address=").append(getEndpointAddress());
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,8 +23,8 @@
import javax.xml.namespace.QName;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.metadata.accessor.Accessor;
-import org.jboss.ws.common.JavaUtils;
/**
* WrappedParameter represents a document/literal wrapped parameter.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,15 +22,15 @@
package org.jboss.ws.metadata.wsdl;
import java.util.Collection;
+import java.util.LinkedHashMap;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.LinkedHashMap;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
/**
* A Message Reference component associates a defined type with a message
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,17 +22,17 @@
package org.jboss.ws.metadata.wsdl.xsd;
import java.io.File;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
+import java.util.ResourceBundle;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,11 +23,11 @@
import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import org.apache.xerces.xs.XSModel;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,16 +21,16 @@
*/
package org.jboss.ws.tools.wsdl;
-import com.ibm.wsdl.DefinitionImpl;
-import com.ibm.wsdl.extensions.PopulatedExtensionRegistry;
-import com.ibm.wsdl.xml.WSDLWriterImpl;
-
import javax.wsdl.Definition;
import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
import javax.wsdl.xml.WSDLWriter;
+import com.ibm.wsdl.DefinitionImpl;
+import com.ibm.wsdl.extensions.PopulatedExtensionRegistry;
+import com.ibm.wsdl.xml.WSDLWriterImpl;
+
/**
* A fork of the original wsdl4j 1.6.2 package
* that delegates to the {@link JBossWSDLReaderImpl}.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,22 +21,38 @@
*/
package org.jboss.ws.tools.wsdl;
-import com.ibm.wsdl.Constants;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import com.ibm.wsdl.extensions.schema.SchemaConstants;
-import com.ibm.wsdl.util.StringUtils;
-import com.ibm.wsdl.util.xml.DOMUtils;
-import com.ibm.wsdl.util.xml.QNameUtils;
-import com.ibm.wsdl.util.xml.XPathUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.xml.sax.InputSource;
+import java.util.Vector;
-import javax.wsdl.*;
+import javax.wsdl.Binding;
+import javax.wsdl.BindingFault;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Import;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.OperationType;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.Types;
+import javax.wsdl.WSDLException;
import javax.wsdl.extensions.AttributeExtensible;
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.extensions.ExtensionDeserializer;
@@ -50,10 +66,22 @@
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.*;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.xml.sax.InputSource;
+
+import com.ibm.wsdl.Constants;
+import com.ibm.wsdl.extensions.schema.SchemaConstants;
+import com.ibm.wsdl.util.StringUtils;
+import com.ibm.wsdl.util.xml.DOMUtils;
+import com.ibm.wsdl.util.xml.QNameUtils;
+import com.ibm.wsdl.util.xml.XPathUtils;
+
/**
* A WSDLReader fork of the original wsdl4j 1.6.2 package
* that delegates to the JBossWSEntityResolver in
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,16 +22,18 @@
package org.jboss.ws.tools.wsdl;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.Writer;
import java.util.Iterator;
+import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
+import org.jboss.ws.common.DOMUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.metadata.wsdl.DOMTypes;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLService;
@@ -39,8 +41,6 @@
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.XSModelTypes;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.Element;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,11 +21,12 @@
*/
package org.jboss.wsf.stack.jbws;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import java.util.ResourceBundle;
+
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.utils.DelegateClassLoader;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -25,20 +25,20 @@
import java.util.LinkedList;
import java.util.List;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.ServletDelegate;
-import org.jboss.wsf.spi.management.EndpointResolver;
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
-import org.jboss.ws.common.servlet.AbstractEndpointServlet;
-
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.injection.InjectionHelper;
+import org.jboss.ws.common.injection.PreDestroyHolder;
+import org.jboss.ws.common.servlet.AbstractEndpointServlet;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.ServletDelegate;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
/**
* A Native endpoint servlet that is installed for every web service endpoint
* @author thomas.diesler(a)jboss.com
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.jbws;
+import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandler;
/**
* @author Heiko.Braun(a)jboss.com
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -22,19 +22,14 @@
package org.jboss.wsf.stack.jbws;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.ResourceBundle;
-import javax.activation.DataHandler;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
@@ -51,8 +46,11 @@
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.DOMWriter;
+import org.jboss.ws.common.IOUtils;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
@@ -63,8 +61,6 @@
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.server.MimeHeaderSource;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServletHeaderSource;
@@ -74,11 +70,7 @@
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.ThreadLocalAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -246,23 +238,9 @@
if (sepMetaData == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINTMD"));
- Type type = sepMetaData.getType();
-
// Build the message context
- CommonMessageContext msgContext;
- if (type == EndpointMetaData.Type.JAXRPC)
- {
- msgContext = new SOAPMessageContextJAXRPC();
- invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext);
- }
- else
- {
- msgContext = new SOAPMessageContextJAXWS();
- msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, Boolean.valueOf(false));
- msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
- msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
- invContext.addAttachment(javax.xml.ws.handler.MessageContext.class, msgContext);
- }
+ CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
+ invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext);
// Set servlet specific properties
HttpServletResponse httpResponse = null;
@@ -275,23 +253,9 @@
HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
httpResponse = reqContext.getHttpServletResponse();
headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
- if (type == EndpointMetaData.Type.JAXRPC)
- {
- msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
- }
- else
- {
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS, headerSource.getHeaderMap());
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD, httpRequest.getMethod());
- msgContext.put(MessageContextJAXWS.QUERY_STRING, httpRequest.getQueryString());
- msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
- msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
- }
+ msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
+ msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
+ msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
}
// Associate a message context with the current thread
@@ -302,27 +266,7 @@
msgContext.setEndpointMetaData(sepMetaData);
MessageAbstraction resMessage = processRequest(endpoint, headerSource, invContext, inStream);
CommonMessageContext reqMsgContext = msgContext;
- // Replace the message context with the response context
- msgContext = MessageContextAssociation.peekMessageContext();
- Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
- if (headers != null)
- {
- if (headerSource != null)
- {
- headerSource.setHeaderMap(headers);
- }
- }
-
- Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
- if (code != null)
- {
- if (httpResponse != null)
- {
- httpResponse.setStatus(code.intValue());
- }
- }
-
boolean isFault = false;
if (resMessage instanceof SOAPMessage)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,9 +23,9 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbEndpoint;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInvokerEJB21;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -23,17 +23,13 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcJseDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxwsDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
import java.util.ResourceBundle;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -57,17 +53,6 @@
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
{
- if (isJaxwsJseDeployment(dep))
- {
- JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
- umd = builder.buildMetaData((ArchiveDeployment)dep);
- dep.addAttachment(UnifiedMetaData.class, umd);
- }
- if (isJaxwsEjbDeployment(dep))
- {
- JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
- umd = builder.buildMetaData((ArchiveDeployment)dep);
- }
if (isJaxrpcJseDeployment(dep) && !isJaxwsDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -21,12 +21,13 @@
*/
package org.jboss.wsf.stack.jbws;
-import org.jboss.wsf.spi.management.EndpointResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
+import java.util.Iterator;
import javax.management.ObjectName;
-import java.util.Iterator;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
/**
* Resolves Endpoints by Servlet name and web context path.
*
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -48,7 +48,6 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
@@ -180,7 +179,7 @@
*/
public void testBindRequestMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
@@ -199,7 +198,7 @@
*/
public void testBindRequestMessageWithBoundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
// Add bound header
@@ -225,7 +224,7 @@
*/
public void testBindRequestMessageWithUnboundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
// Add unbound header
@@ -252,7 +251,7 @@
*/
public void testUnbindRequestMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new ByteArrayInputStream(reqEnvelope.getBytes());
@@ -290,7 +289,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(reqMessage);
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
@@ -313,7 +312,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(reqMessage);
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
@@ -327,7 +326,7 @@
*/
public void testBindResponseMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
@@ -346,7 +345,7 @@
*/
public void testUnbindResponseMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelope.getBytes());
@@ -366,7 +365,7 @@
*/
public void testUnbindResponseMessageWithBoundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithBoundHeader.getBytes());
@@ -397,7 +396,7 @@
*/
public void testUnbindResponseMessageWithUnboundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithUnboundHeader.getBytes());
@@ -425,7 +424,7 @@
*/
public void testUnbindFaultResponse() throws Exception
{
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new ByteArrayInputStream(resEnvelopeWithFault.getBytes());
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2012-04-03 03:41:59 UTC (rev 16080)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2012-04-03 08:54:31 UTC (rev 16081)
@@ -51,12 +51,9 @@
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.wsf.test.JBossWSTest;
/**
- * TODO
- *
* @author <a href="mailto:jason@stacksmash.com">Jason T. Greene</a>
*/
public class GenericAttachmentTestCase extends JBossWSTest
@@ -149,7 +146,7 @@
MessageContextAssociation.pushMessageContext(messageContext);
messageContext.setOperationMetaData(opMetaData);
- CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP11HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(CommonSOAPBinding.SOAP11HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
12 years, 9 months
JBossWS SVN: r16078 - in stack/native/trunk/modules: endorsed/src/main/resources/META-INF/services and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-02 08:03:54 -0400 (Mon, 02 Apr 2012)
New Revision: 16078
Removed:
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory
stack/native/trunk/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator
Modified:
stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3474] trim down jbossws-common-tools dependencies
Deleted: stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory 2012-04-02 12:03:54 UTC (rev 16078)
@@ -1 +0,0 @@
-org.jboss.ws.tools.jaxws.impl.SunRIConsumerFactoryImpl
\ No newline at end of file
Deleted: stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory 2012-04-02 12:03:54 UTC (rev 16078)
@@ -1 +0,0 @@
-org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
\ No newline at end of file
Deleted: stack/native/trunk/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
===================================================================
--- stack/native/trunk/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider 2012-04-02 12:03:54 UTC (rev 16078)
@@ -1 +0,0 @@
-org.jboss.ws.core.jaxws.spi.ProviderImpl
\ No newline at end of file
Modified: stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-02 12:03:54 UTC (rev 16078)
@@ -95,11 +95,6 @@
<include name="**/jbossws-common.jar"/>
</fileset>
</copy>
- <copy todir="@{targetdir}/org/jboss/ws/tools/common/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jbossws-common-tools.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/jboss/ws/spi/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-spi.jar"/>
Deleted: stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory
===================================================================
--- stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory 2012-04-02 12:03:54 UTC (rev 16078)
@@ -1 +0,0 @@
-org.jboss.ws.extensions.addressing.map.NativeMAPBuilderFactory
\ No newline at end of file
Deleted: stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator
===================================================================
--- stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator 2012-04-02 12:03:54 UTC (rev 16078)
@@ -1 +0,0 @@
-org.jboss.ws.common.DeploymentAspectManagerLocatorImpl
\ No newline at end of file
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-04-02 11:30:27 UTC (rev 16077)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-04-02 12:03:54 UTC (rev 16078)
@@ -48,10 +48,6 @@
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-common-tools</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.ws</groupId>
<artifactId>jbossws-shared-testsuite</artifactId>
</dependency>
<dependency>
12 years, 9 months
JBossWS SVN: r16077 - in stack/native/trunk/modules/core/src/main/java/org/jboss: ws/core/jaxrpc/binding and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-02 07:30:27 -0400 (Mon, 02 Apr 2012)
New Revision: 16077
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/netty/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
[JBWS-3474] trim down jbossws-api dependencies
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -1,48 +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.binding;
-
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-
-/**
- * A Deserializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeDeserializer extends DeserializerSupport
-{
-
- protected BindingCustomization getBindingCustomization()
- {
- BindingCustomization bindingCustomization = null;
- EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
- if(epMetaData instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
- }
- return bindingCustomization;
- }
-}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -1,47 +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.binding;
-
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-
-/**
- * A Serializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeSerializer extends SerializerSupport
-{
- protected BindingCustomization getBindingCustomization()
- {
- BindingCustomization bindingCustomization = null;
- EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
- if(epMetaData instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
- }
- return bindingCustomization;
- }
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -29,7 +29,7 @@
import org.apache.xerces.xs.XSModel;
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.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
@@ -43,7 +43,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBDeserializer extends ComplexTypeDeserializer
+public class JBossXBDeserializer extends DeserializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JBossXBDeserializer.class);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -25,18 +25,16 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
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.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshaller;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.soap.XMLFragment;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.util.xml.BufferedStreamResult;
import org.w3c.dom.NamedNodeMap;
@@ -47,7 +45,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBSerializer extends ComplexTypeSerializer
+public class JBossXBSerializer extends SerializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JBossXBSerializer.class);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -21,9 +21,6 @@
*/
package org.jboss.ws.core.jaxws;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.Collection;
import java.util.ResourceBundle;
@@ -32,15 +29,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.EndpointAssociation;
import com.sun.xml.bind.api.JAXBRIContext;
import com.sun.xml.bind.api.TypeReference;
-import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
/**
* The default factory checks if a {@link JAXBBindingCustomization} exists
@@ -73,14 +65,9 @@
{
try
{
- BindingCustomization bcust = getCustomization();
+ JAXBContext jaxbCtx = JAXBContext.newInstance(clazzes);
+ jaxbCtx = createContext(clazzes);
- JAXBContext jaxbCtx;
- if (null == bcust)
- jaxbCtx = JAXBContext.newInstance(clazzes);
- else
- jaxbCtx = createContext(clazzes, bcust);
-
incrementContextCount();
return jaxbCtx;
}
@@ -90,73 +77,12 @@
}
}
- public JAXBContext createContext(final Class[] clazzes, final BindingCustomization bcust) throws WSException
+ public JAXBRIContext createContext(Class[] classes, Collection<TypeReference> refs, String defaultNS, boolean c14n)
{
- JAXBContext jaxbCtx = null;
try
{
- jaxbCtx = AccessController.doPrivileged(new PrivilegedExceptionAction<JAXBContext>() {
- public JAXBContext run() throws PrivilegedActionException
- {
- try
- {
- return JAXBContext.newInstance(clazzes, bcust);
- }
- catch (JAXBException e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
+ JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, null);
incrementContextCount();
- }
- catch (Exception e)
- {
- if (bcust != null && bcust.get("com.sun.xml.bind.defaultNamespaceRemap") != null)
- {
- String dns = (String) bcust.get("com.sun.xml.bind.defaultNamespaceRemap");
- bcust.remove("com.sun.xml.bind.defaultNamespaceRemap");
- bcust.put("com.sun.xml.internal.bind.defaultNamespaceRemap", dns);
- try
- {
- jaxbCtx = AccessController.doPrivileged(new PrivilegedExceptionAction<JAXBContext>() {
- public JAXBContext run() throws PrivilegedActionException
- {
- try
- {
- return JAXBContext.newInstance(clazzes, bcust);
- }
- catch (JAXBException e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
- incrementContextCount();
- }
- catch (Exception ex)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), ex);
- }
- }
- else
- {
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), e);
- }
- }
- return jaxbCtx;
- }
-
- public JAXBRIContext createContext(Class[] classes, Collection<TypeReference> refs, String defaultNS, boolean c14n, BindingCustomization bcust)
- {
- try
- {
- RuntimeAnnotationReader anReader = null;
- if (bcust != null)
- anReader = (RuntimeAnnotationReader)bcust.get(JAXBRIContext.ANNOTATION_READER);
-
- JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, anReader);
- incrementContextCount();
return jaxbCtx;
}
catch (JAXBException e)
@@ -164,10 +90,4 @@
throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), e);
}
}
-
- private BindingCustomization getCustomization()
- {
- Endpoint ep = EndpointAssociation.getEndpoint();
- return ep != null ? ep.getAttachment(BindingCustomization.class) : null;
- }
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -26,7 +26,6 @@
import javax.xml.bind.JAXBContext;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.ServiceLoader;
import com.sun.xml.bind.api.JAXBRIContext;
@@ -44,14 +43,11 @@
private static ThreadLocal<Integer> threadContextCount = new ThreadLocal<Integer>();
- public abstract JAXBContext createContext(Class[] clazzes, BindingCustomization bindingCustomization) throws WSException;
-
public abstract JAXBContext createContext(Class[] clazzes) throws WSException;
public abstract JAXBContext createContext(Class clazz) throws WSException;
- public abstract JAXBRIContext createContext(Class[] classes, Collection<TypeReference> typeReferences, String defaultNamespaceRemap, boolean c14nSupport,
- BindingCustomization bindingCustomization);
+ public abstract JAXBRIContext createContext(Class[] classes, Collection<TypeReference> typeReferences, String defaultNamespaceRemap, boolean c14nSupport);
protected void incrementContextCount()
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -21,28 +21,20 @@
*/
package org.jboss.ws.core.jaxws;
-import java.lang.reflect.Method;
-
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
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.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.TypeMappingImpl;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
/**
* A Deserializer that can handle complex types by delegating to JAXB.
@@ -50,7 +42,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBDeserializer extends ComplexTypeDeserializer
+public class JAXBDeserializer extends DeserializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JAXBDeserializer.class);
@@ -109,32 +101,7 @@
JAXBContext context = cache.get(types);
if(null==context)
{
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- String defaultNS = epMetaData.getPortTypeName().getNamespaceURI();
- BindingCustomization bindingCustomization = getBindingCustomization();
- for (Class<?> clz : types)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method meth : clz.getMethods())
- {
- XmlElementDecl elementDecl = meth.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
+ context = JAXBContextFactory.newInstance().createContext(types);
cache.add(types, context);
}
return context;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -21,29 +21,22 @@
*/
package org.jboss.ws.core.jaxws;
-import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
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.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.w3c.dom.NamedNodeMap;
/**
@@ -52,7 +45,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBSerializer extends ComplexTypeSerializer
+public class JAXBSerializer extends SerializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JAXBSerializer.class);
@@ -123,32 +116,7 @@
JAXBContext context = cache.get(types);
if(null == context)
{
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- String defaultNS = epMetaData.getPortTypeName().getNamespaceURI();
- BindingCustomization bindingCustomization = getBindingCustomization();
- for (Class<?> clz : types)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method meth : clz.getMethods())
- {
- XmlElementDecl elementDecl = meth.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
+ context = JAXBContextFactory.newInstance().createContext(types);
cache.add(types, context);
}
return context;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -35,7 +35,6 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.MessageContext;
@@ -59,10 +58,9 @@
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -72,13 +70,13 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements BindingProvider, FeatureAwareEndpointMetaData
+public class ClientImpl extends CommonClient implements BindingProvider
{
private static final ResourceBundle bundle = BundleUtils.getBundle(ClientImpl.class);
private static Logger log = Logger.getLogger(ClientImpl.class);
// the associated endpoint meta data
- private final FeatureAwareClientEndpointMetaDataAdapter epMetaData;
+ private final ClientEndpointMetaData epMetaData;
private EndpointConfigMetaData epConfigMetaData;
// Keep a handle on the resolver so that updateConfig calls may revisit the associated chains
@@ -92,7 +90,7 @@
super(epMetaData);
setTargetEndpointAddress(epMetaData.getEndpointAddress());
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = (ClientEndpointMetaData)epMetaData;
this.epConfigMetaData = epMetaData.getEndpointConfigMetaData();
if (handlerResolver instanceof HandlerResolverImpl)
@@ -455,20 +453,4 @@
return Boolean.TRUE.equals(bool);
}
- //////////////////////////////////////////
- // FeatureAwareEndpointMetaData support //
- //////////////////////////////////////////
-
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- return this.epMetaData.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.epMetaData.setFeature(feature);
- }
-
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -51,7 +51,6 @@
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
/**
@@ -94,7 +93,6 @@
this.executor = executor;
this.stubMethods = new ArrayList(Arrays.asList(BindingProvider.class.getMethods()));
this.stubMethods.addAll(Arrays.asList(StubExt.class.getMethods()));
- this.stubMethods.addAll(Arrays.asList(FeatureAwareEndpointMetaData.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -47,7 +47,6 @@
import javax.xml.ws.Response;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
@@ -75,8 +74,6 @@
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.w3c.dom.Node;
@@ -89,7 +86,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider, EndpointMetadataProvider, FeatureAwareEndpointMetaData
+public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider, EndpointMetadataProvider
{
private static final ResourceBundle bundle = BundleUtils.getBundle(DispatchImpl.class);
// provide logging
@@ -97,7 +94,7 @@
private BindingProvider bindingProvider;
private HandlerResolverImpl handlerResolver;
- private FeatureAwareClientEndpointMetaDataAdapter epMetaData;
+ private EndpointMetaData epMetaData;
private JAXBContext jaxbContext;
private ExecutorService executor;
private String securityConfig;
@@ -109,7 +106,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, Class<T> type, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = epMetaData;
this.executor = executor;
this.type = type;
this.mode = mode;
@@ -119,7 +116,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, JAXBContext jbc, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = epMetaData;
this.executor = executor;
this.type = Object.class;
this.jaxbContext = jbc;
@@ -158,11 +155,6 @@
handlerResolver.initHandlerChain(ecmd, HandlerType.PRE, true);
handlerResolver.initHandlerChain(ecmd, HandlerType.ENDPOINT, true);
handlerResolver.initHandlerChain(ecmd, HandlerType.POST, true);
-
- PortInfo portInfo = epMetaData.getPortInfo();
- this.appendHandlers(HandlerType.PRE, portInfo, binding);
- this.appendHandlers(HandlerType.ENDPOINT, portInfo, binding);
- this.appendHandlers(HandlerType.POST, portInfo, binding);
}
retObj = invokeInternalSOAP(obj);
@@ -644,21 +636,4 @@
{
return epMetaData;
}
-
- //////////////////////////////////////////
- // FeatureAwareEndpointMetaData support //
- //////////////////////////////////////////
-
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- return this.epMetaData.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.epMetaData.setFeature(feature);
- }
-
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -39,8 +39,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.handler.GenericHandler;
-import org.jboss.ws.api.handler.GenericSOAPHandler;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.InjectionHelper;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
@@ -156,21 +154,12 @@
private void addHandler(ClassLoader classLoader, HandlerType type, HandlerMetaData handlerMetaData)
{
HandlerMetaDataJAXWS jaxwsMetaData = (HandlerMetaDataJAXWS)handlerMetaData;
- String handlerName = jaxwsMetaData.getHandlerName();
String className = jaxwsMetaData.getHandlerClassName();
- Set<QName> soapHeaders = jaxwsMetaData.getSoapHeaders();
try
{
// Load the handler class using the deployments top level CL
Handler<?> handler = getInstance(classLoader, className);
-
- if (handler instanceof GenericHandler)
- ((GenericHandler)handler).setHandlerName(handlerName);
-
- if (handler instanceof GenericSOAPHandler)
- ((GenericSOAPHandler<?>)handler).setHeaders(soapHeaders);
-
addHandler(jaxwsMetaData, handler, type);
}
catch (RuntimeException rte)
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -22,7 +22,6 @@
package org.jboss.ws.core.jaxws.spi;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,7 +33,6 @@
import javax.xml.ws.Binding;
import javax.xml.ws.Endpoint;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.WebServicePermission;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
@@ -42,14 +40,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.spi.http.HttpContext;
-import org.jboss.ws.core.jaxws.spi.http.HttpServer;
-import org.jboss.ws.core.jaxws.spi.http.NettyHttpServerFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
/**
@@ -70,9 +61,7 @@
private List<Source> metadata;
private BindingProviderImpl bindingProvider;
private Map<String, Object> properties = new HashMap<String, Object>();
- private HttpContext serverContext;
private boolean isPublished;
- private boolean isDestroyed;
private URI address;
private Deployment dep;
@@ -109,25 +98,7 @@
@Override
public void publish(final String addr)
{
- log.debug("publish: " + addr);
-
- try
- {
- this.address = new URI(addr);
- }
- catch (URISyntaxException e)
- {
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ADDRESS", addr));
- }
-
- // Check with the security manager
- this.checkPublishEndpointPermission();
-
- // Get HTTP server
- final HttpServer httpServer = NettyHttpServerFactory.getHttpServer();
- final HttpContext context = httpServer.createContext(this.getContextRoot());
-
- this.publish(context);
+ throw new UnsupportedOperationException();
}
/**
@@ -140,76 +111,12 @@
@Override
public void publish(Object context)
{
- if (context == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NULL_CONTEXT"));
-
- if (log.isDebugEnabled())
- log.debug("publishing endpoint " + this + " to " + context);
-
- if (isDestroyed)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_ALREADY_DESTROYED"));
-
- // Check with the security manager
- checkPublishEndpointPermission();
-
- if (context instanceof HttpContext)
- {
- this.serverContext = (HttpContext)context;
- if (this.address == null)
- {
- this.address = getAddressFromConfigAndContext(serverContext); // TODO: is it necessary?
- }
- HttpServer httpServer = this.serverContext.getHttpServer();
- httpServer.publish(this.serverContext, this);
- this.isPublished = true;
- }
- else
- {
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "CANNOT_HANDLE_CONTEXTS", context));
- }
+ throw new UnsupportedOperationException();
}
- private static URI getAddressFromConfigAndContext(HttpContext context)
- {
- try
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
- return new URI("http://" + hostAndPort + context.getContextRoot());
- }
- catch (URISyntaxException e)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "ERROR_GETTING_ENDPOINT_ADDRESS"), e);
- }
- }
-
@Override
public void stop()
{
- log.debug("stop");
-
- if (serverContext == null || isPublished == false)
- log.error(BundleUtils.getMessage(bundle, "ENDPOINT_NOT_PUBLISHED"));
-
- try
- {
- if (serverContext != null)
- {
- HttpServer httpServer = serverContext.getHttpServer();
- httpServer.destroy(serverContext, this);
- }
- }
- catch (Exception ex)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_STOP_ENDPOINT"), ex);
- }
-
- isPublished = false;
- isDestroyed = true;
}
@Override
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -56,7 +56,6 @@
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
-import org.jboss.ws.core.jaxws.client.DispatchImpl;
import org.jboss.ws.core.jaxws.client.serviceref.NativeServiceObjectFactoryJAXWS;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
@@ -64,8 +63,6 @@
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -266,21 +263,13 @@
@Override
public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode)
{
- ExecutorService executor = (ExecutorService)getExecutor();
- EndpointMetaData epMetaData = getEndpointMetaData(portName);
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
-
- return new DispatchImpl(executor, clientMetaDataAdapter, type, mode);
+ throw new UnsupportedOperationException();
}
@Override
public Dispatch<Object> createDispatch(QName portName, JAXBContext jbc, Mode mode)
{
- ExecutorService executor = (ExecutorService)getExecutor();
- EndpointMetaData epMetaData = getEndpointMetaData(portName);
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
-
- return new DispatchImpl(executor, clientMetaDataAdapter, jbc, mode);
+ throw new UnsupportedOperationException();
}
private EndpointMetaData getEndpointMetaData(QName portName)
@@ -376,8 +365,7 @@
try
{
ExecutorService executor = (ExecutorService)getExecutor();
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
- ClientProxy handler = new ClientProxy(executor, new ClientImpl(clientMetaDataAdapter, handlerResolver));
+ ClientProxy handler = new ClientProxy(executor, new ClientImpl(epMetaData, handlerResolver));
ClassLoader cl = epMetaData.getClassLoader();
try
{
@@ -392,7 +380,7 @@
T proxy;
try
{
- proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass, BindingProvider.class, StubExt.class, FeatureAwareEndpointMetaData.class }, handler);
+ proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass, BindingProvider.class, StubExt.class }, handler);
}
catch (RuntimeException rte)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -34,7 +34,6 @@
import javax.xml.ws.RespectBindingFeature;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ResourceLoaderAdapter;
@@ -258,7 +257,6 @@
processSOAPBinding(epMetaData, wsClass);
// process config, this will as well setup the handler
- processEndpointConfig(epMetaData, wsClass);
epMetaData.initEndpointConfig();
// Process @WebMethod
@@ -283,18 +281,4 @@
if (log.isDebugEnabled())
log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
}
-
- /**
- * Process config contribution through service endpoint interfaces
- * @param epMetaData
- * @param wsClass - the service endpoint interface
- */
- private void processEndpointConfig(EndpointMetaData epMetaData, Class<?> wsClass)
- {
- if (wsClass.isAnnotationPresent(EndpointConfig.class))
- {
- EndpointConfig anConfig = wsClass.getAnnotation(EndpointConfig.class);
- epMetaData.setConfigName(anConfig.configName(), anConfig.configFile());
- }
- }
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -57,7 +57,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
@@ -74,7 +73,6 @@
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
@@ -87,7 +85,6 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
import org.jboss.ws.metadata.wsdl.WSDLMIMEPart;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaDataParser;
@@ -886,16 +883,7 @@
JAXBContextFactory factory = JAXBContextFactory.newInstance();
- // JAXBIntros may mofiy the WSDL being generated
- // only true for server side invocation, tooling (WSProvide) doesnt support this
- BindingCustomization bindingCustomization = null;
- if (epMetaData instanceof ServerEndpointMetaData)
- {
- Endpoint endpoint = ((ServerEndpointMetaData)epMetaData).getEndpoint();
- bindingCustomization = endpoint != null ? endpoint.getAttachment(BindingCustomization.class) : null;
- }
-
- jaxbCtx = factory.createContext(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false, bindingCustomization);
+ jaxbCtx = factory.createContext(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false);
}
catch (WSException ex)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -142,9 +142,6 @@
// process config
processEndpointConfig(dep, sepMetaData, sepClass, linkName);
- // Set the endpoint address
- processWebContext(dep, sepClass, linkName, sepMetaData);
-
// Init the endpoint address
initEndpointAddress(dep, sepMetaData);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -21,17 +21,10 @@
*/
package org.jboss.ws.metadata.builder.jaxws;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
-
-import java.util.ResourceBundle;
-
import javax.jws.WebService;
import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.WebServiceProvider;
-import org.jboss.ws.api.annotation.EndpointConfig;
-import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -56,7 +49,6 @@
*/
public abstract class JAXWSServerMetaDataBuilder extends JAXWSMetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXWSServerMetaDataBuilder.class);
static void setupProviderOrWebService(ArchiveDeployment dep, UnifiedMetaData umd, Class<?> beanClass, String beanName) throws Exception
{
if (beanClass.isAnnotationPresent(WebService.class))
@@ -76,16 +68,6 @@
String configName = null;
String configFile = null;
- EndpointConfig anEndpointConfig = wsClass.getAnnotation(EndpointConfig.class);
- if (anEndpointConfig != null)
- {
- if (anEndpointConfig.configName().length() > 0)
- configName = anEndpointConfig.configName();
-
- if (anEndpointConfig.configFile().length() > 0)
- configFile = anEndpointConfig.configFile();
- }
-
JSEArchiveMetaData jseMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (jseMetaData != null)
{
@@ -108,78 +90,6 @@
sepMetaData.setConfigName(configName, configFile);
}
- protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
- {
- WebContext anWebContext = wsClass.getAnnotation(WebContext.class);
-
- if (anWebContext == null)
- return;
-
- boolean isJSEEndpoint = isJaxwsJseDeployment(dep);
-
- // context-root
- if (anWebContext.contextRoot().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "CONTEXTROOT_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String contextRoot = anWebContext.contextRoot();
- if (contextRoot.startsWith("/") == false)
- contextRoot = "/" + contextRoot;
-
- sepMetaData.setContextRoot(contextRoot);
- }
- }
-
- // url-pattern
- if (anWebContext.urlPattern().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "URLPATTERN_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String urlPattern = anWebContext.urlPattern();
- sepMetaData.setURLPattern(urlPattern);
- }
- }
-
- // auth-method
- if (anWebContext.authMethod().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "AUTHMETHOD_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String authMethod = anWebContext.authMethod();
- sepMetaData.setAuthMethod(authMethod);
- }
- }
-
- // transport-guarantee
- if (anWebContext.transportGuarantee().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "TRANSPORTGUARANTEE_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String transportGuarantee = anWebContext.transportGuarantee();
- sepMetaData.setTransportGuarantee(transportGuarantee);
- }
- }
-
- // secure wsdl access
- sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
- }
-
/**
* With JAX-WS the use of webservices.xml is optional since the annotations can be used
* to specify most of the information specified in this deployment descriptor file.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -128,9 +128,6 @@
JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
- // Note, that @WebContext needs to be defined on the endpoint not the SEI
- processWebContext(dep, sepClass, linkName, sepMetaData);
-
// setup handler chain from config
sepMetaData.initEndpointConfig();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -27,7 +27,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -41,7 +40,6 @@
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.bind.JAXBContext;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.ws.Service.Mode;
@@ -49,8 +47,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
@@ -149,8 +145,6 @@
private JAXBContextCache jaxbCache = new JAXBContextCache();
- private List<BindingCustomization> bindingCustomization = new ArrayList<BindingCustomization>();
-
EndpointMetaData()
{
}
@@ -334,11 +328,6 @@
return type;
}
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- return bindingCustomization;
- }
-
public String getAuthMethod()
{
return authMethod;
@@ -680,37 +669,10 @@
if ("true".equalsIgnoreCase(System.getProperty(Constants.EAGER_INITIALIZE_JAXB_CONTEXT_CACHE)))
{
log.debug("Initializing JAXBContext cache...");
- BindingCustomization bindingCustomization = null;
- if (this instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)this).getEndpoint().getAttachment(BindingCustomization.class);
- }
try
{
Class[] classes = getRegisteredTypes().toArray(new Class[0]);
- String defaultNS = portTypeName.getNamespaceURI();
- for (Class<?> clz : classes)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method method : clz.getMethods())
- {
- XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- JAXBContext context = JAXBContextFactory.newInstance().createContext(classes, bindingCustomization);
+ JAXBContext context = JAXBContextFactory.newInstance().createContext(classes);
jaxbCache.add(classes, context);
}
catch (Exception e)
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -1,482 +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.metadata.umdm;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.handler.PortInfo;
-
-import org.jboss.ws.core.jaxws.JAXBContextCache;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.core.soap.Use;
-import org.jboss.ws.metadata.config.Configurable;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.metadata.config.CommonConfig;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-
-/**
- * Feature aware client endpoint meta data adapter.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class FeatureAwareClientEndpointMetaDataAdapter extends ClientEndpointMetaData implements FeatureAwareEndpointMetaData
-{
-
- private final ClientEndpointMetaData delegee;
- private final Set<WebServiceFeature> features = new HashSet<WebServiceFeature>();
-
- public FeatureAwareClientEndpointMetaDataAdapter(final ClientEndpointMetaData delegee)
- {
- this.delegee = delegee;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- for (WebServiceFeature feature : this.features)
- {
- if (key == feature.getClass())
- {
- return (T)feature;
- }
- }
-
- return this.delegee.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.features.add(feature);
- }
-
- @Override
- public FeatureSet getFeatures()
- {
- final FeatureSet retVal = this.delegee.getFeatures();
-
- for (WebServiceFeature feature : this.features)
- {
- retVal.addFeature(feature);
- }
-
- return retVal;
- }
-
- @Override
- public void addFeature(WebServiceFeature feature)
- {
- this.setFeature(feature);
- }
-
- @Override
- public <T extends WebServiceFeature> boolean isFeatureEnabled(final Class<T> key)
- {
- final T feature = this.getFeature(key);
-
- return (feature != null ? feature.isEnabled() : false);
- }
-
- // ********************************************
- // just delegate to non feature related methods
- // ********************************************
-
- @Override
- public EndpointConfigMetaData createEndpointConfigMetaData(String configName, String configFile)
- {
- return this.delegee.createEndpointConfigMetaData(configName, configFile);
- }
-
- @Override
- public String getEndpointAddress()
- {
- return this.delegee.getEndpointAddress();
- }
-
- @Override
- public PortInfo getPortInfo()
- {
- return this.delegee.getPortInfo();
- }
-
- @Override
- public void setEndpointAddress(String endpointAddress)
- {
- this.delegee.setEndpointAddress(endpointAddress);
- }
-
- @Override
- public String toString()
- {
- return this.delegee.toString();
- }
-
- @Override
- public void addHandler(HandlerMetaData handler)
- {
- this.delegee.addHandler(handler);
- }
-
- @Override
- public void addHandlers(List<HandlerMetaData> configHandlers)
- {
- this.delegee.addHandlers(configHandlers);
- }
-
- @Override
- public void addOperation(OperationMetaData opMetaData)
- {
- this.delegee.addOperation(opMetaData);
- }
-
- @Override
- public void clearHandlers()
- {
- this.delegee.clearHandlers();
- }
-
- @Override
- public void clearOperations()
- {
- this.delegee.clearOperations();
- }
-
- @Override
- public void configure(Configurable configurable)
- {
- this.delegee.configure(configurable);
- }
-
- @Override
- public void eagerInitialize()
- {
- this.delegee.eagerInitialize();
- }
-
- @Override
- public String getAuthMethod()
- {
- return this.delegee.getAuthMethod();
- }
-
- @Override
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- return this.delegee.getBindingCustomizations();
- }
-
- @Override
- public String getBindingId()
- {
- return this.delegee.getBindingId();
- }
-
- @Override
- public ClassLoader getClassLoader()
- {
- return this.delegee.getClassLoader();
- }
-
- @Override
- public CommonConfig getConfig()
- {
- return this.delegee.getConfig();
- }
-
- @Override
- public String getConfigFile()
- {
- return this.delegee.getConfigFile();
- }
-
- @Override
- public String getConfigName()
- {
- return this.delegee.getConfigName();
- }
-
- @Override
- public Use getEncodingStyle()
- {
- return this.delegee.getEncodingStyle();
- }
-
- @Override
- public EndpointConfigMetaData getEndpointConfigMetaData()
- {
- return this.delegee.getEndpointConfigMetaData();
- }
-
- @Override
- public List<HandlerMetaData> getHandlerMetaData(HandlerType type)
- {
- return this.delegee.getHandlerMetaData(type);
- }
-
- @Override
- public JAXBContextCache getJaxbCache()
- {
- return this.delegee.getJaxbCache();
- }
-
- @Override
- public OperationMetaData getOperation(QName xmlName)
- {
- return this.delegee.getOperation(xmlName);
- }
-
- @Override
- public OperationMetaData getOperation(Method method)
- {
- return this.delegee.getOperation(method);
- }
-
- @Override
- public List<OperationMetaData> getOperations()
- {
- return this.delegee.getOperations();
- }
-
- @Override
- public ParameterStyle getParameterStyle()
- {
- return this.delegee.getParameterStyle();
- }
-
- @Override
- public QName getPortName()
- {
- return this.delegee.getPortName();
- }
-
- @Override
- public QName getPortTypeName()
- {
- return this.delegee.getPortTypeName();
- }
-
- @Override
- public Properties getProperties()
- {
- return this.delegee.getProperties();
- }
-
- @Override
- public List<Class> getRegisteredTypes()
- {
- return this.delegee.getRegisteredTypes();
- }
-
- @Override
- public UnifiedVirtualFile getRootFile()
- {
- return this.delegee.getRootFile();
- }
-
- @Override
- public Class getServiceEndpointInterface()
- {
- return this.delegee.getServiceEndpointInterface();
- }
-
- @Override
- public String getServiceEndpointInterfaceName()
- {
- return this.delegee.getServiceEndpointInterfaceName();
- }
-
- @Override
- public ServiceMetaData getServiceMetaData()
- {
- return this.delegee.getServiceMetaData();
- }
-
- @Override
- public Mode getServiceMode()
- {
- return this.delegee.getServiceMode();
- }
-
- @Override
- public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
- {
- return this.delegee.getServiceRefContrib();
- }
-
- @Override
- public Style getStyle()
- {
- return this.delegee.getStyle();
- }
-
- @Override
- public Type getType()
- {
- return this.delegee.getType();
- }
-
- @Override
- public void initEndpointConfig()
- {
- this.delegee.initEndpointConfig();
- }
-
- @Override
- public boolean isHandlersInitialized()
- {
- return this.delegee.isHandlersInitialized();
- }
-
- @Override
- public boolean matches(UnifiedPortComponentRefMetaData pcRef)
- {
- return this.delegee.matches(pcRef);
- }
-
- @Override
- public void registerConfigObserver(Configurable observer)
- {
- this.delegee.registerConfigObserver(observer);
- }
-
- @Override
- public void setAuthMethod(String authMethod)
- {
- this.delegee.setAuthMethod(authMethod);
- }
-
- @Override
- public void setBindingId(String bindingId)
- {
- this.delegee.setBindingId(bindingId);
- }
-
- @Override
- public void setConfigName(String configName)
- {
- this.delegee.setConfigName(configName);
- }
-
- @Override
- public void setConfigName(String configName, String configFile)
- {
- this.delegee.setConfigName(configName, configFile);
- }
-
- @Override
- public void setEncodingStyle(Use value)
- {
- this.delegee.setEncodingStyle(value);
- }
-
- @Override
- public void setHandlersInitialized(boolean flag)
- {
- this.delegee.setHandlersInitialized(flag);
- }
-
- @Override
- public void setParameterStyle(ParameterStyle value)
- {
- this.delegee.setParameterStyle(value);
- }
-
- @Override
- public void setPortName(QName portName)
- {
- this.delegee.setPortName(portName);
- }
-
- @Override
- public void setProperties(Properties properties)
- {
- this.delegee.setProperties(properties);
- }
-
- @Override
- public void setServiceEndpointInterfaceName(String seiName)
- {
- this.delegee.setServiceEndpointInterfaceName(seiName);
- }
-
- @Override
- public void setServiceMode(Mode serviceMode)
- {
- this.delegee.setServiceMode(serviceMode);
- }
-
- @Override
- public void setStyle(Style value)
- {
- this.delegee.setStyle(value);
- }
-
- @Override
- public void validate()
- {
- this.delegee.validate();
- }
-
- @Override
- public void addExtension(MetaDataExtension ext)
- {
- this.delegee.addExtension(ext);
- }
-
- @Override
- public MetaDataExtension getExtension(String namespace)
- {
- return this.delegee.getExtension(namespace);
- }
-
- @Override
- public Map<String, MetaDataExtension> getExtensions()
- {
- return this.delegee.getExtensions();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return this.delegee.equals(obj);
- }
-
- @Override
- public int hashCode()
- {
- return this.delegee.hashCode();
- }
-
-}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -1,35 +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.metadata.umdm;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Wrapper over endpoint meta data to enable feature overriding.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public interface FeatureAwareEndpointMetaData
-{
- void setFeature(WebServiceFeature feature);
- <T extends WebServiceFeature> T getFeature(Class<T> key);
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -21,16 +21,12 @@
*/
package org.jboss.ws.metadata.umdm;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
import java.util.ResourceBundle;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -200,21 +196,6 @@
endpoint.setAddress(endpointAddress);
}
- /**
- * Will be set through a deployment aspect
- * @return List<BindingCustomization> of available customizations
- */
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- List<BindingCustomization> list = new ArrayList<BindingCustomization>();
- for (Object att : endpoint.getAttachments())
- {
- if (att instanceof BindingCustomization)
- list.add((BindingCustomization)att);
- }
- return list;
- }
-
public String toString()
{
StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -33,7 +33,6 @@
import javax.xml.namespace.QName;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.addressing.AddressingConstants;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
@@ -347,7 +346,6 @@
protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
{
String prefix = wsdl.getPrefix(intf.getName().getNamespaceURI());
- String wsamPrefix = wsdl.getPrefix(AddressingConstants.Metadata.NS);
WSDLInterfaceOperation[] operations = intf.getSortedOperations();
for (int i = 0; i < operations.length; i++)
@@ -374,10 +372,6 @@
{
buffer.append("<input message='" + msgEl + "'>").append("</input>");
}
- else
- {
- buffer.append("<input message='" + msgEl + "' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + inputAction + "'/>");
- }
if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
{
@@ -386,10 +380,6 @@
{
buffer.append("<output message='" + msgEl + "Response'>").append("</output>");
}
- else
- {
- buffer.append("<output message='" + msgEl + "Response' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + outputAction + "'/>");
- }
}
//Append the Faults
@@ -402,12 +392,6 @@
buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
buffer.append("' name='" + element.getLocalPart() + "'/>");
}
- else
- {
- buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
- buffer.append("' name='" + element.getLocalPart() + "' ");
- buffer.append(wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + faultAction + "'/>");
- }
}
buffer.append("</operation>");
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-02 10:32:07 UTC (rev 16076)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-02 11:30:27 UTC (rev 16077)
@@ -65,7 +65,6 @@
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.jaxws.spi.http.AbstractNettyMessage;
import org.jboss.ws.core.server.MimeHeaderSource;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServletHeaderSource;
@@ -268,7 +267,6 @@
// Set servlet specific properties
HttpServletResponse httpResponse = null;
ServletHeaderSource headerSource = null;
- AbstractNettyMessage nettyMessage = this.getNettyHeadersSource(invContext);
if (invContext instanceof ServletRequestContext)
{
ServletRequestContext reqContext = (ServletRequestContext)invContext;
@@ -302,7 +300,7 @@
try
{
msgContext.setEndpointMetaData(sepMetaData);
- MessageAbstraction resMessage = processRequest(endpoint, nettyMessage == null ? headerSource : nettyMessage, invContext, inStream);
+ MessageAbstraction resMessage = processRequest(endpoint, headerSource, invContext, inStream);
CommonMessageContext reqMsgContext = msgContext;
// Replace the message context with the response context
msgContext = MessageContextAssociation.peekMessageContext();
@@ -323,10 +321,6 @@
{
httpResponse.setStatus(code.intValue());
}
- else if (nettyMessage != null)
- {
- nettyMessage.setStatus(code.intValue());
- }
}
boolean isFault = false;
@@ -349,10 +343,6 @@
{
httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
- else if (nettyMessage != null)
- {
- nettyMessage.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
}
}
@@ -377,11 +367,6 @@
}
}
- private AbstractNettyMessage getNettyHeadersSource(final InvocationContext invContext)
- {
- return (AbstractNettyMessage)invContext.getProperty(Constants.NETTY_MESSAGE);
- }
-
private void sendResponse(Endpoint endpoint, OutputStream output, boolean isFault) throws SOAPException, IOException
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
12 years, 9 months
JBossWS SVN: r16076 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/endorse and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-02 06:32:07 -0400 (Mon, 02 Apr 2012)
New Revision: 16076
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF-no-export
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/EndorseTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.java
Log:
[JBWS-3477] A bit of refactoring to the jbossws-cxf endorse testcase
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-02 10:29:21 UTC (rev 16075)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-02 10:32:07 UTC (rev 16076)
@@ -88,7 +88,17 @@
<include name="org/jboss/test/ws/jaxws/cxf/endorse/Helper.class"/>
</classes>
</war>
-
+
+ <!-- jaxws-cxf-endorse-no-export -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-endorse-no-export.war"
+ manifest="${tests.output.dir}/test-resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF-no-export"
+ webxml="${tests.output.dir}/test-resources/jaxws/cxf/endorse/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/endorse/Helper.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-cxf-endpoint -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-endpoint.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/endpoint/WEB-INF/web.xml">
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/EndorseTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/EndorseTestCase.java 2012-04-02 10:29:21 UTC (rev 16075)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/EndorseTestCase.java 2012-04-02 10:32:07 UTC (rev 16076)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -27,6 +27,7 @@
import junit.framework.Test;
+import org.jboss.wsf.stack.cxf.client.ProviderImpl;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
@@ -38,23 +39,29 @@
*/
public class EndorseTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-cxf-endorse";
-
public static Test suite()
{
- return new JBossWSCXFTestSetup(EndorseTestCase.class, "jaxws-cxf-endorse.war");
+ return new JBossWSCXFTestSetup(EndorseTestCase.class, "jaxws-cxf-endorse.war,jaxws-cxf-endorse-no-export.war");
}
public void testClientSide()
{
- Helper.verify();
+ Helper.verifyCXF();
}
public void testServerSide() throws Exception
{
- URL url = new URL(TARGET_ENDPOINT_ADDRESS + "?echo=HelloWorld");
+ runServerTest(new URL("http://" + getServerHost() + ":8080/jaxws-cxf-endorse?provider=" + ProviderImpl.class.getName()));
+ }
+
+ public void testServerSideNoExport() throws Exception
+ {
+ runServerTest(new URL("http://" + getServerHost() + ":8080/jaxws-cxf-endorse-no-export?provider=" + ProviderImpl.class.getName()));
+ }
+
+ private static void runServerTest(URL url) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String retStr = br.readLine();
- assertEquals("HelloWorld", retStr);
+ assertEquals("OK", retStr);
}
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java 2012-04-02 10:29:21 UTC (rev 16075)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java 2012-04-02 10:32:07 UTC (rev 16076)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -26,6 +26,7 @@
import javax.xml.ws.Service;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.spi.Provider;
import org.apache.cxf.BusFactory;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
@@ -38,7 +39,7 @@
*/
public class Helper
{
- public static void verify()
+ public static void verifyCXF()
{
//check BusFactory customization; this is required by the JBWS-CXF Configurer integration (HTTPConduit customization, JAXBIntros, ...)
BusFactory factory = BusFactory.newInstance();
@@ -62,4 +63,13 @@
}
return obj;
}
+
+ public static void verifyJaxWsSpiProvider(String expectedProviderClass)
+ {
+ Provider provider = Provider.provider();
+ String clazz = provider.getClass().getName();
+ if (!clazz.equals(expectedProviderClass)) {
+ throw new RuntimeException("Expected " + expectedProviderClass + " but got " + clazz);
+ }
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.java 2012-04-02 10:29:21 UTC (rev 16075)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.java 2012-04-02 10:32:07 UTC (rev 16076)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -41,8 +41,18 @@
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
- String inStr = req.getParameter("echo");
- Helper.verify();
- res.getWriter().print(inStr);
+ String expectedProvider = req.getParameter("provider");
+ StringBuilder out = new StringBuilder();
+ try {
+ Helper.verifyCXF();
+ Helper.verifyJaxWsSpiProvider(expectedProvider);
+ out.append("OK");
+ } catch (Throwable t) {
+ t.printStackTrace();
+ out.append(t.getClass().getName());
+ out.append(": ");
+ out.append(t.getMessage());
+ }
+ res.getWriter().print(out.toString());
}
}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF-no-export
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF-no-export (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF-no-export 2012-04-02 10:32:07 UTC (rev 16076)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services
\ No newline at end of file
12 years, 9 months
JBossWS SVN: r16075 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/ws/jaxws and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-02 06:29:21 -0400 (Mon, 02 Apr 2012)
New Revision: 16075
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/Helper.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/JaxWsSpiProviderTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/TestServlet.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/services/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/services/javax.xml.ws.spi.Provider
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3477] Adding testcase
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-02 03:38:19 UTC (rev 16074)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-02 10:29:21 UTC (rev 16075)
@@ -1160,6 +1160,26 @@
</webinf>
</war>
+ <!-- jaxws-jbws3437 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3477.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3477/TestServlet.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3477/Helper.class"/>
+ </classes>
+ </war>
+
+ <!-- jaxws-jbws3477-custom-provider -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3477-custom-provider.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3477/TestServlet.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3477/Helper.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3477/DummyProvider.class"/>
+ </classes>
+ <classes dir="${tests.output.dir}/test-resources/jaxws/jbws3477">
+ <include name="META-INF/services/*"/>
+ </classes>
+ </war>
+
<!-- jaxws-as3581 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-as3581.war" webxml="${tests.output.dir}/test-resources/jaxws/as3581/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/DummyProvider.java 2012-04-02 10:29:21 UTC (rev 16075)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3477;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.spi.ServiceDelegate;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import org.w3c.dom.Element;
+
+public class DummyProvider extends javax.xml.ws.spi.Provider
+{
+ @Override
+ public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Endpoint createEndpoint(String bindingId, Object implementor)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Endpoint createAndPublishEndpoint(String address, Object implementor)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public EndpointReference readEndpointReference(Source eprInfoset)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface,
+ WebServiceFeature... features)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName,
+ List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/Helper.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/Helper.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/Helper.java 2012-04-02 10:29:21 UTC (rev 16075)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3477;
+
+import javax.xml.ws.spi.Provider;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 02-Apr-2012
+ *
+ */
+public class Helper
+{
+ public static void verifyJaxWsSpiProvider(String expectedProviderClass)
+ {
+ Provider provider = Provider.provider();
+ String clazz = provider.getClass().getName();
+ if (!clazz.equals(expectedProviderClass)) {
+ throw new RuntimeException("Expected " + expectedProviderClass + " but got " + clazz);
+ }
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/JaxWsSpiProviderTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/JaxWsSpiProviderTestCase.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/JaxWsSpiProviderTestCase.java 2012-04-02 10:29:21 UTC (rev 16075)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3477;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test JAXWS Spi Provider customization on AS 7
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 02-Apr-2012
+ */
+public class JaxWsSpiProviderTestCase extends JBossWSTest
+{
+ private String defaultProvider;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JaxWsSpiProviderTestCase.class, "jaxws-jbws3477-custom-provider.war,jaxws-jbws3477.war");
+ }
+
+ protected void setUp() {
+ if (isIntegrationCXF()) {
+ defaultProvider = "org.jboss.wsf.stack.cxf.client.ProviderImpl";
+ }
+ else if (isIntegrationNative()) {
+ defaultProvider = "org.jboss.ws.core.jaxws.spi.ProviderImpl";
+ }
+ }
+
+ public void testClientSide()
+ {
+ Helper.verifyJaxWsSpiProvider(defaultProvider);
+ }
+
+ /**
+ * Checks the default JAXWS SPI Provider is used (on AS7 that's controlled by the jboss jaxws api, which internally loads org.jboss.ws.jaxws-client module)
+ *
+ * @throws Exception
+ */
+ public void testServerSideDefaultProvider() throws Exception
+ {
+ runServerTest(new URL("http://" + getServerHost() + ":8080/jaxws-jbws3477?provider=" + defaultProvider));
+ }
+
+ /**
+ * Checks the JAXWS SPI Provider implementation can be overridden on a per-application basis in AS7
+ *
+ * @throws Exception
+ */
+ public void testServerSideProviderCustomization() throws Exception
+ {
+ runServerTest(new URL("http://" + getServerHost() + ":8080/jaxws-jbws3477-custom-provider?provider=org.jboss.test.ws.jaxws.jbws3477.DummyProvider"));
+ }
+
+ private static void runServerTest(URL url) throws Exception {
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ String retStr = br.readLine();
+ assertEquals("OK", retStr);
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/TestServlet.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/TestServlet.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3477/TestServlet.java 2012-04-02 10:29:21 UTC (rev 16075)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3477;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 02-Apr-2012
+ *
+ */
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class TestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ String expectedProvider = req.getParameter("provider");
+ StringBuilder out = new StringBuilder();
+ try {
+ Helper.verifyJaxWsSpiProvider(expectedProvider);
+ out.append("OK");
+ } catch (Throwable t) {
+ t.printStackTrace();
+ out.append(t.getClass().getName());
+ out.append(": ");
+ out.append(t.getMessage());
+ }
+ res.getWriter().print(out.toString());
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/services/javax.xml.ws.spi.Provider
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/services/javax.xml.ws.spi.Provider (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3477/META-INF/services/javax.xml.ws.spi.Provider 2012-04-02 10:29:21 UTC (rev 16075)
@@ -0,0 +1 @@
+org.jboss.test.ws.jaxws.jbws3477.DummyProvider
\ No newline at end of file
12 years, 9 months