JBossWS SVN: r16481 - hudson/trunk/hudson-home/jobs/AS-7.2.0.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-07-17 09:49:51 -0400 (Tue, 17 Jul 2012)
New Revision: 16481
Modified:
hudson/trunk/hudson-home/jobs/AS-7.2.0/config.xml
Log:
Remove unnecessary workaround for AS7-5137
Modified: hudson/trunk/hudson-home/jobs/AS-7.2.0/config.xml
===================================================================
--- hudson/trunk/hudson-home/jobs/AS-7.2.0/config.xml 2012-07-17 11:12:39 UTC (rev 16480)
+++ hudson/trunk/hudson-home/jobs/AS-7.2.0/config.xml 2012-07-17 13:49:51 UTC (rev 16481)
@@ -61,10 +61,7 @@
<command>MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=128m"
export MAVEN_OPTS
-./build.sh clean install -Dskip-download-sources -DskipTests=true -U -B
-
-for i in `find build/target/ -name "appclient.sh"`; do chmod +x $i; done;
-</command>
+./build.sh clean install -Dskip-download-sources -DskipTests=true -U -B</command>
</hudson.tasks.Shell>
</builders>
<publishers>
12 years, 6 months
JBossWS SVN: r16480 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-07-17 07:12:39 -0400 (Tue, 17 Jul 2012)
New Revision: 16480
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
Log:
[JBWS-3249] Removing picketlink-core dependency not needed anymore in cxf-spring-tests
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2012-07-17 11:05:45 UTC (rev 16479)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2012-07-17 11:12:39 UTC (rev 16480)
@@ -21,11 +21,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.picketlink</groupId>
- <artifactId>picketlink-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
12 years, 6 months
JBossWS SVN: r16479 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/scripts and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-07-17 07:05:45 -0400 (Tue, 17 Jul 2012)
New Revision: 16479
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3249] Removing testcase
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2012-07-17 10:36:06 UTC (rev 16478)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2012-07-17 11:05:45 UTC (rev 16479)
@@ -157,30 +157,6 @@
</webinf>
</war>
- <!-- jaxws-samples-wsse-username-authorize-custom -->
- <war
- warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username-authorize-custom.war"
- webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="jbossws-cxf.xml"/>
- <include name="wsdl/*"/>
- </webinf>
- <zipfileset dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF" prefix="WEB-INF/classes">
- <include name="login-config.xml"/>
- <include name="users.properties"/>
- <include name="roles.properties"/>
- </zipfileset>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.cxf.jbossws-cxf-server"/>
- </manifest>
- </war>
-
<!-- jaxws-samples-wsse-username-digest -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username-digest.war"
Deleted: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java 2012-07-17 10:36:06 UTC (rev 16478)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java 2012-07-17 11:05:45 UTC (rev 16479)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.wsse;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor;
-import org.picketbox.config.PicketBoxConfiguration;
-import org.picketbox.exceptions.ConfigurationStreamNullException;
-import org.picketbox.factories.SecurityFactory;
-
-
-/**
- * Interceptor which authenticates a current principal and populates Subject
- *
- * @author Sergey Beryozkin
- *
- */
-public class CustomSubjectCreatingInterceptor extends SubjectCreatingInterceptor
-{
-
- public CustomSubjectCreatingInterceptor()
- {
- super(getInitMap());
- }
-
- public void setSecurityConfigFile(String configFilePath)
- {
- SecurityFactory.prepare();
- try
- {
- PicketBoxConfiguration idtrustConfig = new PicketBoxConfiguration();
- idtrustConfig.load(configFilePath);
- }
- catch (ConfigurationStreamNullException ex) {
- throw new SecurityException("Unable to load the configuration file " + configFilePath);
- }
- catch (Exception ex) {
- throw new SecurityException("Unable to read the configuration file " + configFilePath, ex);
- }
- finally
- {
- SecurityFactory.release();
- }
- }
-
- private static Map<String, Object> getInitMap()
- {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("action", "UsernameToken");
- return map;
- }
-}
Deleted: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java 2012-07-17 10:36:06 UTC (rev 16478)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java 2012-07-17 11:05:45 UTC (rev 16479)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.wsse;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
-import org.apache.cxf.endpoint.Client;
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * WS-Security username authorization test case
- *
- * @author Sergey Beryozkin
- *
- */
-public final class UsernameAuthorizationCustomFileTestCase extends JBossWSTest
-{
- private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-username-authorize-custom";
- private final QName servicePort = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityServicePort");
-
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(UsernameAuthorizationCustomFileTestCase.class, "jaxws-samples-wsse-username-authorize-custom.war");
- }
-
- public void testAuthorizedCustomConfig() throws Exception
- {
- doTestAuthorized(serviceURL, servicePort, "theKermit");
- }
-
-private void doTestAuthorized(String endpointAddress, QName portName, String userName) throws Exception
- {
- QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
- URL wsdlURL = new URL(endpointAddress + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface)service.getPort(portName, ServiceIface.class);
- setupWsse(proxy, userName);
- assertEquals("Secure Hello World!", proxy.sayHello());
- }
-
- public void testUnauthenticated() throws Exception
- {
- QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
- setupWsse(proxy, "foo");
- try
- {
- proxy.sayHello();
- fail("User foo should not be authenticated.");
- }
- catch (Exception ex)
- {
- //expected
- }
- }
-
- public void testUnauthorizedCustomConfig() throws Exception
- {
- doTestUnauthorized(serviceURL, servicePort, "theKermit");
- }
-
-private void doTestUnauthorized(String endpointAddress, QName portName, String userName) throws Exception
- {
- QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
- URL wsdlURL = new URL(endpointAddress + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- ServiceIface proxy = (ServiceIface)service.getPort(portName, ServiceIface.class);
- setupWsse(proxy, userName);
- try
- {
- proxy.greetMe();
- fail("User kermit should not be authorized to invoke greetMe.");
- }
- catch (Exception ex)
- {
- assertEquals("Unauthorized", ex.getMessage());
- }
- }
-
- private void setupWsse(ServiceIface proxy, String username)
- {
- Client client = ClientProxy.getClient(proxy);
- Endpoint cxfEndpoint = client.getEndpoint();
-
- Map<String, Object> outProps = new HashMap<String, Object>();
- outProps.put("action", "UsernameToken");
- outProps.put("user", username);
- outProps.put("passwordType", "PasswordText");
- outProps.put("passwordCallbackClass", "org.jboss.test.ws.jaxws.samples.wsse.UsernamePasswordCallback");
- WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); //request
- cxfEndpoint.getOutInterceptors().add(wssOut);
- cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());
- }
-}
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-07-17 10:36:06 UTC (rev 16478)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-07-17 11:05:45 UTC (rev 16479)
@@ -762,9 +762,6 @@
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher // also see compile exclude above -->
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
- <!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
-
<!-- # [JBWS-3493] WS-Trust tests w/ PicketLink STS require PL 2.1.2.Final or greater -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService*</exclude>
@@ -970,9 +967,6 @@
<!--# [JBWS-2397] Fix jbws1797 testcase-->
<exclude>org/jboss/test/ws/jaxws/jbws1797/**</exclude>
- <!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
-
<!-- # [JBWS-3493] WS-Trust tests w/ PicketLink STS require PL 2.1.2.Final or greater -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/PicketLinkSTService*</exclude>
@@ -1171,9 +1165,6 @@
<!--# [JBWS-2397] Fix jbws1797 testcase-->
<exclude>org/jboss/test/ws/jaxws/jbws1797/**</exclude>
- <!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
-
<!-- # [JBWS-3493] WS-Trust tests w/ PicketLink STS require PL 2.1.2.Final or greater -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
@@ -1371,9 +1362,6 @@
<!--# [JBWS-2397] Fix jbws1797 testcase-->
<exclude>org/jboss/test/ws/jaxws/jbws1797/**</exclude>
- <!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
-
<!-- # [JBWS-3493] WS-Trust tests w/ PicketLink STS require PL 2.1.2.Final or greater -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
12 years, 6 months
JBossWS SVN: r16478 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-07-17 06:36:06 -0400 (Tue, 17 Jul 2012)
New Revision: 16478
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
Fixing AS 7.2 regression due to remoting-jmx module relocation
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-07-17 08:39:16 UTC (rev 16477)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-07-17 10:36:06 UTC (rev 16478)
@@ -411,7 +411,7 @@
<fileset dir="${jboss.home}/modules/org/jboss/marshalling/river/main/">
<include name="jboss-marshalling-river-*.jar"/>
</fileset>
- <fileset dir="${jboss.home}/modules/org/jboss/remoting3/remoting-jmx/main/">
+ <fileset dir="${jboss.home}/modules/org/jboss/remoting-jmx/main/">
<include name="remoting-jmx-*.jar"/>
</fileset>
<fileset dir="${jboss.home}/modules/org/jboss/sasl/main/">
12 years, 6 months
JBossWS SVN: r16477 - hudson/trunk/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-07-17 04:39:16 -0400 (Tue, 17 Jul 2012)
New Revision: 16477
Modified:
hudson/trunk/scripts/jbossws-qa.sh
Log:
[JBWS-3475] minor change
Modified: hudson/trunk/scripts/jbossws-qa.sh
===================================================================
--- hudson/trunk/scripts/jbossws-qa.sh 2012-07-17 08:03:27 UTC (rev 16476)
+++ hudson/trunk/scripts/jbossws-qa.sh 2012-07-17 08:39:16 UTC (rev 16477)
@@ -157,8 +157,8 @@
}
addTestQueue() {
- sleep 10
if [ "$JBOSS_TARGET" != "jboss710" ] && [ "$JBOSS_TARGET" != "jboss711" ]; then
+ sleep 10
$JBOSS_HOME/bin/jboss-cli.sh -c command="/subsystem=messaging/hornetq-server=default/jms-queue=testQueue/:add(entries=[\"queue/test\",\"java:jboss/exported/jms/queue/test\"])"
fi
}
12 years, 6 months
JBossWS SVN: r16476 - hudson/trunk/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-07-17 04:03:27 -0400 (Tue, 17 Jul 2012)
New Revision: 16476
Modified:
hudson/trunk/scripts/jbossws-qa.sh
Log:
[JBWS-3475] Do not add testQueue on jboss710/711 (it's already there)
Modified: hudson/trunk/scripts/jbossws-qa.sh
===================================================================
--- hudson/trunk/scripts/jbossws-qa.sh 2012-07-17 06:25:16 UTC (rev 16475)
+++ hudson/trunk/scripts/jbossws-qa.sh 2012-07-17 08:03:27 UTC (rev 16476)
@@ -158,7 +158,9 @@
addTestQueue() {
sleep 10
- $JBOSS_HOME/bin/jboss-cli.sh -c command="/subsystem=messaging/hornetq-server=default/jms-queue=testQueue/:add(entries=[\"queue/test\",\"java:jboss/exported/jms/queue/test\"])"
+ if [ "$JBOSS_TARGET" != "jboss710" ] && [ "$JBOSS_TARGET" != "jboss711" ]; then
+ $JBOSS_HOME/bin/jboss-cli.sh -c command="/subsystem=messaging/hornetq-server=default/jms-queue=testQueue/:add(entries=[\"queue/test\",\"java:jboss/exported/jms/queue/test\"])"
+ fi
}
coreTestWithSpring() {
12 years, 6 months
JBossWS SVN: r16475 - in stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172: types and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-07-17 02:25:16 -0400 (Tue, 17 Jul 2012)
New Revision: 16475
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
Log:
[JBPAPP-9517]:add and correct some comments
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -48,7 +48,7 @@
* http://jira.jboss.org/jira/browse/JBWS-1172
*
* @author Thomas.Diesler(a)jboss.com
- * @author ema(a)rehda.com
+ * @author ema(a)rehdat.com
* @since 28-Feb-2008
*/
public class JBWS1172TestCase extends JBossWSTest
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.jws.WebMethod;
@@ -7,12 +28,6 @@
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
-/**
- * This class was generated by Apache CXF 2.6.0-SNAPSHOT
- * 2012-07-17T00:38:10.376+08:00
- * Generated source version: 2.6.0-SNAPSHOT
- *
- */
@WebService(targetNamespace = "http://www.my-company.it/ws/my-test", name = "MyTest")
@XmlSeeAlso({ObjectFactory.class})
public interface MyTest {
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.ws.WebFault;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.JAXBElement;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,4 +1,24 @@
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-17 06:02:10 UTC (rev 16474)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-17 06:25:16 UTC (rev 16475)
@@ -1,2 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.my-company.it/ws/my-test2")
package org.jboss.test.ws.jaxws.jbws1172.types;
12 years, 6 months
JBossWS SVN: r16474 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/soap and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-07-17 02:02:10 -0400 (Tue, 17 Jul 2012)
New Revision: 16474
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd
Removed:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl
Log:
[JBPAPP-9517]:Fix multiple nested schemas in wsdl can not validate message
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -69,7 +69,6 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
-import com.sun.corba.se.spi.orb.Operation;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -23,6 +23,8 @@
import java.io.InputStream;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.soap.Name;
@@ -103,7 +105,7 @@
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
feature = epMetaData.getFeature(SchemaValidationFeature.class);
URL xsdURL = feature.getSchemaLocation() != null ? new URL(feature.getSchemaLocation()) : null;
- InputStream[] xsdStreams = null;
+ Map<String, byte[]> xsdStreams = new HashMap<String, byte[]>();
if (xsdURL == null)
{
URL wsdlURL = epMetaData.getServiceMetaData().getWsdlFileOrLocation();
Added: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.validation;
+
+import java.io.InputStream;
+import java.io.Reader;
+
+import org.w3c.dom.ls.LSInput;
+/**
+ * LSInput implementation
+ *
+ * @author ema(a)redhat.com
+ */
+
+public class LSInputImpl implements LSInput {
+
+ protected String publicId;
+
+ protected String systemId;
+
+ protected String baseSystemId;
+
+ protected InputStream byteStream;
+
+ protected Reader charStream;
+
+ protected String data;
+
+ protected String encoding;
+
+ protected boolean certifiedText;
+
+ public LSInputImpl() {
+ }
+
+ public LSInputImpl(String systemId, InputStream byteStream) {
+ this.systemId = systemId;
+ this.byteStream = byteStream;
+ }
+
+ public LSInputImpl(String publicId, String systemId, InputStream byteStream) {
+ this.publicId = publicId;
+ this.systemId = systemId;
+ this.byteStream = byteStream;
+ }
+
+ public InputStream getByteStream() {
+ return byteStream;
+ }
+
+ public void setByteStream(InputStream byteStream) {
+ this.byteStream = byteStream;
+ }
+
+ public Reader getCharacterStream() {
+ return charStream;
+ }
+
+ public void setCharacterStream(Reader characterStream) {
+ charStream = characterStream;
+ }
+
+ public String getStringData() {
+ return data;
+ }
+
+ public void setStringData(String stringData) {
+ data = stringData;
+ }
+
+ public String getEncoding() {
+ return encoding;
+ }
+
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ public String getPublicId() {
+ return publicId;
+ }
+
+ public void setPublicId(String publicId) {
+ this.publicId = publicId;
+ }
+
+ public String getSystemId() {
+ return systemId;
+ }
+
+ public void setSystemId(String systemId) {
+ this.systemId = systemId;
+ }
+
+ public String getBaseURI() {
+ return baseSystemId;
+ }
+
+ public void setBaseURI(String baseURI) {
+ this.baseSystemId = baseURI;
+ }
+
+ public boolean getCertifiedText() {
+ return certifiedText;
+ }
+
+ public void setCertifiedText(boolean certifiedText) {
+ this.certifiedText = certifiedText;
+ }
+
+}
+
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -21,48 +21,61 @@
*/
package org.jboss.ws.extensions.validation;
-import java.io.File;
-import java.io.FileOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStreamWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.FileInputStream;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.regex.Matcher;
import javax.xml.namespace.QName;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.jboss.logging.Logger;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
-import org.jboss.wsf.common.IOUtils;
+import org.w3c.dom.Attr;
import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
/**
* Extracts the schema from a given WSDL
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)redhat.com
* @since 29-Feb-2008
*/
public class SchemaExtractor
{
// provide logging
private static Logger log = Logger.getLogger(SchemaExtractor.class);
+ private static Transformer transformer = null;
+ private String path;
+ static {
+ try
+ {
+ transformer = TransformerFactory.newInstance().newTransformer();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
- private File xsdFile;
- private String path;
-
- public InputStream[] getSchemas(URL wsdlURL) throws IOException
+ }
+ public Map<String, byte[]> getSchemas(URL wsdlURL) throws IOException
{
+ Map<String, byte[]> streams = new HashMap<String, byte[]>();
//Get the path to the WSDL
Pattern p = Pattern.compile("[a-zA-Z]+\\.[a-zA-Z]+$");
Matcher m = p.matcher(wsdlURL.getFile());
@@ -90,36 +103,51 @@
log.warn("Cannot find element: " + schemaQName);
return null;
}
- if (schemaElements.size() > 1)
+
+ for (Element schemaElement : schemaElements)
{
- log.warn("Multiple schema elements not supported.");
- }
- Element schemaElement = schemaElements.get(0);
- //Add namespace declarations from root element
- for(Attr nsAttr : nsAttrs)
- {
- Attr replacedAttr = schemaElement.setAttributeNodeNS(nsAttr);
- if(replacedAttr != null) //then put it back
+ DOMSource domSource = new DOMSource(schemaElement);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult(bout);
+ Element newSchemeElement = null;
+ try
{
- schemaElement.setAttributeNodeNS(replacedAttr);
+ transformer.transform(domSource, result);
+ String content = new String(bout.toByteArray());
+ newSchemeElement = DOMUtils.parse(content);
}
- }
+ catch (Exception e)
+ {
+ log.error("Failed to parse schema with schemaElement with targetNamepace : "
+ + schemaElement.getAttribute("targetNamespace"));
+ }
- List<InputStream> streams = new ArrayList<InputStream>();
- pullImportedSchemas(schemaElement, streams);
+
+ for (Attr nsAttr : nsAttrs)
+ {
+
+ Attr newAttr = newSchemeElement.getOwnerDocument().createAttribute(nsAttr.getName());
+ newAttr.setNodeValue(nsAttr.getValue());
+ if (newSchemeElement.getAttribute(nsAttr.getName()).equals("")) {
+ newSchemeElement.setAttributeNodeNS(newAttr);
+ }
+ }
- //Add the WSDL schema to the schema array
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- OutputStreamWriter outwr = new OutputStreamWriter( outStream );
- DOMWriter domWriter = new DOMWriter(outwr);
- domWriter.setPrettyprint(true);
- domWriter.print(schemaElement);
+ pullImportedSchemas(newSchemeElement, streams);
- streams.add(new ByteArrayInputStream(outStream.toByteArray()));
+ // Add the WSDL schema to the schema array
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ OutputStreamWriter outwr = new OutputStreamWriter(outStream);
+ DOMWriter domWriter = new DOMWriter(outwr);
+ domWriter.setPrettyprint(true);
+ domWriter.print(newSchemeElement);
+ String tns = newSchemeElement.getAttribute("targetNamespace");
+ streams.put(tns, outStream.toByteArray());
+ }
- return streams.toArray(new InputStream[streams.size()]);
+ return streams;
}
private List<Attr> getNamespaceAttrs(Element element)
@@ -132,14 +160,14 @@
{
Node node = nodes.item(i);
Attr attr = (Attr)node;
- if(attr.getName().startsWith("xmlns"))
+ if(attr.getName().startsWith("xmlns:"))
nsAttrs.add((Attr)attr.cloneNode(true));
}
return nsAttrs;
}
- private void pullImportedSchemas(Element schemaElement, List<InputStream> streams)
+ private void pullImportedSchemas(Element schemaElement, Map<String, byte[]> streams)
{
QName importQName = new QName( "http://www.w3.org/2001/XMLSchema", "import" );
List<Element> importElements = DOMUtils.getChildElementsAsList( schemaElement, importQName );
@@ -148,7 +176,10 @@
for( Element importElement : importElements )
{
String schemaLocation = importElement.getAttribute( "schemaLocation" );
- schemaLocations.add( schemaLocation );
+ if (!"".equals(schemaLocation))
+ {
+ schemaLocations.add(schemaLocation);
+ }
}
ByteArrayOutputStream outStream = null;
@@ -175,7 +206,8 @@
pullImportedSchemas(root, streams);
inputStream.reset();
- streams.add(inputStream);
+ String tns = root.getAttribute("targetNamespace");
+ streams.put(tns , outStream.toByteArray());
}
catch(IOException ioe)
{
Added: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.validation;
+
+import java.io.ByteArrayInputStream;
+import java.util.Map;
+
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+/**
+ * SchemaResourceResolver
+ *
+ * @author ema(a)redhat.com
+ */
+
+public class SchemaResourceResolver implements LSResourceResolver {
+ private Map<String, byte[]> streamMap;
+
+ public SchemaResourceResolver(Map<String, byte[]> map) {
+ streamMap = map;
+ }
+
+ public LSInput resolveResource(String type, String namespaceURI,
+ String publicId, String systemId, String baseURI) {
+ LSInput lsInput = null;
+ if (streamMap.get(namespaceURI) != null) {
+ byte[] value = streamMap.get(namespaceURI);
+ lsInput = new LSInputImpl();
+ lsInput.setByteStream(new ByteArrayInputStream(value));
+ }
+ return lsInput;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -21,93 +21,107 @@
*/
package org.jboss.ws.extensions.validation;
+import java.io.ByteArrayInputStream;
+import java.io.File;
import java.io.InputStream;
import java.net.URL;
-import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.common.DOMWriter;
import org.w3c.dom.Element;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
/**
* [JBWS-1172] Support schema validation for incoming messages
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)redhat.com
* @since 28-Feb-2008
*/
-public class SchemaValidationHelper
-{
- private URL xsdURL;
- private InputStream[] xsdStreams;
+public class SchemaValidationHelper {
+
private ErrorHandler errorHandler = new StrictlyValidErrorHandler();
- private static Logger log = Logger.getLogger(SchemaValidationHelper.class);
-
- public SchemaValidationHelper(URL xsdURL)
+ private static SchemaFactory factory = null;
+
+ private Validator validator = null;
+
+ static
{
- this.xsdURL = xsdURL;
+ factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
}
- public SchemaValidationHelper(InputStream[] xsdStreams)
+ public SchemaValidationHelper(URL xsdURL) throws SAXException
{
- this.xsdStreams = xsdStreams;
+ Schema schema = factory.newSchema(new File(xsdURL.getFile()));
+ validator = schema.newValidator();
+ validator.setErrorHandler(errorHandler);
}
+ public SchemaValidationHelper(Map<String, byte[]> xsdStreams) throws SAXException
+ {
+ SchemaResourceResolver resolver = new SchemaResourceResolver(xsdStreams);
+ factory.setResourceResolver(resolver);
+
+ List<Source> schemas = new ArrayList<Source>();
+ for (byte[] ins : xsdStreams.values())
+ {
+ StreamSource source = new StreamSource(new ByteArrayInputStream(ins));
+ schemas.add(source);
+ }
+ Source[] sources = schemas.toArray(new Source[0]);
+
+ Schema schema = factory.newSchema(sources);
+ validator = schema.newValidator();
+ validator.setErrorHandler(errorHandler);
+
+ }
+
public SchemaValidationHelper setErrorHandler(ErrorHandler errorHandler)
{
- this.errorHandler = errorHandler;
+ validator.setErrorHandler(errorHandler);
return this;
}
public void validateDocument(String inxml) throws Exception
{
- validateDocument(new InputSource(new StringReader(inxml)));
+ StreamSource source = new StreamSource(new java.io.ByteArrayInputStream(inxml.getBytes()));
+ validateDocument(source);
+
}
+ public void validateDocument(Source xml) throws Exception
+ {
+ validator.validate(xml);
+ }
+
public void validateDocument(Element inxml) throws Exception
{
- String xmlStr = DOMWriter.printNode(inxml, false);
- validateDocument(xmlStr);
+ DOMSource domSource = new DOMSource(inxml);
+ validator.validate(domSource);
}
-
+
public void validateDocument(InputStream inxml) throws Exception
{
- DocumentBuilder builder = getDocumentBuilder();
- builder.parse(inxml);
+ StreamSource source = new StreamSource(inxml);
+ validateDocument(source);
}
-
+
public void validateDocument(InputSource inxml) throws Exception
{
- DocumentBuilder builder = getDocumentBuilder();
- builder.parse(inxml);
+ StreamSource source = new StreamSource(inxml.getByteStream());
+ validateDocument(source);
}
- private DocumentBuilder getDocumentBuilder() throws ParserConfigurationException
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(true);
- factory.setNamespaceAware(true);
- factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
-
- if(xsdStreams != null)
- {
- factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", xsdStreams);
- }
- else //use xsdURL
- {
- factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", xsdURL.toExternalForm());
- }
-
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- builder.setErrorHandler(errorHandler);
- return builder;
- }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-07-17 06:02:10 UTC (rev 16474)
@@ -198,7 +198,8 @@
<war destfile="${tests.output.dir}/test-libs/jaxws-jbws1172.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws1172/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.class" />
<include name="org/jboss/test/ws/jaxws/jbws1172/types/*.class" />
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/jbws1172/WEB-INF">
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1172;
+
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.SchemaValidation;
+
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
+ targetNamespace = "http://www.my-company.it/ws/my-test",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl")
+
+@SchemaValidation
+public class ImportedSchemaValidatingEndpoint
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ImportedSchemaValidatingEndpoint.class);
+
+ public void performTest(Integer code)
+ {
+ log.info(code);
+ }
+}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -21,12 +21,13 @@
*/
package org.jboss.test.ws.jaxws.jbws1172;
-import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
+import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
@@ -47,6 +48,7 @@
* http://jira.jboss.org/jira/browse/JBWS-1172
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)rehda.com
* @since 28-Feb-2008
*/
public class JBWS1172TestCase extends JBossWSTest
@@ -57,20 +59,21 @@
{
return new JBossWSTestSetup(JBWS1172TestCase.class, "jaxws-jbws1172.war");
}
-
+
+
public void testSchemaValidationPositive() throws Exception
{
URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}
-
+
public void testSchemaValidationNegative() throws Exception
{
URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest xmlns='http://www.my-company.it/ws/my-test'><Code>2000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest xmlns:tns='http://www.my-company.it/ws/my-test'><Code>2000</Code></tns:performTest>";
try
{
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
@@ -85,23 +88,21 @@
public void testEndpointWsdlValidation() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/noval?wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}
public void testValidatingClientWithExplicitSchema() throws Exception
{
- URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- //URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
-
+ URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
Service service = Service.create(wsdlURL, SERVICE_NAME);
- //SchemaValidationFeature feature = new SchemaValidationFeature(xsdURL.toString());
SchemaValidationFeature feature = new SchemaValidationFeature();
MyTest port = service.getPort(MyTest.class, feature);
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:9090/jaxws-jbws1172/doval");
try
{
- port.performTest(new Long(2000));
+ port.performTest(new Integer(2000));
}
catch (Exception ex)
{
@@ -111,22 +112,26 @@
assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
}
}
+
public void testValidatingClientWithErrorHandler() throws Exception
{
- URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- //URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
-
+ URL wsdlURL = getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
Service service = Service.create(wsdlURL, SERVICE_NAME);
- //SchemaValidationFeature feature = new SchemaValidationFeature(xsdURL.toString());
SchemaValidationFeature feature = new SchemaValidationFeature();
TestErrorHandler errorHandler = new TestErrorHandler();
feature.setErrorHandler(errorHandler);
MyTest port = service.getPort(MyTest.class, feature);
- port.performTest(new Long(2000));
-
+ try
+ {
+ port.performTest(new Integer(2000));
+ }
+ catch (Exception e)
+ {
+
+ }
String msg = errorHandler.getErrors();
assertTrue("Unexpectd message: " + msg, msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
}
@@ -137,8 +142,8 @@
Service service = Service.create(wsdlURL, SERVICE_NAME);
MyTest port = service.getPort(MyTest.class);
- port.performTest(new Long(1000));
- port.performTest(new Long(2000));
+ port.performTest(new Integer(1000));
+ port.performTest(new Integer(2000));
}
public void testValidatingEndpoint() throws Exception
@@ -147,18 +152,36 @@
Service service = Service.create(wsdlURL, SERVICE_NAME);
MyTest port = service.getPort(MyTest.class);
- port.performTest(new Long(1000));
+ port.performTest(new Integer(1000));
try
{
- port.performTest(new Long(2000));
+ port.performTest(new Integer(2000));
}
catch (Exception ex)
{
String msg = ex.getMessage();
assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
}
-}
+ }
+ public void testValidatingImportEndpoint() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1172/doval-import?wsdl");
+
+ Service service = Service.create(wsdlURL, SERVICE_NAME);
+ MyTest port = service.getPort(MyTest.class);
+ port.performTest(new Integer(1000));
+ try
+ {
+ port.performTest(new Integer(2000));
+ }
+ catch (Exception ex)
+ {
+ String msg = ex.getMessage();
+ assertTrue("Unexpectd message: " + ex.getMessage(), msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive '1000'") > 0);
+ }
+ }
+
private static class TestErrorHandler implements ErrorHandler
{
private StringBuilder errors = new StringBuilder();
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1172;
+
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.SchemaValidation;
+
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
+ targetNamespace = "http://www.my-company.it/ws/my-test",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
+
+@SchemaValidation
+public class NestedSchemaValidatingEndpoint
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(NestedSchemaValidatingEndpoint.class);
+
+ public void performTest(Integer code)
+ {
+ log.info(code);
+ }
+}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -25,16 +25,17 @@
import org.jboss.logging.Logger;
-@WebService(serviceName = "MyTestService",
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
targetNamespace = "http://www.my-company.it/ws/my-test",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest")
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/NoValTestService.wsdl")
public class NonValidatingEndpoint
{
// provide logging
private static Logger log = Logger.getLogger(NonValidatingEndpoint.class);
- public void performTest(Long code)
+ public void performTest(Integer code)
{
log.info(code);
}
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1172;
-
-import javax.jws.WebService;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.SchemaValidation;
-
-@WebService(serviceName = "MyTestService", portName = "MyTestPort",
- targetNamespace = "http://www.my-company.it/ws/my-test",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
- wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
-
-@SchemaValidation
-public class ValidatingEndpoint
-{
- // provide logging
- private static Logger log = Logger.getLogger(ValidatingEndpoint.class);
-
- public void performTest(Long code)
- {
- log.info(code);
- }
-}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,55 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
-
/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.1.1-b03-
- * Generated source version: 2.0
+ * This class was generated by Apache CXF 2.6.0-SNAPSHOT
+ * 2012-07-17T00:38:10.376+08:00
+ * Generated source version: 2.6.0-SNAPSHOT
*
*/
-@WebService(name = "MyTest", targetNamespace = "http://www.my-company.it/ws/my-test")
+@WebService(targetNamespace = "http://www.my-company.it/ws/my-test", name = "MyTest")
+(a)XmlSeeAlso({ObjectFactory.class})
public interface MyTest {
-
- /**
- *
- * @param code
- * @throws MyWSException_Exception
- */
- @WebMethod(action = "urn:performTest")
@RequestWrapper(localName = "performTest", targetNamespace = "http://www.my-company.it/ws/my-test", className = "org.jboss.test.ws.jaxws.jbws1172.types.PerformTest")
+ @WebMethod(action = "urn:performTest")
@ResponseWrapper(localName = "performTestResponse", targetNamespace = "http://www.my-company.it/ws/my-test", className = "org.jboss.test.ws.jaxws.jbws1172.types.PerformTestResponse")
public void performTest(
- @WebParam(name = "Code", targetNamespace = "http://www.my-company.it/ws/my-test")
- Long code)
- throws MyWSException_Exception
- ;
-
+ @WebParam(name = "Code", targetNamespace = "")
+ java.lang.Integer code
+ ) throws MyWSException_Exception;
}
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1172.types;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-
-
-/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.1.1-b03-
- * Generated source version: 2.0
- *
- */
-@WebServiceClient(name = "MyTestService", targetNamespace = "http://www.my-company.it/ws/my-test", wsdlLocation = "file:/home/tdiesler/svn/jbossws/stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl")
-public class MyTestService
- extends Service
-{
-
- private final static URL MYTESTSERVICE_WSDL_LOCATION;
-
- static {
- URL url = null;
- try {
- url = new URL("file:/home/tdiesler/svn/jbossws/stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- MYTESTSERVICE_WSDL_LOCATION = url;
- }
-
- public MyTestService(URL wsdlLocation, QName serviceName) {
- super(wsdlLocation, serviceName);
- }
-
- public MyTestService() {
- super(MYTESTSERVICE_WSDL_LOCATION, new QName("http://www.my-company.it/ws/my-test", "MyTestService"));
- }
-
- /**
- *
- * @return
- * returns MyTest
- */
- @WebEndpoint(name = "MyTestPort")
- public MyTest getMyTestPort() {
- return (MyTest)super.getPort(new QName("http://www.my-company.it/ws/my-test", "MyTestPort"), MyTest.class);
- }
-
-}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
@@ -47,7 +27,7 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "MyWSException", propOrder = {
+@XmlType(name = "MyWSException", namespace = "http://www.my-company.it/ws/my-test", propOrder = {
"message"
})
public class MyWSException {
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,74 +1,43 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.ws.WebFault;
/**
- * This class was generated by the JAX-WS RI.
- * JAX-WS RI 2.1.1-b03-
- * Generated source version: 2.0
- *
+ * This class was generated by Apache CXF 2.6.0-SNAPSHOT
+ * 2012-07-17T00:38:10.286+08:00
+ * Generated source version: 2.6.0-SNAPSHOT
*/
+
@WebFault(name = "MyWSException", targetNamespace = "http://www.my-company.it/ws/my-test")
-public class MyWSException_Exception
- extends Exception
-{
+public class MyWSException_Exception extends Exception {
+
+ private org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException;
- /**
- * Java type that goes as soapenv:Fault detail element.
- *
- */
- private MyWSException faultInfo;
+ public MyWSException_Exception() {
+ super();
+ }
+
+ public MyWSException_Exception(String message) {
+ super(message);
+ }
+
+ public MyWSException_Exception(String message, Throwable cause) {
+ super(message, cause);
+ }
- /**
- *
- * @param faultInfo
- * @param message
- */
- public MyWSException_Exception(String message, MyWSException faultInfo) {
+ public MyWSException_Exception(String message, org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException) {
super(message);
- this.faultInfo = faultInfo;
+ this.myWSException = myWSException;
}
- /**
- *
- * @param faultInfo
- * @param message
- * @param cause
- */
- public MyWSException_Exception(String message, MyWSException faultInfo, Throwable cause) {
+ public MyWSException_Exception(String message, org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException, Throwable cause) {
super(message, cause);
- this.faultInfo = faultInfo;
+ this.myWSException = myWSException;
}
- /**
- *
- * @return
- * returns fault bean: org.jboss.test.ws.jaxws.jbws1172.types.MyWSException
- */
- public MyWSException getFaultInfo() {
- return faultInfo;
+ public org.jboss.test.ws.jaxws.jbws1172.types.MyWSException getFaultInfo() {
+ return this.myWSException;
}
-
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.JAXBElement;
@@ -45,8 +25,8 @@
public class ObjectFactory {
private final static QName _PerformTest_QNAME = new QName("http://www.my-company.it/ws/my-test", "performTest");
- private final static QName _MyWSException_QNAME = new QName("http://www.my-company.it/ws/my-test", "MyWSException");
private final static QName _PerformTestResponse_QNAME = new QName("http://www.my-company.it/ws/my-test", "performTestResponse");
+ private final static QName _MyWSException_QNAME = new QName("http://www.my-company.it/ws/my-test", "MyWSException");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws1172.types
@@ -56,11 +36,11 @@
}
/**
- * Create an instance of {@link MyWSException }
+ * Create an instance of {@link PerformTestResponse }
*
*/
- public MyWSException createMyWSException() {
- return new MyWSException();
+ public PerformTestResponse createPerformTestResponse() {
+ return new PerformTestResponse();
}
/**
@@ -72,11 +52,11 @@
}
/**
- * Create an instance of {@link PerformTestResponse }
+ * Create an instance of {@link MyWSException }
*
*/
- public PerformTestResponse createPerformTestResponse() {
- return new PerformTestResponse();
+ public MyWSException createMyWSException() {
+ return new MyWSException();
}
/**
@@ -89,21 +69,21 @@
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link MyWSException }{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link PerformTestResponse }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name = "MyWSException")
- public JAXBElement<MyWSException> createMyWSException(MyWSException value) {
- return new JAXBElement<MyWSException>(_MyWSException_QNAME, MyWSException.class, null, value);
+ @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name = "performTestResponse")
+ public JAXBElement<PerformTestResponse> createPerformTestResponse(PerformTestResponse value) {
+ return new JAXBElement<PerformTestResponse>(_PerformTestResponse_QNAME, PerformTestResponse.class, null, value);
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link PerformTestResponse }{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link MyWSException }{@code >}}
*
*/
- @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name = "performTestResponse")
- public JAXBElement<PerformTestResponse> createPerformTestResponse(PerformTestResponse value) {
- return new JAXBElement<PerformTestResponse>(_PerformTestResponse_QNAME, PerformTestResponse.class, null, value);
+ @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name = "MyWSException")
+ public JAXBElement<MyWSException> createMyWSException(MyWSException value) {
+ return new JAXBElement<MyWSException>(_MyWSException_QNAME, MyWSException.class, null, value);
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
@@ -37,7 +17,7 @@
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="Code" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * <element name="Code" type="{http://www.my-company.it/ws/my-test2}CodeType"/>
* </sequence>
* </restriction>
* </complexContent>
@@ -52,18 +32,18 @@
})
public class PerformTest {
- @XmlElement(name = "Code", required = true, type = Long.class, nillable = true)
- protected Long code;
+ @XmlElement(name = "Code", required = true, type = Integer.class, nillable = true)
+ protected Integer code;
/**
* Gets the value of the code property.
*
* @return
* possible object is
- * {@link Long }
+ * {@link Integer }
*
*/
- public Long getCode() {
+ public Integer getCode() {
return code;
}
@@ -72,10 +52,10 @@
*
* @param value
* allowed object is
- * {@link Long }
+ * {@link Integer }
*
*/
- public void setCode(Long value) {
+ public void setCode(Integer value) {
this.code = value;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.jbws1172.types;
import javax.xml.bind.annotation.XmlAccessType;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,23 +1,2 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://www.my-company.it/ws/my-test", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://www.my-company.it/ws/my-test2")
package org.jboss.test.ws.jaxws.jbws1172.types;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml 2012-07-17 06:02:10 UTC (rev 16474)
@@ -10,9 +10,14 @@
<servlet>
<servlet-name>ValidatingEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1172.ValidatingEndpoint</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1172.NestedSchemaValidatingEndpoint</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>ValidatingEndpointWithImportSchema</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1172.ImportedSchemaValidatingEndpoint</servlet-class>
+ </servlet>
+
<servlet-mapping>
<servlet-name>NonValidatingEndpoint</servlet-name>
<url-pattern>/noval</url-pattern>
@@ -22,4 +27,10 @@
<servlet-name>ValidatingEndpoint</servlet-name>
<url-pattern>/doval</url-pattern>
</servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ValidatingEndpointWithImportSchema</servlet-name>
+ <url-pattern>/doval-import</url-pattern>
+ </servlet-mapping>
+
</web-app>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,70 @@
+<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:type2="http://www.my-company.it/ws/my-test2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <schema targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://www.my-company.it/ws/my-test2"/>
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse" type="type2:performTestResponse"/>
+ </schema>
+ <schema targetNamespace="http://www.my-company.it/ws/my-test2" xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <complexType name="performTest">
+ <sequence>
+ <element name="Code" nillable="true" type="tns:CodeType"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTestResponse">
+ <sequence/>
+ </complexType>
+ <simpleType name="CodeType">
+ <restriction base="integer">
+ <minInclusive value="0"/>
+ <maxInclusive value="1000"/>
+ </restriction>
+ </simpleType>
+ </schema>
+ </types>
+ <message name="MyTest_performTestResponse">
+ <part element="tns:performTestResponse" name="result"/>
+ </message>
+ <message name="MyTest_performTest">
+ <part element="tns:performTest" name="parameters"/>
+ </message>
+ <message name="MyWSException">
+ <part element="tns:MyWSException" name="MyWSException"/>
+ </message>
+ <portType name="MyTest">
+ <operation name="performTest">
+ <input message="tns:MyTest_performTest"/>
+ <output message="tns:MyTest_performTestResponse"/>
+ <fault message="tns:MyWSException" name="MyWSException"/>
+ </operation>
+ </portType>
+ <binding name="MyTestBinding" type="tns:MyTest">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="performTest">
+ <soap:operation soapAction="urn:performTest"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="MyWSException">
+ <soap:fault name="MyWSException" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="MyTestService">
+ <port binding="tns:MyTestBinding" name="MyTestPort">
+ <soap:address location="http://@jboss.bind.address@:9999/jaxws-jbws1172/noval"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl 2012-07-16 21:45:17 UTC (rev 16473)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl 2012-07-17 06:02:10 UTC (rev 16474)
@@ -1,12 +1,20 @@
-<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:type2="http://www.my-company.it/ws/my-test2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
- <schema elementFormDefault="qualified" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema"
+ <schema targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://www.my-company.it/ws/my-test2"/>
<complexType name="MyWSException">
<sequence>
<element name="message" nillable="true" type="string"/>
</sequence>
</complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse" type="type2:performTestResponse"/>
+ </schema>
+ <schema targetNamespace="http://www.my-company.it/ws/my-test2" xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
<complexType name="performTest">
<sequence>
<element name="Code" nillable="true" type="tns:CodeType"/>
@@ -21,9 +29,6 @@
<maxInclusive value="1000"/>
</restriction>
</simpleType>
- <element name="MyWSException" type="tns:MyWSException"/>
- <element name="performTest" type="tns:performTest"/>
- <element name="performTestResponse" type="tns:performTestResponse"/>
</schema>
</types>
<message name="MyTest_performTestResponse">
@@ -59,7 +64,7 @@
</binding>
<service name="MyTestService">
<port binding="tns:MyTestBinding" name="MyTestPort">
- <soap:address location="http://@jboss.bind.address@:8080/jaxws-jbws1172/noval"/>
+ <soap:address location="http://@jboss.bind.address@:9090/jaxws-jbws1172/doval"/>
</port>
</service>
</definitions>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,53 @@
+<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:type2="http://www.my-company.it/ws/my-test2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <schema elementFormDefault="qualified" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://www.my-company.it/ws/my-test2" schemaLocation = "type1.xsd"/>
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse" type="type2:performTestResponse"/>
+ </schema>
+
+ </types>
+ <message name="MyTest_performTestResponse">
+ <part element="tns:performTestResponse" name="result"/>
+ </message>
+ <message name="MyTest_performTest">
+ <part element="tns:performTest" name="parameters"/>
+ </message>
+ <message name="MyWSException">
+ <part element="tns:MyWSException" name="MyWSException"/>
+ </message>
+ <portType name="MyTest">
+ <operation name="performTest">
+ <input message="tns:MyTest_performTest"/>
+ <output message="tns:MyTest_performTestResponse"/>
+ <fault message="tns:MyWSException" name="MyWSException"/>
+ </operation>
+ </portType>
+ <binding name="MyTestBinding" type="tns:MyTest">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="performTest">
+ <soap:operation soapAction="urn:performTest"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="MyWSException">
+ <soap:fault name="MyWSException" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="MyTestService">
+ <port binding="tns:MyTestBinding" name="MyTestPort">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-jbws1172/noval"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd 2012-07-17 06:02:10 UTC (rev 16474)
@@ -0,0 +1,19 @@
+<schema targetNamespace="http://www.my-company.it/ws/my-test2"
+ xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.my-company.it/ws/my-test2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <complexType name="performTest">
+ <sequence>
+ <element name="Code" nillable="true" type="tns:CodeType" />
+ </sequence>
+ </complexType>
+ <complexType name="performTestResponse">
+ <sequence />
+ </complexType>
+ <simpleType name="CodeType">
+ <restriction base="integer">
+ <minInclusive value="0" />
+ <maxInclusive value="1000" />
+ </restriction>
+ </simpleType>
+</schema>
\ No newline at end of file
12 years, 6 months
JBossWS SVN: r16473 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2012-07-16 17:45:17 -0400 (Mon, 16 Jul 2012)
New Revision: 16473
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
[JBPAPP-7112] Preamble is omitted when supplying WSDL and external XSDs
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-07-16 20:30:51 UTC (rev 16472)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-07-16 21:45:17 UTC (rev 16473)
@@ -629,7 +629,7 @@
Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
- new DOMWriter(writer).setPrettyprint(true).print(document.getDocumentElement());
+ new DOMWriter(writer, Constants.DEFAULT_XML_CHARSET).setPrettyprint(true).print(document.getDocumentElement());
}
private void handleException(Exception ex) throws ServletException
12 years, 6 months
JBossWS SVN: r16472 - in stack/native/branches/jbossws-native-3.1.2: modules/core and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2012-07-16 16:30:51 -0400 (Mon, 16 Jul 2012)
New Revision: 16472
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/IssuerMatchTestCase.java
Modified:
stack/native/branches/jbossws-native-3.1.2/
stack/native/branches/jbossws-native-3.1.2/modules/core/
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/
Log:
[JBPAPP-7982] Enhance X509 certificate issuer comparison
Property changes on: stack/native/branches/jbossws-native-3.1.2
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365:14192
/stack/native/branches/jbossws-native-3.4.0.SP1:13928,13933,13936,13946
/stack/native/trunk:12502,13992,14157,14160,14181,14183,14842
+ /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365:14192
/stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-8007:15579
/stack/native/branches/jbossws-native-3.4.0.SP1:13928,13933,13936,13946
/stack/native/trunk:12502,13992,14157,14160,14181,14183,14842
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/core
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128/modules/core:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/core:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/core:13928,13933,13936,13946
/stack/native/trunk/modules/core:12502,13992,14011,14157,14160,14181,14183,14842
+ /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128/modules/core:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/core:14192
/stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-8007/modules/core:15579
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/core:13928,13933,13936,13946
/stack/native/trunk/modules/core:12502,13992,14011,14157,14160,14181,14183,14842
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2012-07-16 18:24:36 UTC (rev 16471)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2012-07-16 20:30:51 UTC (rev 16472)
@@ -50,6 +50,8 @@
import java.util.Properties;
import java.util.StringTokenizer;
+import javax.security.auth.x500.X500Principal;
+
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.security.exception.FailedAuthenticationException;
import org.jboss.ws.extensions.security.exception.WSSecurityException;
@@ -492,11 +494,12 @@
continue;
X509Certificate x509 = (X509Certificate)cert;
- if (issuer.equals(x509.getIssuerDN().toString()) && serial.equals(x509.getSerialNumber().toString()))
+ X500Principal principal = new X500Principal(issuer);
+ if (principal.equals(x509.getIssuerX500Principal()) && serial.equals(x509.getSerialNumber().toString()))
return x509;
}
}
- catch (KeyStoreException e)
+ catch (Exception e)
{
throw new WSSecurityException("Problems retrieving cert: " + e.getMessage(), e);
}
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128/modules/testsuite/native-tests:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/testsuite/native-tests:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/testsuite/native-tests:14192
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/testsuite/native-tests:13928,13933,13936,13946
/stack/native/trunk/modules/testsuite/native-tests:12502,13992,14013,14157,14160,14181,14183,14842
+ /stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP-8128/modules/testsuite/native-tests:15667
/stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/testsuite/native-tests:14776-14778,14786,14894,14905,14907-14908
/stack/native/branches/jbossws-native-3.1.2.SP3-patch-02_JBPAPP-6365/modules/testsuite/native-tests:14192
/stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-8007/modules/testsuite/native-tests:15579
/stack/native/branches/jbossws-native-3.4.0.SP1/modules/testsuite/native-tests:13928,13933,13936,13946
/stack/native/trunk/modules/testsuite/native-tests:12502,13992,14013,14157,14160,14181,14183,14842
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/IssuerMatchTestCase.java (from rev 15579, stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-8007/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/IssuerMatchTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/IssuerMatchTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/IssuerMatchTestCase.java 2012-07-16 20:30:51 UTC (rev 16472)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import java.net.URL;
+import java.security.cert.X509Certificate;
+
+import org.jboss.ws.extensions.security.SecurityStore;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+public class IssuerMatchTestCase extends JBossWSTest
+{
+ public void testIssuerMatch() throws Exception
+ {
+ //The space at the beginning of the issuer string causes
+ //the signer to not match exactly
+ //TODO: get these values from the certificate
+ String issuer = " EMAILADDRESS=admin(a)jboss.com, CN=jboss.com, OU=QA, O=JBoss Inc., L=Snoqualmie Pass, ST=Washington, C=US";
+ String serial = "3";
+
+ URL keystoreUrl = getResourceURL("jaxws/samples/wssecurity/wsse.keystore");
+ WSSecurityConfiguration config = new WSSecurityConfiguration();
+ config.setKeyStoreURL(keystoreUrl);
+ config.setKeyStoreType("jks");
+ config.setKeyStorePassword("jbossws");
+ SecurityStore store = new SecurityStore(config);
+ X509Certificate cert = store.getCertificateByIssuerSerial(issuer, serial);
+
+ assertNotNull("Certificate null?", cert);
+ }
+}
12 years, 6 months