JBossWS SVN: r9929 - in container/jboss50/branches: jboss501/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-30 06:22:02 -0400 (Thu, 30 Apr 2009)
New Revision: 9929
Modified:
container/jboss50/branches/jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java
container/jboss50/branches/jboss501/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java
Log:
[JBWS-2074] improving SPI API
Modified: container/jboss50/branches/jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java 2009-04-30 10:17:18 UTC (rev 9928)
+++ container/jboss50/branches/jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java 2009-04-30 10:22:02 UTC (rev 9929)
@@ -29,7 +29,6 @@
import javax.jws.WebService;
import javax.naming.Context;
-import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.ws.WebServiceProvider;
@@ -58,64 +57,62 @@
{
private static final String EJB3_JNDI_PREFIX = "java:env/";
- private static final String POJO_JNDI_PREFIX = "java:comp/env/";
-
+
@Override
public void create(Deployment dep)
{
super.create(dep);
- JBossWebMetaData webMD = dep.getAttachment(JBossWebMetaData.class);
- if (webMD == null)
- throw new IllegalStateException("JBossWebMetaData not found");
-
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit == null)
- throw new IllegalStateException("DeploymentUnit not found");
-
List<InjectionMetaData> injectionMD = new LinkedList<InjectionMetaData>();
DeploymentType deploymentType = dep.getType();
- if (deploymentType == DeploymentType.JAXWS_JSE)
+ try
{
- injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
- try
+ if (deploymentType == DeploymentType.JAXWS_JSE)
{
- final Context ctx = new InitialContext();
+ JBossWebMetaData webMD = dep.getAttachment(JBossWebMetaData.class);
+ if (webMD == null)
+ throw new IllegalStateException("JBossWebMetaData not found");
+
+ injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
for (Endpoint endpoint : dep.getService().getEndpoints())
{
- InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx, POJO_JNDI_PREFIX);
+ InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, null);
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
- catch (NamingException ne)
+ else if (deploymentType == DeploymentType.JAXWS_EJB3)
{
- throw new RuntimeException(ne);
- }
- }
- else if (deploymentType == DeploymentType.JAXWS_EJB3)
- {
- JBossMetaData jbossMD = unit.getAttachment(JBossMetaData.class);
- JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
-
- WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
-
- Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
- while (it.hasNext())
- {
- WebServiceDeclaration container = it.next();
- if (isWebServiceBean(container))
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit == null)
+ throw new IllegalStateException("DeploymentUnit not found");
+
+ JBossMetaData jbossMD = unit.getAttachment(JBossMetaData.class);
+ JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
+
+ WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
+
+ Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
+ while (it.hasNext())
{
- Context ctx = container.getContext();
- String ejbName = container.getComponentName();
- EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
- injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
- Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
- InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx, EJB3_JNDI_PREFIX);
- endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+ WebServiceDeclaration container = it.next();
+ if (isWebServiceBean(container))
+ {
+ final Context ctx = (Context)container.getContext().lookup(EJB3_JNDI_PREFIX);
+ String ejbName = container.getComponentName();
+ EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
+ injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
+ Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
+ InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx);
+ endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+ }
}
}
}
+ catch (NamingException ne)
+ {
+ throw new RuntimeException(ne);
+ }
}
@Override
@@ -125,14 +122,14 @@
super.destroy(dep);
}
-
+
private List<InjectionMetaData> buildInjectionMetaData(EnvironmentEntriesMetaData envEntries)
{
if ((envEntries == null) || (envEntries.size() == 0))
{
return Collections.emptyList();
}
-
+
EnvironmentEntryMetaData eeMD = null;
LinkedList<InjectionMetaData> retVal = new LinkedList<InjectionMetaData>();
String envEntryName = null;
@@ -140,7 +137,7 @@
String targetClass = null;
String targetName = null;
String valueClass = null;
-
+
for (Iterator<EnvironmentEntryMetaData> i = envEntries.iterator(); i.hasNext();)
{
eeMD = i.next();
@@ -161,7 +158,7 @@
}
}
}
-
+
return retVal;
}
@@ -169,7 +166,7 @@
{
boolean isWebService = container.getAnnotation(WebService.class) != null;
boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
-
+
return isWebService || isWebServiceProvider;
}
Modified: container/jboss50/branches/jboss501/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jboss501/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java 2009-04-30 10:17:18 UTC (rev 9928)
+++ container/jboss50/branches/jboss501/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/InjectionMetaDataDeploymentAspect.java 2009-04-30 10:22:02 UTC (rev 9929)
@@ -29,7 +29,6 @@
import javax.jws.WebService;
import javax.naming.Context;
-import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.ws.WebServiceProvider;
@@ -58,64 +57,62 @@
{
private static final String EJB3_JNDI_PREFIX = "java:env/";
- private static final String POJO_JNDI_PREFIX = "java:comp/env/";
-
+
@Override
public void create(Deployment dep)
{
super.create(dep);
- JBossWebMetaData webMD = dep.getAttachment(JBossWebMetaData.class);
- if (webMD == null)
- throw new IllegalStateException("JBossWebMetaData not found");
-
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit == null)
- throw new IllegalStateException("DeploymentUnit not found");
-
List<InjectionMetaData> injectionMD = new LinkedList<InjectionMetaData>();
DeploymentType deploymentType = dep.getType();
- if (deploymentType == DeploymentType.JAXWS_JSE)
+ try
{
- injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
- try
+ if (deploymentType == DeploymentType.JAXWS_JSE)
{
- final Context ctx = new InitialContext();
+ JBossWebMetaData webMD = dep.getAttachment(JBossWebMetaData.class);
+ if (webMD == null)
+ throw new IllegalStateException("JBossWebMetaData not found");
+
+ injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
for (Endpoint endpoint : dep.getService().getEndpoints())
{
- InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx, POJO_JNDI_PREFIX);
+ InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, null);
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
- catch (NamingException ne)
+ else if (deploymentType == DeploymentType.JAXWS_EJB3)
{
- throw new RuntimeException(ne);
- }
- }
- else if (deploymentType == DeploymentType.JAXWS_EJB3)
- {
- JBossMetaData jbossMD = unit.getAttachment(JBossMetaData.class);
- JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
-
- WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
-
- Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
- while (it.hasNext())
- {
- WebServiceDeclaration container = it.next();
- if (isWebServiceBean(container))
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit == null)
+ throw new IllegalStateException("DeploymentUnit not found");
+
+ JBossMetaData jbossMD = unit.getAttachment(JBossMetaData.class);
+ JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
+
+ WebServiceDeployment webServiceDeployment = unit.getAttachment(WebServiceDeployment.class);
+
+ Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
+ while (it.hasNext())
{
- Context ctx = container.getContext();
- String ejbName = container.getComponentName();
- EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
- injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
- Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
- InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx, EJB3_JNDI_PREFIX);
- endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+ WebServiceDeclaration container = it.next();
+ if (isWebServiceBean(container))
+ {
+ final Context ctx = (Context)container.getContext().lookup(EJB3_JNDI_PREFIX);
+ String ejbName = container.getComponentName();
+ EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
+ injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
+ Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
+ InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, ctx);
+ endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+ }
}
}
}
+ catch (NamingException ne)
+ {
+ throw new RuntimeException(ne);
+ }
}
@Override
@@ -125,14 +122,14 @@
super.destroy(dep);
}
-
+
private List<InjectionMetaData> buildInjectionMetaData(EnvironmentEntriesMetaData envEntries)
{
if ((envEntries == null) || (envEntries.size() == 0))
{
return Collections.emptyList();
}
-
+
EnvironmentEntryMetaData eeMD = null;
LinkedList<InjectionMetaData> retVal = new LinkedList<InjectionMetaData>();
String envEntryName = null;
@@ -140,7 +137,7 @@
String targetClass = null;
String targetName = null;
String valueClass = null;
-
+
for (Iterator<EnvironmentEntryMetaData> i = envEntries.iterator(); i.hasNext();)
{
eeMD = i.next();
@@ -161,7 +158,7 @@
}
}
}
-
+
return retVal;
}
@@ -169,7 +166,7 @@
{
boolean isWebService = container.getAnnotation(WebService.class) != null;
boolean isWebServiceProvider = container.getAnnotation(WebServiceProvider.class) != null;
-
+
return isWebService || isWebServiceProvider;
}
15 years, 8 months
JBossWS SVN: r9928 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-30 06:17:18 -0400 (Thu, 30 Apr 2009)
New Revision: 9928
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanIface.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOIface.java
framework/trunk/testsuite/test/resources/jaxws/jbws2634/
framework/trunk/testsuite/test/resources/jaxws/jbws2634/META-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2634/META-INF/application.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2634/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2634/WEB-INF/web.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2634] providing initial test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-04-30 10:14:43 UTC (rev 9927)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-04-30 10:17:18 UTC (rev 9928)
@@ -729,6 +729,25 @@
</webinf>
</war>
+ <!-- jaxws-jbws2634 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2634.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2634/shared/*.class"/>
+ </fileset>
+ </jar>
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2634.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/jbws2634/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2634/webservice/POJOBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2634/webservice/POJOIface.class"/>
+ </classes>
+ </war>
+ <ear appxml="${tests.output.dir}/test-resources/jaxws/jbws2634/META-INF/application.xml"
+ earfile="${tests.output.dir}/test-libs/jaxws-jbws2634.ear">
+ <fileset file="${tests.output.dir}/test-libs/jaxws-jbws2634.jar"/>
+ <fileset file="${tests.output.dir}/test-libs/jaxws-jbws2634.war"/>
+ </ear>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war" webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2634;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.jbws2634.webservice.POJOIface;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2634] Implement support for @EJB annotations in WS components
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+public final class JBWS2634TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2634TestCase.class, "jaxws-jbws2634.ear");
+ }
+
+ public void testInjection() throws Exception
+ {
+ QName serviceName = new QName("http://jbossws.org/JBWS2634", "EndpointService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2634/Service?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ POJOIface proxy = (POJOIface)service.getPort(POJOIface.class);
+ assertEquals(proxy.getMessage(), "Injected hello message");
+
+ System.out.println("[JBWS-2634] test javax.ejb.EJB annotation defaults as well, see POJOBean");
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanIface.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanIface.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanIface.java 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2634.shared;
+
+/**
+ * The EJB3 interface
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+public interface BeanIface
+{
+ String printString();
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/shared/BeanImpl.java 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2634.shared;
+
+import javax.ejb.Stateless;
+
+/**
+ * The EJB3 implementation
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+@Stateless
+public class BeanImpl implements BeanIface
+{
+ public String printString()
+ {
+ return "Injected hello message";
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOBean.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOBean.java 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2634.webservice;
+
+import javax.ejb.EJB;
+import javax.jws.WebService;
+
+import org.jboss.test.ws.jaxws.jbws2634.shared.BeanIface;
+
+/**
+ * POJO bean published as WebService injecting other EJB3 bean
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+@WebService
+(
+ serviceName = "EndpointService",
+ targetNamespace = "http://jbossws.org/JBWS2634",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws2634.webservice.POJOIface"
+)
+public class POJOBean implements POJOIface
+{
+
+ // TODO: this should work without name attribute as well
+ @EJB(name = "jaxws-jbws2634/BeanImpl1/local-org.jboss.test.ws.jaxws.jbws2634.shared.BeanIface")
+ private BeanIface testBean;
+
+ public String getMessage()
+ {
+ return this.testBean.printString();
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOIface.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOIface.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2634/webservice/POJOIface.java 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2634.webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * A POJO endpoint interface
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+@WebService
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface POJOIface
+{
+ @WebMethod
+ String getMessage();
+}
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2634/META-INF/application.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2634/META-INF/application.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2634/META-INF/application.xml 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application
+ version="1.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+
+ <display-name>test</display-name>
+
+ <module>
+ <ejb>jaxws-jbws2634.jar</ejb>
+ </module>
+
+ <module>
+ <web>
+ <web-uri>jaxws-jbws2634.war</web-uri>
+ <context-root>/jaxws-jbws2634</context-root>
+ </web>
+ </module>
+
+</application>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2634/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2634/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2634/WEB-INF/web.xml 2009-04-30 10:17:18 UTC (rev 9928)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
+ version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>Service</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2634.webservice.POJOBean</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Service</servlet-name>
+ <url-pattern>/Service</url-pattern>
+ </servlet-mapping>
+
+</web-app>
15 years, 8 months
JBossWS SVN: r9927 - common/trunk/src/main/java/org/jboss/wsf/common/javax.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-30 06:14:43 -0400 (Thu, 30 Apr 2009)
New Revision: 9927
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java
Log:
[JBWS-2074][JBWS-2634] method javadoc
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java 2009-04-30 10:09:29 UTC (rev 9926)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java 2009-04-30 10:14:43 UTC (rev 9927)
@@ -73,13 +73,20 @@
}
/**
- * The Resource annotation marks a resource that is needed by the application. This annotation may be applied
+ * The resource annotations mark resources that are needed by the application. These annotations may be applied
* to an application component class, or to fields or methods of the component class. When the annotation is
* applied to a field or method, the container will inject an instance of the requested resource into the
* application component when the component is initialized. If the annotation is applied to the component class,
* the annotation declares a resource that the application will look up at runtime.
+ *
+ * This method handles the following injection types:
+ * <ul>
+ * <li>Descriptor specified injections</li>
+ * <li>@Resource annotated methods and fields</li>
+ * <li>@EJB annotated methods and fields</li>
+ * </ul>
*
- * @param instance to inject resource on
+ * @param instance to inject resources on
* @param injections injections metadata
* @throws Exception if some error occurs
*/
15 years, 8 months
JBossWS SVN: r9926 - in common/trunk: src/main/java/org/jboss/wsf/common/javax and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-30 06:09:29 -0400 (Thu, 30 Apr 2009)
New Revision: 9926
Added:
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBFieldFinder.java
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBMethodFinder.java
Modified:
common/trunk/pom.xml
common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/InjectionFieldFinder.java
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ReflectionUtils.java
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceFieldFinder.java
common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceMethodFinder.java
Log:
[JBWS-2074][JBWS-2634] improving SPI API + adding initial support for EJB injections
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/pom.xml 2009-04-30 10:09:29 UTC (rev 9926)
@@ -48,7 +48,14 @@
<version>2.1</version>
<scope>provided</scope>
</dependency>
-
+
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <version>3.0</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- jboss provided -->
<dependency>
<groupId>org.jboss</groupId>
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/JavaxAnnotationHelper.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -26,10 +26,14 @@
import java.util.Collection;
import javax.annotation.Resource;
+import javax.ejb.EJB;
import javax.naming.Context;
+import javax.naming.InitialContext;
import javax.xml.ws.WebServiceContext;
import org.jboss.logging.Logger;
+import org.jboss.wsf.common.javax.finders.EJBFieldFinder;
+import org.jboss.wsf.common.javax.finders.EJBMethodFinder;
import org.jboss.wsf.common.javax.finders.InjectionFieldFinder;
import org.jboss.wsf.common.javax.finders.InjectionMethodFinder;
import org.jboss.wsf.common.javax.finders.PostConstructMethodFinder;
@@ -41,18 +45,22 @@
import org.jboss.wsf.spi.metadata.injection.InjectionsMetaData;
/**
- * A helper class for <b>javax.annotation</b> annotations.
+ * An injection helper class for <b>javax.*</b> annotations.
*
- * @author ropalka(a)redhat.com
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
*/
public final class JavaxAnnotationHelper
{
private static final Logger LOG = Logger.getLogger(JavaxAnnotationHelper.class);
+ private static final String POJO_JNDI_PREFIX = "java:comp/env/";
+
private static final ClassProcessor<Method> POST_CONSTRUCT_METHOD_FINDER = new PostConstructMethodFinder();
private static final ClassProcessor<Method> PRE_DESTROY_METHOD_FINDER = new PreDestroyMethodFinder();
private static final ClassProcessor<Method> RESOURCE_METHOD_FINDER = new ResourceMethodFinder(WebServiceContext.class, false);
private static final ClassProcessor<Field> RESOURCE_FIELD_FINDER = new ResourceFieldFinder(WebServiceContext.class, false);
+ private static final ClassProcessor<Method> EJB_METHOD_FINDER = new EJBMethodFinder();
+ private static final ClassProcessor<Field> EJB_FIELD_FINDER = new EJBFieldFinder();
private static final ClassProcessor<Method> WEB_SERVICE_CONTEXT_METHOD_FINDER = new ResourceMethodFinder(WebServiceContext.class, true);
private static final ClassProcessor<Field> WEB_SERVICE_CONTEXT_FIELD_FINDER = new ResourceFieldFinder(WebServiceContext.class, true);
@@ -83,77 +91,159 @@
if (injections == null)
return;
- Class<?> instanceClass = instance.getClass();
+ // get JNDI context
+ Context ctx = injections.getContext();
+ if (ctx == null)
+ {
+ ctx = (Context)new InitialContext().lookup(POJO_JNDI_PREFIX);
+ }
// inject descriptor driven annotations
- final Context ctx = injections.getContext();
- final String envPrefix = injections.getContextRoot();
-
- Collection<InjectionMetaData> injectionMDs = injections.getInjectionsMetaData(instanceClass);
+ final Collection<InjectionMetaData> injectionMDs = injections.getInjectionsMetaData(instance.getClass());
for (InjectionMetaData injectionMD : injectionMDs)
{
- Method method = getMethod(injectionMD, instanceClass);
- if (method != null)
+ injectDescriptorDrivenInjections(instance, ctx, injectionMD);
+ }
+
+ // inject @Resource annotated methods and fields
+ injectResourceAnnotatedMethods(instance, ctx);
+ injectResourceAnnotatedFields(instance, ctx);
+
+ // inject @EJB annotated methods and fields
+ injectEJBAnnotatedMethods(instance, ctx);
+ injectEJBAnnotatedFields(instance, ctx);
+ }
+
+ /**
+ * Performs descriptor driven injections.
+ * @param instance to operate on
+ * @param ctx JNDI context
+ * @param envPrefix env prefix to be used
+ * @param injectionMD injections metadata
+ */
+ private static void injectDescriptorDrivenInjections(final Object instance, final Context ctx, final InjectionMetaData injectionMD)
+ {
+ Method method = getMethod(injectionMD, instance.getClass());
+ if (method != null)
+ {
+ try
{
+ inject(instance, method, injectionMD.getEnvEntryName(), ctx);
+ }
+ catch (Exception e)
+ {
+ LOG.error("Cannot inject method (descriptor driven injection): " + injectionMD, e);
+ }
+ }
+ else
+ {
+ Field field = getField(injectionMD, instance.getClass());
+ if (field != null)
+ {
try
{
- inject(instance, method, injectionMD.getEnvEntryName(), ctx, envPrefix);
+ inject(instance, field, injectionMD.getEnvEntryName(), ctx);
}
catch (Exception e)
{
- LOG.warn("Cannot inject method (descriptor driven injection): " + injectionMD, e);
+ LOG.error("Cannot inject field (descriptor driven injection): " + injectionMD, e);
}
}
else
{
- Field field = getField(injectionMD, instanceClass);
- if (field != null)
- {
- try
- {
- inject(instance, field, injectionMD.getEnvEntryName(), ctx, envPrefix);
- }
- catch (Exception e)
- {
- LOG.warn("Cannot inject field (descriptor driven injection): " + injectionMD, e);
- }
- }
- else
- {
- LOG.warn("Cannot find injection target for: " + injectionMD);
- }
+ LOG.error("Cannot find injection target for: " + injectionMD);
}
}
+ }
- // inject @Resource annotated methods
- Collection<Method> resourceAnnotatedMethods = RESOURCE_METHOD_FINDER.process(instanceClass);
+ /**
+ * Injects @Resource annotated fields
+ * @param instance to operate on
+ * @param ctx JNDI context
+ * @param envPrefix environment prefix to be used
+ */
+ private static void injectResourceAnnotatedFields(final Object instance, final Context ctx)
+ {
+ Collection<Field> resourceAnnotatedFields = RESOURCE_FIELD_FINDER.process(instance.getClass());
+ for (Field field : resourceAnnotatedFields)
+ {
+ try
+ {
+ inject(instance, field, field.getAnnotation(Resource.class).name(), ctx);
+ }
+ catch (Exception e)
+ {
+ LOG.error("Cannot inject field annotated with @Resource annotation: " + field, e);
+ }
+ }
+ }
+
+ /**
+ * Injects @Resource annotated methods
+ * @param instance to operate on
+ * @param ctx JNDI context
+ * @param envPrefix environment prefix to be used
+ */
+ private static void injectResourceAnnotatedMethods(final Object instance, final Context ctx)
+ {
+ Collection<Method> resourceAnnotatedMethods = RESOURCE_METHOD_FINDER.process(instance.getClass());
for(Method method : resourceAnnotatedMethods)
{
try
{
- inject(instance, method, method.getAnnotation(Resource.class).name(), ctx, envPrefix);
+ inject(instance, method, method.getAnnotation(Resource.class).name(), ctx);
}
catch (Exception e)
{
- LOG.warn("Cannot inject @Resource annotated method: " + method, e);
+ LOG.error("Cannot inject method annotated with @Resource annotation: " + method, e);
}
}
+ }
- // inject @Resource annotated fields
- Collection<Field> resourceAnnotatedFields = RESOURCE_FIELD_FINDER.process(instanceClass);
- for (Field field : resourceAnnotatedFields)
+ /**
+ * Injects @EJB annotated fields
+ * @param instance to operate on
+ * @param ctx JNDI context
+ * @param envPrefix environment prefix to be used
+ */
+ private static void injectEJBAnnotatedFields(final Object instance, final Context ctx)
+ {
+ final Collection<Field> ejbAnnotatedFields = EJB_FIELD_FINDER.process(instance.getClass());
+ for (Field field : ejbAnnotatedFields)
{
try
{
- inject(instance, field, field.getAnnotation(Resource.class).name(), ctx, envPrefix);
+ inject(instance, field, field.getAnnotation(EJB.class).name(), ctx);
}
catch (Exception e)
{
- LOG.warn("Cannot inject @Resource annotated field: " + field, e);
+ LOG.error("Cannot inject field annotated with @EJB annotation: " + field, e);
}
}
}
+ /**
+ * Injects @EJB annotated methods
+ * @param instance to operate on
+ * @param ctx JNDI context
+ * @param envPrefix environment prefix to be used
+ */
+ private static void injectEJBAnnotatedMethods(final Object instance, final Context ctx)
+ {
+ final Collection<Method> ejbAnnotatedMethods = EJB_METHOD_FINDER.process(instance.getClass());
+ for(Method method : ejbAnnotatedMethods)
+ {
+ try
+ {
+ inject(instance, method, method.getAnnotation(EJB.class).name(), ctx);
+ }
+ catch (Exception e)
+ {
+ LOG.error("Cannot inject method annotated with @EJB annotation: " + method, e);
+ }
+ }
+ }
+
public static void injectWebServiceContext(final Object instance, final WebServiceContext ctx)
{
final Class<?> instanceClass = instance.getClass();
@@ -168,7 +258,7 @@
}
catch (Exception e)
{
- LOG.warn("Cannot inject @Resource annotated method: " + method, e);
+ LOG.error("Cannot inject @Resource annotated method: " + method, e);
}
}
@@ -182,7 +272,7 @@
}
catch (Exception e)
{
- LOG.warn("Cannot inject @Resource annotated field: " + field, e);
+ LOG.error("Cannot inject @Resource annotated field: " + field, e);
}
}
}
@@ -212,7 +302,7 @@
}
catch (Exception e)
{
- LOG.warn("Calling of @PostConstruct annotated method failed: " + method, e);
+ LOG.error("Calling of @PostConstruct annotated method failed: " + method, e);
}
}
}
@@ -242,7 +332,7 @@
}
catch (Exception e)
{
- LOG.warn("Calling of @PreDestroy annotated method failed: " + method, e);
+ LOG.error("Calling of @PreDestroy annotated method failed: " + method, e);
}
}
}
@@ -258,11 +348,11 @@
* @throws Exception if any error occurs
* @see org.jboss.wsf.common.javax.finders.ResourceMethodFinder
*/
- private static void inject(final Object instance, final Method method, final String resourceName, final Context ctx, final String envPrefix)
+ private static void inject(final Object instance, final Method method, final String resourceName, final Context ctx)
throws Exception
{
final String beanName = convertToBeanName(method.getName());
- final Object value = ctx.lookup(envPrefix + getName(resourceName, beanName));
+ final Object value = ctx.lookup(getName(resourceName, beanName));
LOG.debug("Injecting method: " + method);
invokeMethod(instance, method, new Object[] {value});
@@ -279,11 +369,11 @@
* @throws Exception if any error occurs
* @see org.jboss.wsf.common.javax.finders.ResourceFieldFinder
*/
- private static void inject(final Object instance, final Field field, final String resourceName, final Context ctx, final String envPrefix)
+ private static void inject(final Object instance, final Field field, final String resourceName, final Context ctx)
throws Exception
{
final String beanName = field.getName();
- final Object value = ctx.lookup(envPrefix + getName(resourceName, beanName));
+ final Object value = ctx.lookup(getName(resourceName, beanName));
LOG.debug("Injecting field: " + field);
setField(instance, field, value);
Added: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBFieldFinder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBFieldFinder.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBFieldFinder.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.common.javax.finders;
+
+import java.lang.reflect.Field;
+
+import javax.ejb.EJB;
+
+import org.jboss.wsf.common.reflection.AnnotatedFieldFinder;
+
+/**
+ * Field based EJB injection.
+ *
+ * @author ropalka(a)redhat.com
+ */
+public final class EJBFieldFinder
+extends AnnotatedFieldFinder<EJB>
+{
+
+ /**
+ * Constructor.
+ */
+ public EJBFieldFinder()
+ {
+ super(EJB.class);
+ }
+
+ @Override
+ public void validate(Field field)
+ {
+ super.validate(field);
+
+ // Ensure all method preconditions
+ Class<EJB> annotation = getAnnotation();
+ ReflectionUtils.assertNotVoidType(field, annotation);
+ ReflectionUtils.assertNotStatic(field, annotation);
+ ReflectionUtils.assertNotFinal(field, annotation);
+ ReflectionUtils.assertNotPrimitiveType(field, annotation);
+ }
+
+}
Added: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBMethodFinder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBMethodFinder.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/EJBMethodFinder.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.common.javax.finders;
+
+import java.lang.reflect.Method;
+
+import javax.ejb.EJB;
+
+import org.jboss.wsf.common.reflection.AnnotatedMethodFinder;
+
+/**
+ * Setter based EJB injection.
+ *
+ * @author ropalka(a)redhat.com
+ */
+public final class EJBMethodFinder
+extends AnnotatedMethodFinder<EJB>
+{
+
+ /**
+ * Constructor.
+ */
+ public EJBMethodFinder()
+ {
+ super(EJB.class);
+ }
+
+ @Override
+ public void validate(Method method)
+ {
+ super.validate(method);
+
+ // Ensure all method preconditions
+ Class<EJB> annotation = getAnnotation();
+ ReflectionUtils.assertVoidReturnType(method, annotation);
+ ReflectionUtils.assertOneParameter(method, annotation);
+ ReflectionUtils.assertNoPrimitiveParameters(method, annotation);
+ ReflectionUtils.assertValidSetterName(method, annotation);
+ ReflectionUtils.assertNoCheckedExceptionsAreThrown(method, annotation);
+ ReflectionUtils.assertNotStatic(method, annotation);
+ }
+
+}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/InjectionFieldFinder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/InjectionFieldFinder.java 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/InjectionFieldFinder.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -93,6 +93,7 @@
ReflectionUtils.assertNotVoidType(field);
ReflectionUtils.assertNotStatic(field);
+ ReflectionUtils.assertNotFinal(field);
ReflectionUtils.assertNotPrimitiveType(field);
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ReflectionUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ReflectionUtils.java 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ReflectionUtils.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -232,7 +232,7 @@
throw new RuntimeException("Field " + getAnnotationMessage(annotation) + "cannot be static: " + field);
}
}
-
+
/**
* Asserts field is not static.
*
@@ -244,6 +244,30 @@
}
/**
+ * Asserts field is not final.
+ *
+ * @param field to validate
+ * @param annotation annotation to propagate in exception message
+ */
+ public static void assertNotFinal(final Field field, Class<? extends Annotation> annotation)
+ {
+ if (Modifier.isFinal(field.getModifiers()))
+ {
+ throw new RuntimeException("Field " + getAnnotationMessage(annotation) + "cannot be final: " + field);
+ }
+ }
+
+ /**
+ * Asserts field is not final.
+ *
+ * @param field to validate
+ */
+ public static void assertNotFinal(final Field field)
+ {
+ assertNotFinal(field, null);
+ }
+
+ /**
* Asserts method have exactly one parameter.
*
* @param method to validate
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceFieldFinder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceFieldFinder.java 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceFieldFinder.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -30,7 +30,7 @@
import org.jboss.wsf.common.reflection.AnnotatedFieldFinder;
/**
- * Field based injection.
+ * Field based resource injection.
*
* To access a resource a developer declares a setter method and annotates it as being a
* resource reference. The name and type of resource maybe inferred by inspecting the
@@ -83,6 +83,7 @@
Class<Resource> annotation = getAnnotation();
ReflectionUtils.assertNotVoidType(field, annotation);
ReflectionUtils.assertNotStatic(field, annotation);
+ ReflectionUtils.assertNotFinal(field, annotation);
ReflectionUtils.assertNotPrimitiveType(field, annotation);
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceMethodFinder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceMethodFinder.java 2009-04-30 10:07:08 UTC (rev 9925)
+++ common/trunk/src/main/java/org/jboss/wsf/common/javax/finders/ResourceMethodFinder.java 2009-04-30 10:09:29 UTC (rev 9926)
@@ -29,7 +29,7 @@
import org.jboss.wsf.common.reflection.AnnotatedMethodFinder;
/**
- * Setter based injection.
+ * Setter based resource injection.
*
* To access a resource a developer declares a setter method and annotates it as being a
* resource reference. The name and type of resource maybe inferred by inspecting the
15 years, 8 months
JBossWS SVN: r9925 - spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-30 06:07:08 -0400 (Thu, 30 Apr 2009)
New Revision: 9925
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
Log:
[JBWS-2074] improving SPI API
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2009-04-30 08:36:09 UTC (rev 9924)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2009-04-30 10:07:08 UTC (rev 9925)
@@ -51,30 +51,20 @@
private final Context ctx;
/**
- * Environment context root.
- */
- private final String envCtx;
-
- /**
* Constructor.
*
* @param injections injection definitions list
* @param ctx JNDI context
*/
- public InjectionsMetaData(Collection<InjectionMetaData> injections, Context ctx, String envCtx)
+ public InjectionsMetaData(Collection<InjectionMetaData> injections, Context ctx)
{
super();
if (injections == null)
throw new IllegalArgumentException("injections metadata list cannot be null");
- if (ctx == null)
- throw new IllegalArgumentException("JNDI context cannot be null");
- if (envCtx == null)
- throw new IllegalArgumentException("Environment JNDI context name cannot be null");
this.injections = injections;
this.ctx = ctx;
- this.envCtx = envCtx;
}
/**
@@ -87,15 +77,6 @@
}
/**
- * Returns JNDI context root.
- * @return JNDI context root
- */
- public String getContextRoot()
- {
- return this.envCtx;
- }
-
- /**
* Returns all descriptor driven injections metadata for particular class.
*
* @param clazz class to return injection definitions for
15 years, 8 months
JBossWS SVN: r9924 - in stack: metro/trunk and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-04-30 04:36:09 -0400 (Thu, 30 Apr 2009)
New Revision: 9924
Modified:
stack/cxf/trunk/profiles.xml.example
stack/metro/trunk/profiles.xml.example
stack/native/trunk/profiles.xml.example
Log:
AS 5.1.0.CR1 released
Modified: stack/cxf/trunk/profiles.xml.example
===================================================================
--- stack/cxf/trunk/profiles.xml.example 2009-04-30 08:16:25 UTC (rev 9923)
+++ stack/cxf/trunk/profiles.xml.example 2009-04-30 08:36:09 UTC (rev 9924)
@@ -13,7 +13,7 @@
<properties>
<jboss500.home>/home/opalka/svn/jbossas/tags/JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA</jboss500.home>
<jboss501.home>/home/opalka/svn/jbossas/branches/Branch_5_0/build/output/jboss-5.0.1.GA</jboss501.home>
- <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.CR1</jboss510.home>
+ <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.GA</jboss510.home>
<jboss600.home>/home/opalka/svn/jbossas/trunk/build/output/jboss-6.0.0.Alpha1</jboss600.home>
</properties>
</profile>
Modified: stack/metro/trunk/profiles.xml.example
===================================================================
--- stack/metro/trunk/profiles.xml.example 2009-04-30 08:16:25 UTC (rev 9923)
+++ stack/metro/trunk/profiles.xml.example 2009-04-30 08:36:09 UTC (rev 9924)
@@ -13,7 +13,7 @@
<properties>
<jboss500.home>/home/opalka/svn/jbossas/tags/JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA</jboss500.home>
<jboss501.home>/home/opalka/svn/jbossas/branches/Branch_5_0/build/output/jboss-5.0.1.GA</jboss501.home>
- <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.Beta1</jboss510.home>
+ <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.GA</jboss510.home>
<jboss600.home>/home/opalka/svn/jbossas/trunk/build/output/jboss-6.0.0.Alpha1</jboss600.home>
</properties>
</profile>
Modified: stack/native/trunk/profiles.xml.example
===================================================================
--- stack/native/trunk/profiles.xml.example 2009-04-30 08:16:25 UTC (rev 9923)
+++ stack/native/trunk/profiles.xml.example 2009-04-30 08:36:09 UTC (rev 9924)
@@ -14,7 +14,7 @@
<java.jdk15.home>/usr/java/jdk1.5</java.jdk15.home>
<jboss500.home>/home/opalka/svn/jbossas/tags/JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA</jboss500.home>
<jboss501.home>/home/opalka/svn/jbossas/branches/Branch_5_0/build/output/jboss-5.0.1.GA</jboss501.home>
- <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.Beta1</jboss510.home>
+ <jboss510.home>/home/opalka/svn/jbossas/branches/Branch_5_x/build/output/jboss-5.1.0.GA</jboss510.home>
<jboss600.home>/home/opalka/svn/jbossas/trunk/build/output/jboss-6.0.0.Alpha1</jboss600.home>
</properties>
</profile>
15 years, 8 months
JBossWS SVN: r9922 - in stack/native/trunk: modules/core and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-04-29 14:01:05 -0400 (Wed, 29 Apr 2009)
New Revision: 9922
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/Constants.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java
stack/native/trunk/pom.xml
stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBWS-2618] Upgrade to xmlsec 1.4.2
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2009-04-29 10:58:27 UTC (rev 9921)
+++ stack/native/trunk/modules/core/pom.xml 2009-04-29 18:01:05 UTC (rev 9922)
@@ -161,7 +161,7 @@
<artifactId>wsdl4j</artifactId>
</dependency>
<dependency>
- <groupId>xml-security</groupId>
+ <groupId>org.apache</groupId>
<artifactId>xmlsec</artifactId>
</dependency>
<dependency>
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/Constants.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/Constants.java 2009-04-29 10:58:27 UTC (rev 9921)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/Constants.java 2009-04-29 18:01:05 UTC (rev 9922)
@@ -48,7 +48,7 @@
public static final String XML_ENCRYPTION_NS = EncryptionConstants.EncryptionSpecNS;
- public static final String XML_ENCRYPTION_PREFIX = "xenc";
+ public static final String XML_ENCRYPTION_PREFIX = "ds"; //xmlsec 1.4.2 requires this to be "ds" to correctly create KeyInfo elements
public static final String ID = "Id";
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java 2009-04-29 10:58:27 UTC (rev 9921)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/SecurityHeader.java 2009-04-29 18:01:05 UTC (rev 9922)
@@ -170,6 +170,7 @@
Element element = document.createElementNS(Constants.WSSE_NS, Constants.WSSE_HEADER);
Util.addNamespace(element, Constants.WSSE_PREFIX, Constants.WSSE_NS);
Util.addNamespace(element, Constants.WSU_PREFIX, Constants.WSU_NS);
+ Util.addNamespace(element, Constants.XML_ENCRYPTION_PREFIX, Constants.XML_SIGNATURE_NS);
if (timestamp != null)
element.appendChild(timestamp.getElement());
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-04-29 10:58:27 UTC (rev 9921)
+++ stack/native/trunk/pom.xml 2009-04-29 18:01:05 UTC (rev 9922)
@@ -76,7 +76,7 @@
<woodstox.version>3.2.6</woodstox.version>
<wscommons.policy.version>1.0</wscommons.policy.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
- <xmlsec.version>1.3.0</xmlsec.version>
+ <xmlsec.version>1.4.2</xmlsec.version>
<xalan.version>2.7.0</xalan.version>
<xerces.version>2.8.1</xerces.version>
</properties>
@@ -320,7 +320,7 @@
<version>${xerces.version}</version>
</dependency>
<dependency>
- <groupId>xml-security</groupId>
+ <groupId>org.apache</groupId>
<artifactId>xmlsec</artifactId>
<version>${xmlsec.version}</version>
</dependency>
Modified: stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-04-29 10:58:27 UTC (rev 9921)
+++ stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2009-04-29 18:01:05 UTC (rev 9922)
@@ -51,7 +51,7 @@
<include>org.jvnet.staxex:stax-ex:jar</include>
<include>com.sun.xml.stream.buffer:streambuffer:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
- <include>xml-security:xmlsec:jar</include>
+ <include>org.apache:xmlsec:jar</include>
</includes>
</dependencySet>
<dependencySet>
15 years, 8 months
JBossWS SVN: r9921 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: src/main/java/org/jboss/ws/core/utils and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-29 06:58:27 -0400 (Wed, 29 Apr 2009)
New Revision: 9921
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/utils/DocumentBuilderFactoryImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
Log:
[JBWS-1582][JBPAPP-1961] backport - svn merge -r 9918:9919 https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws-native-...
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2009-04-29 10:51:00 UTC (rev 9920)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -310,6 +310,26 @@
</metainf>
</jar>
+ <!-- jaxws-jbws1582 -->
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1582.war" webxml="${tests.output.dir}/resources/jaxws/jbws1582/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1582/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/jbws1582/WEB-INF">
+ <include name="wsdl/service.wsdl"/>
+ </webinf>
+ </war>
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1582-attacked.war" webxml="${tests.output.dir}/resources/jaxws/jbws1582/WEB-INF/attack-web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1582/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/jbws1582/WEB-INF">
+ <include name="wsdl/attack-service.wsdl"/>
+ </webinf>
+ </war>
+
<!-- jaxws-jbws2116-->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws2116.jar">
<fileset dir="${tests.output.dir}/classes">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/utils/DocumentBuilderFactoryImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/utils/DocumentBuilderFactoryImpl.java 2009-04-29 10:51:00 UTC (rev 9920)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/utils/DocumentBuilderFactoryImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -23,6 +23,7 @@
// $Id$
+import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -53,6 +54,7 @@
// namespace aware by default
delegate.setNamespaceAware(true);
+ delegate.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
}
catch (Exception ex)
{
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2009-04-29 10:51:00 UTC (rev 9920)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -45,6 +45,7 @@
import javax.management.MBeanServerFactory;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import javax.xml.XMLConstants;
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
@@ -522,6 +523,7 @@
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
+ factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
String[] notificationSchemas = es.getNotificationSchema();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2009-04-29 10:51:00 UTC (rev 9920)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -44,6 +44,7 @@
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLLocator;
import javax.wsdl.xml.WSDLReader;
+import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -2124,6 +2125,7 @@
try
{
+ factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver( new JBossWSEntityResolver() );
Document doc = builder.parse(inputSource);
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582 (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1582;
-
-import javax.jws.WebService;
-
-@WebService
-(
- portName = "EndpointPort",
- serviceName = "EndpointService",
- wsdlLocation = "WEB-INF/wsdl/attack-service.wsdl",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1582.Endpoint"
-)
-public class AttackedEndpointImpl
-{
- public String echo(String msg)
- {
- return msg;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/AttackedEndpointImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1582;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "EndpointPort",
+ serviceName = "EndpointService",
+ wsdlLocation = "WEB-INF/wsdl/attack-service.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1582.Endpoint"
+)
+public class AttackedEndpointImpl
+{
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1582;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@WebService (name="Endpoint")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface Endpoint
-{
- @WebMethod(operationName = "echoString", action = "urn:EchoString")
- String echo(String input);
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/Endpoint.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1582;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService (name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint
+{
+ @WebMethod(operationName = "echoString", action = "urn:EchoString")
+ String echo(String input);
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1582;
-
-import javax.jws.WebService;
-
-@WebService
-(
- portName = "EndpointPort",
- serviceName = "EndpointService",
- wsdlLocation = "WEB-INF/wsdl/service.wsdl",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1582.Endpoint"
-)
-public class EndpointImpl
-{
- public String echo(String msg)
- {
- return msg;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/EndpointImpl.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1582;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "EndpointPort",
+ serviceName = "EndpointService",
+ wsdlLocation = "WEB-INF/wsdl/service.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1582.Endpoint"
+)
+public class EndpointImpl
+{
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,137 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1582;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.common.IOUtils;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-1582] Protect JBossWS Against XML Attacks
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
- */
-public class JBWS1582TestCase extends JBossWSTest
-{
- private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-jbws1582/TestService";
- private String targetNS = "http://jbws1582.jaxws.ws.test.jboss.org/";
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1582TestCase.class, "jaxws-jbws1582.war");
- }
-
- public void testLegalAccess() throws Exception
- {
- URL wsdlURL = new URL(endpointURL + "?wsdl");
- QName serviceName = new QName(targetNS, "EndpointService");
-
- Service service = Service.create(wsdlURL, serviceName);
- Endpoint port = (Endpoint)service.getPort(Endpoint.class);
-
- Object retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
- }
-
- public void testSOAPMessage() throws Exception
- {
- String response = getResponse("jaxws/jbws1582/message.xml");
- assertTrue(response.contains("HTTP/1.1 200 OK"));
- assertTrue(response.contains("<return>Hello</return>"));
- }
-
- public void testSOAPMessageAttack() throws Exception
- {
- String response = getResponse("jaxws/jbws1582/attack-message.xml");
- assertTrue(response.contains("HTTP/1.1 500"));
- // There's a bug in xerces that is shipped with EAP 4.3.
- // NPE thrown from xerces can be solved with xerces upgrade.
- //assertTrue(response.contains("The parser has encountered more than"));
- //assertTrue(response.contains("entity expansions in this document"));
- }
-
- private String getResponse(String requestFile) throws Exception
- {
- final String CRNL = "\r\n";
- String content = getContent(new FileInputStream(new File("resources/" + requestFile)));
- Socket socket = new Socket();
- socket.connect(new InetSocketAddress(this.getServerHost(), 8080));
- OutputStream out = socket.getOutputStream();
-
- // send an HTTP request to the endpoint
- out.write(("POST /jaxws-jbws1582/TestService HTTP/1.0" + CRNL).getBytes());
- out.write(("Host: " + this.getServerHost() + ":8080" + CRNL).getBytes());
- out.write(("Content-Type: text/xml" + CRNL).getBytes());
- out.write(("Content-Length: " + content.length() + CRNL).getBytes());
- out.write((CRNL).getBytes());
- out.write((content).getBytes());
-
- // read the response
- String response = getContent(socket.getInputStream());
- socket.close();
- System.out.println("---");
- System.out.println(response);
- System.out.println("---");
- return response;
- }
-
- public void testAttackedArchiveDeployment() throws Exception
- {
- try
- {
- this.deploy("jaxws-jbws1582-attacked.war");
- fail("deployment failure expected");
- }
- catch (Exception e)
- {
- e.printStackTrace();
- log.warn(e.getMessage(), e);
- }
- finally
- {
- this.undeploy("jaxws-jbws1582-attacked.war");
- }
- }
-
- private static String getContent(InputStream is) throws IOException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- IOUtils.copyStream(baos, is);
- return new String(baos.toByteArray());
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1582/JBWS1582TestCase.java 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1582;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-1582] Protect JBossWS Against XML Attacks
+ *
+ * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
+ */
+public class JBWS1582TestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-jbws1582/TestService";
+ private String targetNS = "http://jbws1582.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1582TestCase.class, "jaxws-jbws1582.war");
+ }
+
+ public void testLegalAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "EndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+
+ public void testSOAPMessage() throws Exception
+ {
+ String response = getResponse("jaxws/jbws1582/message.xml");
+ assertTrue(response.contains("HTTP/1.1 200 OK"));
+ assertTrue(response.contains("<return>Hello</return>"));
+ }
+
+ public void testSOAPMessageAttack() throws Exception
+ {
+ String response = getResponse("jaxws/jbws1582/attack-message.xml");
+ assertTrue(response.contains("HTTP/1.1 500"));
+ // There's a bug in xerces that is shipped with EAP 4.3.
+ // NPE thrown from xerces can be solved with xerces upgrade.
+ //assertTrue(response.contains("The parser has encountered more than"));
+ //assertTrue(response.contains("entity expansions in this document"));
+ }
+
+ private String getResponse(String requestFile) throws Exception
+ {
+ final String CRNL = "\r\n";
+ String content = getContent(new FileInputStream(new File("resources/" + requestFile)));
+ Socket socket = new Socket();
+ socket.connect(new InetSocketAddress(this.getServerHost(), 8080));
+ OutputStream out = socket.getOutputStream();
+
+ // send an HTTP request to the endpoint
+ out.write(("POST /jaxws-jbws1582/TestService HTTP/1.0" + CRNL).getBytes());
+ out.write(("Host: " + this.getServerHost() + ":8080" + CRNL).getBytes());
+ out.write(("Content-Type: text/xml" + CRNL).getBytes());
+ out.write(("Content-Length: " + content.length() + CRNL).getBytes());
+ out.write((CRNL).getBytes());
+ out.write((content).getBytes());
+
+ // read the response
+ String response = getContent(socket.getInputStream());
+ socket.close();
+ System.out.println("---");
+ System.out.println(response);
+ System.out.println("---");
+ return response;
+ }
+
+ public void testAttackedArchiveDeployment() throws Exception
+ {
+ try
+ {
+ this.deploy("jaxws-jbws1582-attacked.war");
+ fail("deployment failure expected");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ log.warn(e.getMessage(), e);
+ }
+ finally
+ {
+ this.undeploy("jaxws-jbws1582-attacked.war");
+ }
+ }
+
+ private static String getContent(InputStream is) throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, is);
+ return new String(baos.toByteArray());
+ }
+
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582 (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1582.AttackedEndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestService</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/attack-web.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1582.AttackedEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1582.EndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestService</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/web.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1582.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE definitions [
- <!ENTITY hello1 "Hello">
- <!ENTITY hello2 "&hello1; &hello1;">
- <!ENTITY hello3 "&hello2; &hello2;">
- <!ENTITY hello4 "&hello3; &hello3;">
- <!ENTITY hello5 "&hello4; &hello4;">
- <!ENTITY hello6 "&hello5; &hello5;">
- <!ENTITY hello7 "&hello6; &hello6;">
- <!ENTITY hello8 "&hello7; &hello7;">
- <!ENTITY hello9 "&hello8; &hello8;">
- <!ENTITY hello10 "&hello9; &hello9;">
-
- <!ENTITY hello11 "&hello10; &hello10;">
- <!ENTITY hello12 "&hello11; &hello11;">
- <!ENTITY hello13 "&hello12; &hello12;">
- <!ENTITY hello14 "&hello13; &hello13;">
- <!ENTITY hello15 "&hello14; &hello14;">
- <!ENTITY hello16 "&hello15; &hello15;">
- <!ENTITY hello17 "&hello16; &hello16;">
- <!ENTITY hello18 "&hello17; &hello17;">
- <!ENTITY hello19 "&hello18; &hello18;">
- <!ENTITY hello20 "&hello19; &hello19;">
-
- <!ENTITY hello21 "&hello20; &hello20;">
- <!ENTITY hello22 "&hello21; &hello21;">
- <!ENTITY hello23 "&hello22; &hello22;">
- <!ENTITY hello24 "&hello23; &hello23;">
- <!ENTITY hello25 "&hello24; &hello24;">
- <!ENTITY hello26 "&hello25; &hello25;">
- <!ENTITY hello27 "&hello26; &hello26;">
- <!ENTITY hello28 "&hello27; &hello27;">
- <!ENTITY hello29 "&hello28; &hello28;">
- <!ENTITY hello30 "&hello29; &hello29;">
-
- <!ENTITY hello31 "&hello30; &hello30;">
- <!ENTITY hello32 "&hello31; &hello31;">
- <!ENTITY hello33 "&hello32; &hello32;">
- <!ENTITY hello34 "&hello33; &hello33;">
- <!ENTITY hello35 "&hello34; &hello34;">
- <!ENTITY hello36 "&hello35; &hello35;">
- <!ENTITY hello37 "&hello36; &hello36;">
- <!ENTITY hello38 "&hello37; &hello37;">
- <!ENTITY hello39 "&hello38; &hello38;">
- <!ENTITY hello40 "&hello39; &hello39;">
-
- <!ENTITY hello41 "&hello40; &hello40;">
- <!ENTITY hello42 "&hello41; &hello41;">
- <!ENTITY hello43 "&hello42; &hello42;">
- <!ENTITY hello44 "&hello43; &hello43;">
- <!ENTITY hello45 "&hello44; &hello44;">
- <!ENTITY hello46 "&hello45; &hello45;">
- <!ENTITY hello47 "&hello46; &hello46;">
- <!ENTITY hello48 "&hello47; &hello47;">
- <!ENTITY hello49 "&hello48; &hello48;">
- <!ENTITY hello50 "&hello49; &hello49;">
-
- <!ENTITY hello51 "&hello50; &hello50;">
- <!ENTITY hello52 "&hello51; &hello51;">
- <!ENTITY hello53 "&hello52; &hello52;">
- <!ENTITY hello54 "&hello53; &hello53;">
- <!ENTITY hello55 "&hello54; &hello54;">
- <!ENTITY hello56 "&hello55; &hello55;">
- <!ENTITY hello57 "&hello56; &hello56;">
- <!ENTITY hello58 "&hello57; &hello57;">
- <!ENTITY hello59 "&hello58; &hello58;">
- <!ENTITY hello60 "&hello59; &hello59;">
-
- <!ENTITY hello61 "&hello60; &hello60;">
- <!ENTITY hello62 "&hello61; &hello61;">
- <!ENTITY hello63 "&hello62; &hello62;">
- <!ENTITY hello64 "&hello63; &hello63;">
- <!ENTITY hello65 "&hello64; &hello64;">
- <!ENTITY hello66 "&hello65; &hello65;">
- <!ENTITY hello67 "&hello66; &hello66;">
- <!ENTITY hello68 "&hello67; &hello67;">
- <!ENTITY hello69 "&hello68; &hello68;">
- <!ENTITY hello70 "&hello69; &hello69;">
-
- <!ENTITY hello71 "&hello70; &hello70;">
- <!ENTITY hello72 "&hello71; &hello71;">
- <!ENTITY hello73 "&hello72; &hello72;">
- <!ENTITY hello74 "&hello73; &hello73;">
- <!ENTITY hello75 "&hello74; &hello74;">
- <!ENTITY hello76 "&hello75; &hello75;">
- <!ENTITY hello77 "&hello76; &hello76;">
- <!ENTITY hello78 "&hello77; &hello77;">
- <!ENTITY hello79 "&hello78; &hello78;">
- <!ENTITY hello80 "&hello79; &hello79;">
-
- <!ENTITY hello81 "&hello80; &hello80;">
- <!ENTITY hello82 "&hello81; &hello81;">
- <!ENTITY hello83 "&hello82; &hello82;">
- <!ENTITY hello84 "&hello83; &hello83;">
- <!ENTITY hello85 "&hello84; &hello84;">
- <!ENTITY hello86 "&hello85; &hello85;">
- <!ENTITY hello87 "&hello86; &hello86;">
- <!ENTITY hello88 "&hello87; &hello87;">
- <!ENTITY hello89 "&hello88; &hello88;">
- <!ENTITY hello90 "&hello89; &hello89;">
-
- <!ENTITY hello91 "&hello90; &hello90;">
- <!ENTITY hello92 "&hello91; &hello91;">
- <!ENTITY hello93 "&hello92; &hello92;">
- <!ENTITY hello94 "&hello93; &hello93;">
- <!ENTITY hello95 "&hello94; &hello94;">
- <!ENTITY hello96 "&hello95; &hello95;">
- <!ENTITY hello97 "&hello96; &hello96;">
- <!ENTITY hello98 "&hello97; &hello97;">
- <!ENTITY hello99 "&hello98; &hello98;">
- <!ENTITY hello100 "&hello99; &hello99;">
-
- <!ENTITY hello101 "&hello100; &hello100;">
- <!ENTITY hello102 "&hello101; &hello101;">
- <!ENTITY hello103 "&hello102; &hello102;">
- <!ENTITY hello104 "&hello103; &hello103;">
- <!ENTITY hello105 "&hello104; &hello104;">
- <!ENTITY hello106 "&hello105; &hello105;">
- <!ENTITY hello107 "&hello106; &hello106;">
- <!ENTITY hello108 "&hello107; &hello107;">
- <!ENTITY hello109 "&hello108; &hello108;">
- <!ENTITY hello110 "&hello109; &hello109;">
-
- <!ENTITY hello111 "&hello110; &hello110;">
- <!ENTITY hello112 "&hello111; &hello111;">
- <!ENTITY hello113 "&hello112; &hello112;">
- <!ENTITY hello114 "&hello113; &hello113;">
- <!ENTITY hello115 "&hello114; &hello114;">
- <!ENTITY hello116 "&hello115; &hello115;">
- <!ENTITY hello117 "&hello116; &hello116;">
- <!ENTITY hello118 "&hello117; &hello117;">
- <!ENTITY hello119 "&hello118; &hello118;">
- <!ENTITY hello120 "&hello119; &hello119;">
-
- <!ENTITY hello121 "&hello120; &hello120;">
- <!ENTITY hello122 "&hello121; &hello121;">
- <!ENTITY hello123 "&hello122; &hello122;">
- <!ENTITY hello124 "&hello123; &hello123;">
- <!ENTITY hello125 "&hello124; &hello124;">
- <!ENTITY hello126 "&hello125; &hello125;">
- <!ENTITY hello127 "&hello126; &hello126;">
- <!ENTITY hello128 "&hello127; &hello127;">
-]>
-<definitions name="EndpointService" targetNamespace="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:tns="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- </types>
- <message name="Endpoint_echoString">
- <part name="arg0" type="xsd:string">
- </part>
- </message>
- <message name="Endpoint_echoStringResponse">
- <part name="return" type="xsd:string">
- </part>
- </message>
- <portType name="Endpoint">
- <operation name="echoString" parameterOrder="arg0">
- <input message="tns:Endpoint_echoString">
- </input>
- <output message="tns:Endpoint_echoStringResponse">
- </output>
- </operation>
- </portType>
- <binding name="EndpointBinding" type="tns:Endpoint">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="echoString">
- <soap:operation soapAction="urn:EchoString"/>
- <input>
- <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
- </input>
- <output>
- <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
- </output>
- </operation>
- </binding>
- <service name="EndpointService">
- <port name="EndpointPort" binding="tns:EndpointBinding">
- <soap:address location="&hello128;"/>
- </port>
- </service>
-</definitions>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/attack-service.wsdl 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE definitions [
+ <!ENTITY hello1 "Hello">
+ <!ENTITY hello2 "&hello1; &hello1;">
+ <!ENTITY hello3 "&hello2; &hello2;">
+ <!ENTITY hello4 "&hello3; &hello3;">
+ <!ENTITY hello5 "&hello4; &hello4;">
+ <!ENTITY hello6 "&hello5; &hello5;">
+ <!ENTITY hello7 "&hello6; &hello6;">
+ <!ENTITY hello8 "&hello7; &hello7;">
+ <!ENTITY hello9 "&hello8; &hello8;">
+ <!ENTITY hello10 "&hello9; &hello9;">
+
+ <!ENTITY hello11 "&hello10; &hello10;">
+ <!ENTITY hello12 "&hello11; &hello11;">
+ <!ENTITY hello13 "&hello12; &hello12;">
+ <!ENTITY hello14 "&hello13; &hello13;">
+ <!ENTITY hello15 "&hello14; &hello14;">
+ <!ENTITY hello16 "&hello15; &hello15;">
+ <!ENTITY hello17 "&hello16; &hello16;">
+ <!ENTITY hello18 "&hello17; &hello17;">
+ <!ENTITY hello19 "&hello18; &hello18;">
+ <!ENTITY hello20 "&hello19; &hello19;">
+
+ <!ENTITY hello21 "&hello20; &hello20;">
+ <!ENTITY hello22 "&hello21; &hello21;">
+ <!ENTITY hello23 "&hello22; &hello22;">
+ <!ENTITY hello24 "&hello23; &hello23;">
+ <!ENTITY hello25 "&hello24; &hello24;">
+ <!ENTITY hello26 "&hello25; &hello25;">
+ <!ENTITY hello27 "&hello26; &hello26;">
+ <!ENTITY hello28 "&hello27; &hello27;">
+ <!ENTITY hello29 "&hello28; &hello28;">
+ <!ENTITY hello30 "&hello29; &hello29;">
+
+ <!ENTITY hello31 "&hello30; &hello30;">
+ <!ENTITY hello32 "&hello31; &hello31;">
+ <!ENTITY hello33 "&hello32; &hello32;">
+ <!ENTITY hello34 "&hello33; &hello33;">
+ <!ENTITY hello35 "&hello34; &hello34;">
+ <!ENTITY hello36 "&hello35; &hello35;">
+ <!ENTITY hello37 "&hello36; &hello36;">
+ <!ENTITY hello38 "&hello37; &hello37;">
+ <!ENTITY hello39 "&hello38; &hello38;">
+ <!ENTITY hello40 "&hello39; &hello39;">
+
+ <!ENTITY hello41 "&hello40; &hello40;">
+ <!ENTITY hello42 "&hello41; &hello41;">
+ <!ENTITY hello43 "&hello42; &hello42;">
+ <!ENTITY hello44 "&hello43; &hello43;">
+ <!ENTITY hello45 "&hello44; &hello44;">
+ <!ENTITY hello46 "&hello45; &hello45;">
+ <!ENTITY hello47 "&hello46; &hello46;">
+ <!ENTITY hello48 "&hello47; &hello47;">
+ <!ENTITY hello49 "&hello48; &hello48;">
+ <!ENTITY hello50 "&hello49; &hello49;">
+
+ <!ENTITY hello51 "&hello50; &hello50;">
+ <!ENTITY hello52 "&hello51; &hello51;">
+ <!ENTITY hello53 "&hello52; &hello52;">
+ <!ENTITY hello54 "&hello53; &hello53;">
+ <!ENTITY hello55 "&hello54; &hello54;">
+ <!ENTITY hello56 "&hello55; &hello55;">
+ <!ENTITY hello57 "&hello56; &hello56;">
+ <!ENTITY hello58 "&hello57; &hello57;">
+ <!ENTITY hello59 "&hello58; &hello58;">
+ <!ENTITY hello60 "&hello59; &hello59;">
+
+ <!ENTITY hello61 "&hello60; &hello60;">
+ <!ENTITY hello62 "&hello61; &hello61;">
+ <!ENTITY hello63 "&hello62; &hello62;">
+ <!ENTITY hello64 "&hello63; &hello63;">
+ <!ENTITY hello65 "&hello64; &hello64;">
+ <!ENTITY hello66 "&hello65; &hello65;">
+ <!ENTITY hello67 "&hello66; &hello66;">
+ <!ENTITY hello68 "&hello67; &hello67;">
+ <!ENTITY hello69 "&hello68; &hello68;">
+ <!ENTITY hello70 "&hello69; &hello69;">
+
+ <!ENTITY hello71 "&hello70; &hello70;">
+ <!ENTITY hello72 "&hello71; &hello71;">
+ <!ENTITY hello73 "&hello72; &hello72;">
+ <!ENTITY hello74 "&hello73; &hello73;">
+ <!ENTITY hello75 "&hello74; &hello74;">
+ <!ENTITY hello76 "&hello75; &hello75;">
+ <!ENTITY hello77 "&hello76; &hello76;">
+ <!ENTITY hello78 "&hello77; &hello77;">
+ <!ENTITY hello79 "&hello78; &hello78;">
+ <!ENTITY hello80 "&hello79; &hello79;">
+
+ <!ENTITY hello81 "&hello80; &hello80;">
+ <!ENTITY hello82 "&hello81; &hello81;">
+ <!ENTITY hello83 "&hello82; &hello82;">
+ <!ENTITY hello84 "&hello83; &hello83;">
+ <!ENTITY hello85 "&hello84; &hello84;">
+ <!ENTITY hello86 "&hello85; &hello85;">
+ <!ENTITY hello87 "&hello86; &hello86;">
+ <!ENTITY hello88 "&hello87; &hello87;">
+ <!ENTITY hello89 "&hello88; &hello88;">
+ <!ENTITY hello90 "&hello89; &hello89;">
+
+ <!ENTITY hello91 "&hello90; &hello90;">
+ <!ENTITY hello92 "&hello91; &hello91;">
+ <!ENTITY hello93 "&hello92; &hello92;">
+ <!ENTITY hello94 "&hello93; &hello93;">
+ <!ENTITY hello95 "&hello94; &hello94;">
+ <!ENTITY hello96 "&hello95; &hello95;">
+ <!ENTITY hello97 "&hello96; &hello96;">
+ <!ENTITY hello98 "&hello97; &hello97;">
+ <!ENTITY hello99 "&hello98; &hello98;">
+ <!ENTITY hello100 "&hello99; &hello99;">
+
+ <!ENTITY hello101 "&hello100; &hello100;">
+ <!ENTITY hello102 "&hello101; &hello101;">
+ <!ENTITY hello103 "&hello102; &hello102;">
+ <!ENTITY hello104 "&hello103; &hello103;">
+ <!ENTITY hello105 "&hello104; &hello104;">
+ <!ENTITY hello106 "&hello105; &hello105;">
+ <!ENTITY hello107 "&hello106; &hello106;">
+ <!ENTITY hello108 "&hello107; &hello107;">
+ <!ENTITY hello109 "&hello108; &hello108;">
+ <!ENTITY hello110 "&hello109; &hello109;">
+
+ <!ENTITY hello111 "&hello110; &hello110;">
+ <!ENTITY hello112 "&hello111; &hello111;">
+ <!ENTITY hello113 "&hello112; &hello112;">
+ <!ENTITY hello114 "&hello113; &hello113;">
+ <!ENTITY hello115 "&hello114; &hello114;">
+ <!ENTITY hello116 "&hello115; &hello115;">
+ <!ENTITY hello117 "&hello116; &hello116;">
+ <!ENTITY hello118 "&hello117; &hello117;">
+ <!ENTITY hello119 "&hello118; &hello118;">
+ <!ENTITY hello120 "&hello119; &hello119;">
+
+ <!ENTITY hello121 "&hello120; &hello120;">
+ <!ENTITY hello122 "&hello121; &hello121;">
+ <!ENTITY hello123 "&hello122; &hello122;">
+ <!ENTITY hello124 "&hello123; &hello123;">
+ <!ENTITY hello125 "&hello124; &hello124;">
+ <!ENTITY hello126 "&hello125; &hello125;">
+ <!ENTITY hello127 "&hello126; &hello126;">
+ <!ENTITY hello128 "&hello127; &hello127;">
+]>
+<definitions name="EndpointService" targetNamespace="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:tns="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ </types>
+ <message name="Endpoint_echoString">
+ <part name="arg0" type="xsd:string">
+ </part>
+ </message>
+ <message name="Endpoint_echoStringResponse">
+ <part name="return" type="xsd:string">
+ </part>
+ </message>
+ <portType name="Endpoint">
+ <operation name="echoString" parameterOrder="arg0">
+ <input message="tns:Endpoint_echoString">
+ </input>
+ <output message="tns:Endpoint_echoStringResponse">
+ </output>
+ </operation>
+ </portType>
+ <binding name="EndpointBinding" type="tns:Endpoint">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="urn:EchoString"/>
+ <input>
+ <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="EndpointService">
+ <port name="EndpointPort" binding="tns:EndpointBinding">
+ <soap:address location="&hello128;"/>
+ </port>
+ </service>
+</definitions>
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name="EndpointService" targetNamespace="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:tns="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
- <types>
- </types>
- <message name="Endpoint_echoString">
- <part name="arg0" type="xsd:string">
- </part>
- </message>
- <message name="Endpoint_echoStringResponse">
- <part name="return" type="xsd:string">
- </part>
- </message>
- <portType name="Endpoint">
- <operation name="echoString" parameterOrder="arg0">
- <input message="tns:Endpoint_echoString">
- </input>
- <output message="tns:Endpoint_echoStringResponse">
- </output>
- </operation>
- </portType>
- <binding name="EndpointBinding" type="tns:Endpoint">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="echoString">
- <soap:operation soapAction="urn:EchoString"/>
- <input>
- <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
- </input>
- <output>
- <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
- </output>
- </operation>
- </binding>
- <service name="EndpointService">
- <port name="EndpointPort" binding="tns:EndpointBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/WEB-INF/wsdl/service.wsdl 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="EndpointService" targetNamespace="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:tns="http://jbws1582.jaxws.ws.test.jboss.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ </types>
+ <message name="Endpoint_echoString">
+ <part name="arg0" type="xsd:string">
+ </part>
+ </message>
+ <message name="Endpoint_echoStringResponse">
+ <part name="return" type="xsd:string">
+ </part>
+ </message>
+ <portType name="Endpoint">
+ <operation name="echoString" parameterOrder="arg0">
+ <input message="tns:Endpoint_echoString">
+ </input>
+ <output message="tns:Endpoint_echoStringResponse">
+ </output>
+ </operation>
+ </portType>
+ <binding name="EndpointBinding" type="tns:Endpoint">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="urn:EchoString"/>
+ <input>
+ <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://jbws1582.jaxws.ws.test.jboss.org/"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="EndpointService">
+ <port name="EndpointPort" binding="tns:EndpointBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/attack-message.xml 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,151 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE root [
- <!ENTITY hello1 "Hello">
- <!ENTITY hello2 "&hello1; &hello1;">
- <!ENTITY hello3 "&hello2; &hello2;">
- <!ENTITY hello4 "&hello3; &hello3;">
- <!ENTITY hello5 "&hello4; &hello4;">
- <!ENTITY hello6 "&hello5; &hello5;">
- <!ENTITY hello7 "&hello6; &hello6;">
- <!ENTITY hello8 "&hello7; &hello7;">
- <!ENTITY hello9 "&hello8; &hello8;">
- <!ENTITY hello10 "&hello9; &hello9;">
-
- <!ENTITY hello11 "&hello10; &hello10;">
- <!ENTITY hello12 "&hello11; &hello11;">
- <!ENTITY hello13 "&hello12; &hello12;">
- <!ENTITY hello14 "&hello13; &hello13;">
- <!ENTITY hello15 "&hello14; &hello14;">
- <!ENTITY hello16 "&hello15; &hello15;">
- <!ENTITY hello17 "&hello16; &hello16;">
- <!ENTITY hello18 "&hello17; &hello17;">
- <!ENTITY hello19 "&hello18; &hello18;">
- <!ENTITY hello20 "&hello19; &hello19;">
-
- <!ENTITY hello21 "&hello20; &hello20;">
- <!ENTITY hello22 "&hello21; &hello21;">
- <!ENTITY hello23 "&hello22; &hello22;">
- <!ENTITY hello24 "&hello23; &hello23;">
- <!ENTITY hello25 "&hello24; &hello24;">
- <!ENTITY hello26 "&hello25; &hello25;">
- <!ENTITY hello27 "&hello26; &hello26;">
- <!ENTITY hello28 "&hello27; &hello27;">
- <!ENTITY hello29 "&hello28; &hello28;">
- <!ENTITY hello30 "&hello29; &hello29;">
-
- <!ENTITY hello31 "&hello30; &hello30;">
- <!ENTITY hello32 "&hello31; &hello31;">
- <!ENTITY hello33 "&hello32; &hello32;">
- <!ENTITY hello34 "&hello33; &hello33;">
- <!ENTITY hello35 "&hello34; &hello34;">
- <!ENTITY hello36 "&hello35; &hello35;">
- <!ENTITY hello37 "&hello36; &hello36;">
- <!ENTITY hello38 "&hello37; &hello37;">
- <!ENTITY hello39 "&hello38; &hello38;">
- <!ENTITY hello40 "&hello39; &hello39;">
-
- <!ENTITY hello41 "&hello40; &hello40;">
- <!ENTITY hello42 "&hello41; &hello41;">
- <!ENTITY hello43 "&hello42; &hello42;">
- <!ENTITY hello44 "&hello43; &hello43;">
- <!ENTITY hello45 "&hello44; &hello44;">
- <!ENTITY hello46 "&hello45; &hello45;">
- <!ENTITY hello47 "&hello46; &hello46;">
- <!ENTITY hello48 "&hello47; &hello47;">
- <!ENTITY hello49 "&hello48; &hello48;">
- <!ENTITY hello50 "&hello49; &hello49;">
-
- <!ENTITY hello51 "&hello50; &hello50;">
- <!ENTITY hello52 "&hello51; &hello51;">
- <!ENTITY hello53 "&hello52; &hello52;">
- <!ENTITY hello54 "&hello53; &hello53;">
- <!ENTITY hello55 "&hello54; &hello54;">
- <!ENTITY hello56 "&hello55; &hello55;">
- <!ENTITY hello57 "&hello56; &hello56;">
- <!ENTITY hello58 "&hello57; &hello57;">
- <!ENTITY hello59 "&hello58; &hello58;">
- <!ENTITY hello60 "&hello59; &hello59;">
-
- <!ENTITY hello61 "&hello60; &hello60;">
- <!ENTITY hello62 "&hello61; &hello61;">
- <!ENTITY hello63 "&hello62; &hello62;">
- <!ENTITY hello64 "&hello63; &hello63;">
- <!ENTITY hello65 "&hello64; &hello64;">
- <!ENTITY hello66 "&hello65; &hello65;">
- <!ENTITY hello67 "&hello66; &hello66;">
- <!ENTITY hello68 "&hello67; &hello67;">
- <!ENTITY hello69 "&hello68; &hello68;">
- <!ENTITY hello70 "&hello69; &hello69;">
-
- <!ENTITY hello71 "&hello70; &hello70;">
- <!ENTITY hello72 "&hello71; &hello71;">
- <!ENTITY hello73 "&hello72; &hello72;">
- <!ENTITY hello74 "&hello73; &hello73;">
- <!ENTITY hello75 "&hello74; &hello74;">
- <!ENTITY hello76 "&hello75; &hello75;">
- <!ENTITY hello77 "&hello76; &hello76;">
- <!ENTITY hello78 "&hello77; &hello77;">
- <!ENTITY hello79 "&hello78; &hello78;">
- <!ENTITY hello80 "&hello79; &hello79;">
-
- <!ENTITY hello81 "&hello80; &hello80;">
- <!ENTITY hello82 "&hello81; &hello81;">
- <!ENTITY hello83 "&hello82; &hello82;">
- <!ENTITY hello84 "&hello83; &hello83;">
- <!ENTITY hello85 "&hello84; &hello84;">
- <!ENTITY hello86 "&hello85; &hello85;">
- <!ENTITY hello87 "&hello86; &hello86;">
- <!ENTITY hello88 "&hello87; &hello87;">
- <!ENTITY hello89 "&hello88; &hello88;">
- <!ENTITY hello90 "&hello89; &hello89;">
-
- <!ENTITY hello91 "&hello90; &hello90;">
- <!ENTITY hello92 "&hello91; &hello91;">
- <!ENTITY hello93 "&hello92; &hello92;">
- <!ENTITY hello94 "&hello93; &hello93;">
- <!ENTITY hello95 "&hello94; &hello94;">
- <!ENTITY hello96 "&hello95; &hello95;">
- <!ENTITY hello97 "&hello96; &hello96;">
- <!ENTITY hello98 "&hello97; &hello97;">
- <!ENTITY hello99 "&hello98; &hello98;">
- <!ENTITY hello100 "&hello99; &hello99;">
-
- <!ENTITY hello101 "&hello100; &hello100;">
- <!ENTITY hello102 "&hello101; &hello101;">
- <!ENTITY hello103 "&hello102; &hello102;">
- <!ENTITY hello104 "&hello103; &hello103;">
- <!ENTITY hello105 "&hello104; &hello104;">
- <!ENTITY hello106 "&hello105; &hello105;">
- <!ENTITY hello107 "&hello106; &hello106;">
- <!ENTITY hello108 "&hello107; &hello107;">
- <!ENTITY hello109 "&hello108; &hello108;">
- <!ENTITY hello110 "&hello109; &hello109;">
-
- <!ENTITY hello111 "&hello110; &hello110;">
- <!ENTITY hello112 "&hello111; &hello111;">
- <!ENTITY hello113 "&hello112; &hello112;">
- <!ENTITY hello114 "&hello113; &hello113;">
- <!ENTITY hello115 "&hello114; &hello114;">
- <!ENTITY hello116 "&hello115; &hello115;">
- <!ENTITY hello117 "&hello116; &hello116;">
- <!ENTITY hello118 "&hello117; &hello117;">
- <!ENTITY hello119 "&hello118; &hello118;">
- <!ENTITY hello120 "&hello119; &hello119;">
-
- <!ENTITY hello121 "&hello120; &hello120;">
- <!ENTITY hello122 "&hello121; &hello121;">
- <!ENTITY hello123 "&hello122; &hello122;">
- <!ENTITY hello124 "&hello123; &hello123;">
- <!ENTITY hello125 "&hello124; &hello124;">
- <!ENTITY hello126 "&hello125; &hello125;">
- <!ENTITY hello127 "&hello126; &hello126;">
- <!ENTITY hello128 "&hello127; &hello127;">
-]>
-<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header/>
- <env:Body>
- <ns1:echoString xmlns:ns1='http://jbws1582.jaxws.ws.test.jboss.org/'>
- <arg0>&hello128;</arg0>
- </ns1:echoString>
- </env:Body>
-</env:Envelope>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/attack-message.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/attack-message.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<!DOCTYPE root [
+ <!ENTITY hello1 "Hello">
+ <!ENTITY hello2 "&hello1; &hello1;">
+ <!ENTITY hello3 "&hello2; &hello2;">
+ <!ENTITY hello4 "&hello3; &hello3;">
+ <!ENTITY hello5 "&hello4; &hello4;">
+ <!ENTITY hello6 "&hello5; &hello5;">
+ <!ENTITY hello7 "&hello6; &hello6;">
+ <!ENTITY hello8 "&hello7; &hello7;">
+ <!ENTITY hello9 "&hello8; &hello8;">
+ <!ENTITY hello10 "&hello9; &hello9;">
+
+ <!ENTITY hello11 "&hello10; &hello10;">
+ <!ENTITY hello12 "&hello11; &hello11;">
+ <!ENTITY hello13 "&hello12; &hello12;">
+ <!ENTITY hello14 "&hello13; &hello13;">
+ <!ENTITY hello15 "&hello14; &hello14;">
+ <!ENTITY hello16 "&hello15; &hello15;">
+ <!ENTITY hello17 "&hello16; &hello16;">
+ <!ENTITY hello18 "&hello17; &hello17;">
+ <!ENTITY hello19 "&hello18; &hello18;">
+ <!ENTITY hello20 "&hello19; &hello19;">
+
+ <!ENTITY hello21 "&hello20; &hello20;">
+ <!ENTITY hello22 "&hello21; &hello21;">
+ <!ENTITY hello23 "&hello22; &hello22;">
+ <!ENTITY hello24 "&hello23; &hello23;">
+ <!ENTITY hello25 "&hello24; &hello24;">
+ <!ENTITY hello26 "&hello25; &hello25;">
+ <!ENTITY hello27 "&hello26; &hello26;">
+ <!ENTITY hello28 "&hello27; &hello27;">
+ <!ENTITY hello29 "&hello28; &hello28;">
+ <!ENTITY hello30 "&hello29; &hello29;">
+
+ <!ENTITY hello31 "&hello30; &hello30;">
+ <!ENTITY hello32 "&hello31; &hello31;">
+ <!ENTITY hello33 "&hello32; &hello32;">
+ <!ENTITY hello34 "&hello33; &hello33;">
+ <!ENTITY hello35 "&hello34; &hello34;">
+ <!ENTITY hello36 "&hello35; &hello35;">
+ <!ENTITY hello37 "&hello36; &hello36;">
+ <!ENTITY hello38 "&hello37; &hello37;">
+ <!ENTITY hello39 "&hello38; &hello38;">
+ <!ENTITY hello40 "&hello39; &hello39;">
+
+ <!ENTITY hello41 "&hello40; &hello40;">
+ <!ENTITY hello42 "&hello41; &hello41;">
+ <!ENTITY hello43 "&hello42; &hello42;">
+ <!ENTITY hello44 "&hello43; &hello43;">
+ <!ENTITY hello45 "&hello44; &hello44;">
+ <!ENTITY hello46 "&hello45; &hello45;">
+ <!ENTITY hello47 "&hello46; &hello46;">
+ <!ENTITY hello48 "&hello47; &hello47;">
+ <!ENTITY hello49 "&hello48; &hello48;">
+ <!ENTITY hello50 "&hello49; &hello49;">
+
+ <!ENTITY hello51 "&hello50; &hello50;">
+ <!ENTITY hello52 "&hello51; &hello51;">
+ <!ENTITY hello53 "&hello52; &hello52;">
+ <!ENTITY hello54 "&hello53; &hello53;">
+ <!ENTITY hello55 "&hello54; &hello54;">
+ <!ENTITY hello56 "&hello55; &hello55;">
+ <!ENTITY hello57 "&hello56; &hello56;">
+ <!ENTITY hello58 "&hello57; &hello57;">
+ <!ENTITY hello59 "&hello58; &hello58;">
+ <!ENTITY hello60 "&hello59; &hello59;">
+
+ <!ENTITY hello61 "&hello60; &hello60;">
+ <!ENTITY hello62 "&hello61; &hello61;">
+ <!ENTITY hello63 "&hello62; &hello62;">
+ <!ENTITY hello64 "&hello63; &hello63;">
+ <!ENTITY hello65 "&hello64; &hello64;">
+ <!ENTITY hello66 "&hello65; &hello65;">
+ <!ENTITY hello67 "&hello66; &hello66;">
+ <!ENTITY hello68 "&hello67; &hello67;">
+ <!ENTITY hello69 "&hello68; &hello68;">
+ <!ENTITY hello70 "&hello69; &hello69;">
+
+ <!ENTITY hello71 "&hello70; &hello70;">
+ <!ENTITY hello72 "&hello71; &hello71;">
+ <!ENTITY hello73 "&hello72; &hello72;">
+ <!ENTITY hello74 "&hello73; &hello73;">
+ <!ENTITY hello75 "&hello74; &hello74;">
+ <!ENTITY hello76 "&hello75; &hello75;">
+ <!ENTITY hello77 "&hello76; &hello76;">
+ <!ENTITY hello78 "&hello77; &hello77;">
+ <!ENTITY hello79 "&hello78; &hello78;">
+ <!ENTITY hello80 "&hello79; &hello79;">
+
+ <!ENTITY hello81 "&hello80; &hello80;">
+ <!ENTITY hello82 "&hello81; &hello81;">
+ <!ENTITY hello83 "&hello82; &hello82;">
+ <!ENTITY hello84 "&hello83; &hello83;">
+ <!ENTITY hello85 "&hello84; &hello84;">
+ <!ENTITY hello86 "&hello85; &hello85;">
+ <!ENTITY hello87 "&hello86; &hello86;">
+ <!ENTITY hello88 "&hello87; &hello87;">
+ <!ENTITY hello89 "&hello88; &hello88;">
+ <!ENTITY hello90 "&hello89; &hello89;">
+
+ <!ENTITY hello91 "&hello90; &hello90;">
+ <!ENTITY hello92 "&hello91; &hello91;">
+ <!ENTITY hello93 "&hello92; &hello92;">
+ <!ENTITY hello94 "&hello93; &hello93;">
+ <!ENTITY hello95 "&hello94; &hello94;">
+ <!ENTITY hello96 "&hello95; &hello95;">
+ <!ENTITY hello97 "&hello96; &hello96;">
+ <!ENTITY hello98 "&hello97; &hello97;">
+ <!ENTITY hello99 "&hello98; &hello98;">
+ <!ENTITY hello100 "&hello99; &hello99;">
+
+ <!ENTITY hello101 "&hello100; &hello100;">
+ <!ENTITY hello102 "&hello101; &hello101;">
+ <!ENTITY hello103 "&hello102; &hello102;">
+ <!ENTITY hello104 "&hello103; &hello103;">
+ <!ENTITY hello105 "&hello104; &hello104;">
+ <!ENTITY hello106 "&hello105; &hello105;">
+ <!ENTITY hello107 "&hello106; &hello106;">
+ <!ENTITY hello108 "&hello107; &hello107;">
+ <!ENTITY hello109 "&hello108; &hello108;">
+ <!ENTITY hello110 "&hello109; &hello109;">
+
+ <!ENTITY hello111 "&hello110; &hello110;">
+ <!ENTITY hello112 "&hello111; &hello111;">
+ <!ENTITY hello113 "&hello112; &hello112;">
+ <!ENTITY hello114 "&hello113; &hello113;">
+ <!ENTITY hello115 "&hello114; &hello114;">
+ <!ENTITY hello116 "&hello115; &hello115;">
+ <!ENTITY hello117 "&hello116; &hello116;">
+ <!ENTITY hello118 "&hello117; &hello117;">
+ <!ENTITY hello119 "&hello118; &hello118;">
+ <!ENTITY hello120 "&hello119; &hello119;">
+
+ <!ENTITY hello121 "&hello120; &hello120;">
+ <!ENTITY hello122 "&hello121; &hello121;">
+ <!ENTITY hello123 "&hello122; &hello122;">
+ <!ENTITY hello124 "&hello123; &hello123;">
+ <!ENTITY hello125 "&hello124; &hello124;">
+ <!ENTITY hello126 "&hello125; &hello125;">
+ <!ENTITY hello127 "&hello126; &hello126;">
+ <!ENTITY hello128 "&hello127; &hello127;">
+]>
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
+ <env:Header/>
+ <env:Body>
+ <ns1:echoString xmlns:ns1='http://jbws1582.jaxws.ws.test.jboss.org/'>
+ <arg0>&hello128;</arg0>
+ </ns1:echoString>
+ </env:Body>
+</env:Envelope>
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/message.xml 2009-04-29 10:27:16 UTC (rev 9919)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
- <env:Header/>
- <env:Body>
- <ns1:echoString xmlns:ns1='http://jbws1582.jaxws.ws.test.jboss.org/'>
- <arg0>Hello</arg0>
- </ns1:echoString>
- </env:Body>
-</env:Envelope>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml (from rev 9919, stack/native/branches/jbossws-native-2.0.1.SP2_CP05_JBPAPP-1961/src/test/resources/jaxws/jbws1582/message.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1582/message.xml 2009-04-29 10:58:27 UTC (rev 9921)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
+ <env:Header/>
+ <env:Body>
+ <ns1:echoString xmlns:ns1='http://jbws1582.jaxws.ws.test.jboss.org/'>
+ <arg0>Hello</arg0>
+ </ns1:echoString>
+ </env:Body>
+</env:Envelope>
+
15 years, 8 months
JBossWS SVN: r9920 - common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-04-29 06:51:00 -0400 (Wed, 29 Apr 2009)
New Revision: 9920
Modified:
common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
Log:
[JBWS-1582][JBPAPP-1961] backport - svn merge -r 9917:9918 https://svn.jboss.org/repos/jbossws/common/branches/jbossws-common-1.0.0....
Modified: common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
===================================================================
--- common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java 2009-04-29 10:27:16 UTC (rev 9919)
+++ common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java 2009-04-29 10:51:00 UTC (rev 9920)
@@ -33,6 +33,7 @@
import java.util.Iterator;
import java.util.Map;
+import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -69,6 +70,7 @@
private static Logger log = Logger.getLogger(DOMUtils.class);
private static final String DISABLE_DEFERRED_NODE_EXPANSION = "org.jboss.ws.disable_deferred_node_expansion";
+ private static final String DEFER_NODE_EXPANSION_FEATURE = "http://apache.org/xml/features/dom/defer-node-expansion";
// All elements created by the same thread are created by the same builder and belong to the same doc
private static ThreadLocal<Document> documentThreadLocal = new ThreadLocal<Document>();
@@ -81,11 +83,18 @@
factory.setValidating(false);
factory.setNamespaceAware(true);
- boolean disableDeferredNodeExpansion = Boolean.getBoolean(DISABLE_DEFERRED_NODE_EXPANSION);
- if (disableDeferredNodeExpansion == true)
+ try
{
- factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
+ factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+ if (Boolean.getBoolean(DISABLE_DEFERRED_NODE_EXPANSION))
+ {
+ factory.setFeature(DEFER_NODE_EXPANSION_FEATURE, false);
+ }
}
+ catch (ParserConfigurationException pce)
+ {
+ log.error(pce);
+ }
DocumentBuilder builder = factory.newDocumentBuilder();
setEntityResolver(builder);
15 years, 8 months