JBossWS SVN: r11722 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-05 06:58:12 -0500 (Fri, 05 Mar 2010)
New Revision: 11722
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2021][JBWS-2948] using latest jboss-metadata-common
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2010-03-05 07:18:07 UTC (rev 11721)
+++ stack/native/trunk/modules/testsuite/pom.xml 2010-03-05 11:58:12 UTC (rev 11722)
@@ -26,7 +26,7 @@
<wsdl.publish.location>${project.build.directory}/wsdl-publish</wsdl.publish.location>
<hibernate.version>3.2.4.sp1</hibernate.version>
<jboss.javaee.version>5.0.0.GA</jboss.javaee.version>
- <jboss.metadata.common.version>2.0.0.Alpha12</jboss.metadata.common.version>
+ <jboss.metadata.common.version>2.0.0.Alpha13</jboss.metadata.common.version>
</properties>
<!-- Modules -->
14 years, 10 months
JBossWS SVN: r11721 - in stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-05 02:18:07 -0500 (Fri, 05 Mar 2010)
New Revision: 11721
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBPAPP-3832]:adding testcase
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 2010-03-05 07:16:42 UTC (rev 11720)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-05 07:18:07 UTC (rev 11721)
@@ -613,8 +613,19 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2949 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2949.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2949/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
-
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+import javax.jws.WebService;
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws2949")
+public interface Endpoint
+{
+
+ public String echo(final String message);
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "Endpoint", portName = "EndpointPort", serviceName="EndpointService", targetNamespace = "http://ws.jboss.org/jbws2949", endpointInterface = "org.jboss.test.ws.jaxws.jbws2949.Endpoint")
+@HandlerChain(file = "server-handlers.xml")
+public class EndpointImpl implements Endpoint
+{
+ public String echo(final String message)
+ {
+ return message;
+ }
+
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2949;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.jbws2927.WSAEndpoint;
+import org.jboss.ws.core.soap.NodeImpl;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class JBWS2949TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2949";
+
+ private static WSAEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2949TestCase.class, "jaxws-jbws2949.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org/jbws2949", "EndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(WSAEndpoint.class);
+ }
+
+ public void testCall() throws Exception
+ {
+ String response = port.echo("testJBWS2949");
+ assertEquals("PutByServerHandler2", response);
+ }
+}
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElementFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class SOAPHandler1 extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessageContext smc = (SOAPMessageContext) msgContext;
+ SOAPMessage message = smc.getMessage();
+
+ SOAPBody body = message.getSOAPBody();
+ Document document = body.extractContentAsDocument();
+ NodeList nodes = document.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Node current = nodes.item(i);
+
+ NodeList childNodes = current.getChildNodes();
+ for (int j = 0; j < childNodes.getLength(); j++)
+ {
+ Node currentChildNode = childNodes.item(j);
+ if ("arg0".equals(currentChildNode.getLocalName()))
+ {
+ currentChildNode.setTextContent("PutByServerHandler1");
+ }
+ }
+ }
+ body.addDocument(document);
+ message.saveChanges();
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Error in Handler", e);
+ }
+ return true;
+ }
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElementFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class SOAPHandler2 extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessageContext smc = (SOAPMessageContext) msgContext;
+ SOAPMessage message = smc.getMessage();
+
+ SOAPBody body = message.getSOAPBody();
+ Document document = body.extractContentAsDocument();
+ NodeList nodes = document.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Node current = nodes.item(i);
+
+ NodeList childNodes = current.getChildNodes();
+ for (int j = 0; j < childNodes.getLength(); j++)
+ {
+ Node currentChildNode = childNodes.item(j);
+ if ("arg0".equals(currentChildNode.getLocalName()))
+ {
+ currentChildNode.setTextContent("PutByServerHandler2");
+ }
+ }
+ }
+ body.addDocument(document);
+ message.saveChanges();
+
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Error in Handler", e);
+ }
+ return true;
+ }
+}
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <port-name-pattern xmlns:ns1="http://ws.jboss.org/jbws2949">foo:EndpointPort</port-name-pattern>
+ <handler>
+ <handler-name>SOAPServerHandler1</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws2949.SOAPHandler1</handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <port-name-pattern xmlns:ns1="http://ws.jboss.org/jbws2949">ns1:EndpointPort</port-name-pattern>
+ <handler>
+ <handler-name>SOAPServerHandler2</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws2949.SOAPHandler2</handler-class>
+ </handler>
+ </handler-chain>
+
+
+</handler-chains>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2949</context-root>
+</jboss-web>
\ No newline at end of file
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml 2010-03-05 07:18:07 UTC (rev 11721)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2949.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
14 years, 10 months
JBossWS SVN: r11720 - spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-05 02:16:42 -0500 (Fri, 05 Mar 2010)
New Revision: 11720
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
Log:
[JBPAPP-3832]:ingore the handlerchain contains illegal namesapce prefix
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-05 06:12:55 UTC (rev 11719)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-05 07:16:42 UTC (rev 11720)
@@ -74,7 +74,10 @@
public void addChild(UnifiedHandlerChainsMetaData handlerConfig, UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI,
String localName)
{
- handlerConfig.addHandlerChain(handlerChain);
+ if (!handlerChain.isExcluded())
+ {
+ handlerConfig.addHandlerChain(handlerChain);
+ }
}
/**
@@ -121,12 +124,21 @@
if (log.isTraceEnabled())
log.trace("UnifiedHandlerChainMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
- if (localName.equals("protocol-bindings"))
- handlerChain.setProtocolBindings(value);
- else if (localName.equals("service-name-pattern"))
- handlerChain.setServiceNamePattern(navigator.resolveQName(value));
- else if (localName.equals("port-name-pattern"))
- handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ try
+ {
+ if (localName.equals("protocol-bindings"))
+ handlerChain.setProtocolBindings(value);
+ else if (localName.equals("service-name-pattern"))
+ handlerChain.setServiceNamePattern(navigator.resolveQName(value));
+ else if (localName.equals("port-name-pattern"))
+ handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ }
+ catch (java.lang.IllegalStateException ex)
+ {
+ log.warn("Could not get " + localName + " value : "
+ + ex.getMessage() + ", this handler chain will be ingored");
+ handlerChain.setExcluded(true);
+ }
}
/**
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-05 06:12:55 UTC (rev 11719)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-05 07:16:42 UTC (rev 11720)
@@ -42,6 +42,7 @@
private String protocolBindings;
private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
private PortInfo portInfo;
+ private boolean excluded;
public UnifiedHandlerChainMetaData(UnifiedHandlerChainsMetaData handlerChains)
{
@@ -91,4 +92,12 @@
{
handlers.add(handler);
}
+
+ public boolean isExcluded() {
+ return this.excluded;
+ }
+
+ public void setExcluded(boolean excluded) {
+ this.excluded = excluded;
+ }
}
14 years, 10 months
JBossWS SVN: r11719 - in stack/native/trunk/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-05 01:12:55 -0500 (Fri, 05 Mar 2010)
New Revision: 11719
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBWS-2949]:Adding testcase
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-05 06:09:00 UTC (rev 11718)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-03-05 06:12:55 UTC (rev 11719)
@@ -607,6 +607,18 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2949 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2949.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2949/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/Endpoint.java 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+import javax.jws.WebService;
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws2949")
+public interface Endpoint
+{
+
+ public String echo(final String message);
+
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/EndpointImpl.java 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "Endpoint", portName = "EndpointPort", serviceName="EndpointService", targetNamespace = "http://ws.jboss.org/jbws2949", endpointInterface = "org.jboss.test.ws.jaxws.jbws2949.Endpoint")
+@HandlerChain(file = "server-handlers.xml")
+public class EndpointImpl implements Endpoint
+{
+ public String echo(final String message)
+ {
+ return message;
+ }
+
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.java 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2949;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.jbws2927.WSAEndpoint;
+import org.jboss.ws.core.soap.NodeImpl;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class JBWS2949TestCase extends JBossWSTest
+{
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2949";
+
+ private static WSAEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2949TestCase.class, "jaxws-jbws2949.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org/jbws2949", "EndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(WSAEndpoint.class);
+ }
+
+ public void testCall() throws Exception
+ {
+ String response = port.echo("testJBWS2949");
+ assertEquals("PutByServerHandler2", response);
+ }
+}
\ No newline at end of file
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElementFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class SOAPHandler1 extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessageContext smc = (SOAPMessageContext) msgContext;
+ SOAPMessage message = smc.getMessage();
+
+ SOAPBody body = message.getSOAPBody();
+ Document document = body.extractContentAsDocument();
+ NodeList nodes = document.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Node current = nodes.item(i);
+
+ NodeList childNodes = current.getChildNodes();
+ for (int j = 0; j < childNodes.getLength(); j++)
+ {
+ Node currentChildNode = childNodes.item(j);
+ if ("arg0".equals(currentChildNode.getLocalName()))
+ {
+ currentChildNode.setTextContent("PutByServerHandler1");
+ }
+ }
+ }
+ body.addDocument(document);
+ message.saveChanges();
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Error in Handler", e);
+ }
+ return true;
+ }
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.jbws2949;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElementFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class SOAPHandler2 extends GenericSOAPHandler<LogicalMessageContext>
+{
+ @Override
+ protected boolean handleInbound(final MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessageContext smc = (SOAPMessageContext) msgContext;
+ SOAPMessage message = smc.getMessage();
+
+ SOAPBody body = message.getSOAPBody();
+ Document document = body.extractContentAsDocument();
+ NodeList nodes = document.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Node current = nodes.item(i);
+
+ NodeList childNodes = current.getChildNodes();
+ for (int j = 0; j < childNodes.getLength(); j++)
+ {
+ Node currentChildNode = childNodes.item(j);
+ if ("arg0".equals(currentChildNode.getLocalName()))
+ {
+ currentChildNode.setTextContent("PutByServerHandler2");
+ }
+ }
+ }
+ body.addDocument(document);
+ message.saveChanges();
+
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Error in Handler", e);
+ }
+ return true;
+ }
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <port-name-pattern xmlns:ns1="http://ws.jboss.org/jbws2949">foo:EndpointPort</port-name-pattern>
+ <handler>
+ <handler-name>SOAPServerHandler1</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws2949.SOAPHandler1</handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <port-name-pattern xmlns:ns1="http://ws.jboss.org/jbws2949">ns1:EndpointPort</port-name-pattern>
+ <handler>
+ <handler-name>SOAPServerHandler2</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws2949.SOAPHandler2</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
\ No newline at end of file
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/jboss-web.xml 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2949</context-root>
+</jboss-web>
\ No newline at end of file
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/WEB-INF/web.xml 2010-03-05 06:12:55 UTC (rev 11719)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2949.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
14 years, 10 months
JBossWS SVN: r11718 - spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-05 01:09:00 -0500 (Fri, 05 Mar 2010)
New Revision: 11718
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
Log:
[JBWS-2949]:ignore the handlerchain which contains illegal namespace prefix
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-04 21:01:55 UTC (rev 11717)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-05 06:09:00 UTC (rev 11718)
@@ -74,7 +74,7 @@
public void addChild(UnifiedHandlerChainsMetaData handlerConfig, UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI,
String localName)
{
- handlerConfig.addHandlerChain(handlerChain);
+ if (!handlerChain.isExcluded()) handlerConfig.addHandlerChain(handlerChain);
}
/**
@@ -120,13 +120,21 @@
{
if (log.isTraceEnabled())
log.trace("UnifiedHandlerChainMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
-
- if (localName.equals("protocol-bindings"))
- handlerChain.setProtocolBindings(value);
- else if (localName.equals("service-name-pattern"))
- handlerChain.setServiceNamePattern(navigator.resolveQName(value));
- else if (localName.equals("port-name-pattern"))
- handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ try
+ {
+ if (localName.equals("protocol-bindings"))
+ handlerChain.setProtocolBindings(value);
+ else if (localName.equals("service-name-pattern"))
+ handlerChain.setServiceNamePattern(navigator.resolveQName(value));
+ else if (localName.equals("port-name-pattern"))
+ handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ }
+ catch (java.lang.IllegalStateException ex)
+ {
+ log.warn("Could not get " + localName + " value : "
+ + ex.getMessage() + ", this handler chain will be ingored");
+ handlerChain.setExcluded(true);
+ }
}
/**
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-04 21:01:55 UTC (rev 11717)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-05 06:09:00 UTC (rev 11718)
@@ -42,6 +42,7 @@
private String protocolBindings;
private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
private PortInfo portInfo;
+ private boolean excluded;
public UnifiedHandlerChainMetaData(UnifiedHandlerChainsMetaData handlerChains)
{
@@ -91,4 +92,12 @@
{
handlers.add(handler);
}
+
+ public boolean isExcluded() {
+ return this.excluded;
+ }
+
+ public void setExcluded(boolean excluded) {
+ this.excluded = excluded;
+ }
}
14 years, 10 months
JBossWS SVN: r11716 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-04 15:58:06 -0500 (Thu, 04 Mar 2010)
New Revision: 11716
Added:
spi/tags/jbossws-spi-1.3.0.Beta4/
Log:
Tagging jbossws-spi-1.3.0.Beta4
Copied: spi/tags/jbossws-spi-1.3.0.Beta4 (from rev 11715, spi/trunk)
14 years, 10 months
JBossWS SVN: r11715 - in spi/trunk/src/main/java/org/jboss/wsf/spi: metadata/j2ee/serviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-04 15:53:09 -0500 (Thu, 04 Mar 2010)
New Revision: 11715
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/WritableUnifiedVirtualFile.java
spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
Log:
[JBWS-2021][JBWS-2948] Adding WritableUnifiedVirtualFile interface, redefining serialization of UnifiedServiceRefMetaData (check if the UnifiedVirtualFile is actually usable, if not get file content from the reference when available), adding URLLoaderAdapter to spi.
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/WritableUnifiedVirtualFile.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/WritableUnifiedVirtualFile.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/WritableUnifiedVirtualFile.java 2010-03-04 20:53:09 UTC (rev 11715)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author alessio.soldano(a)jboss.com
+ * @since 04-Mar-2010
+ */
+public interface WritableUnifiedVirtualFile extends UnifiedVirtualFile
+{
+ public void writeContent(OutputStream os) throws IOException;
+
+ public void writeContent(OutputStream os, NameFilter filter) throws IOException;
+
+ public interface NameFilter
+ {
+ public boolean accept(String fileName);
+ }
+}
Property changes on: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/WritableUnifiedVirtualFile.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-03-04 14:30:50 UTC (rev 11714)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-03-04 20:53:09 UTC (rev 11715)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -21,36 +21,49 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
+
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.WritableUnifiedVirtualFile;
import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.wsf.spi.util.URLLoaderAdapter;
import org.w3c.dom.Element;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
/**
* The metdata data from service-ref element in web.xml, ejb-jar.xml, and
* application-client.xml.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
*/
public class UnifiedServiceRefMetaData extends ServiceRefMetaData
{
- private static final long serialVersionUID = -926464174132493951L;
+ private static final long serialVersionUID = -926464174132493952L;
// provide logging
private static Logger log = Logger.getLogger(UnifiedServiceRefMetaData.class);
- private UnifiedVirtualFile vfsRoot;
+ private transient UnifiedVirtualFile vfsRoot;
// Standard properties
@@ -426,7 +439,77 @@
ServiceRefMetaDataParserFactory factory = provider.getSPI(ServiceRefMetaDataParserFactory.class);
factory.getServiceRefMetaDataParser().importJBossXml(root, this);
}
+
+ private void writeObject(ObjectOutputStream out) throws IOException
+ {
+ out.defaultWriteObject();
+ out.writeObject(vfsRoot);
+ if (vfsRoot instanceof WritableUnifiedVirtualFile)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ((WritableUnifiedVirtualFile)vfsRoot).writeContent(bos, new WritableUnifiedVirtualFile.NameFilter() {
+ public boolean accept(String fileName)
+ {
+ boolean result = fileName.contains("META-INF");
+ result = result || fileName.endsWith(".wsdl");
+ result = result || fileName.endsWith(".xsd");
+ result = result || fileName.endsWith(".xml");
+ return result;
+ }
+ });
+ out.writeObject(bos.toByteArray());
+ out.writeObject(vfsRoot.getName());
+ }
+ }
+
+ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
+ {
+ in.defaultReadObject();
+ UnifiedVirtualFile obj = (UnifiedVirtualFile)in.readObject();
+ if (obj.toURL() == null && (obj instanceof WritableUnifiedVirtualFile))
+ {
+ //the virtual file has been created in a different VM (or is even pointing to a different filesystem), try getting the serialized contents
+ byte[] bytes = (byte[])in.readObject();
+ String vfName = (String)in.readObject();
+ ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
+ File tempFile = File.createTempFile("jbossws-vf-", "-" + vfName);
+ tempFile.deleteOnExit();
+ FileOutputStream fos = new FileOutputStream(tempFile);
+ copyStreamAndClose(fos, bis);
+ this.vfsRoot = new URLLoaderAdapter(tempFile.toURI().toURL());
+ }
+ else
+ {
+ this.vfsRoot = (UnifiedVirtualFile)obj;
+ }
+ }
+ private static void copyStreamAndClose(OutputStream outs, InputStream ins) throws IOException
+ {
+ try
+ {
+ byte[] bytes = new byte[1024];
+ int r = ins.read(bytes);
+ while (r > 0)
+ {
+ outs.write(bytes, 0, r);
+ r = ins.read(bytes);
+ }
+ }
+ catch (IOException e)
+ {
+ throw e;
+ }
+ finally{
+ try {
+ ins.close();
+ } catch (Exception e) {}
+ try {
+ outs.close();
+ } catch (Exception e) {}
+ }
+ }
+
public String toString()
{
StringBuilder str = new StringBuilder();
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java 2010-03-04 20:53:09 UTC (rev 11715)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Enumeration;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+
+/**
+ * Load resources through a URLClassLoader.<br>
+ * NOTE: The associated classloader doesn't do parent delegation.
+ *
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
+ * @since 25.01.2007
+ */
+public class URLLoaderAdapter implements UnifiedVirtualFile
+{
+ private static final long serialVersionUID = 8263115387770740414L;
+
+ private URL rootURL;
+ private URL resourceURL;
+ private transient URLClassLoader loader;
+ private static Logger log = Logger.getLogger(URLLoaderAdapter.class);
+ private static final String jarFileSeparator = "/";
+
+ public URLLoaderAdapter(URL rootURL)
+ {
+ this.rootURL = rootURL;
+ }
+
+ private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
+ {
+ this.rootURL = rootURL;
+ this.resourceURL = resourceURL;
+ this.loader = loader;
+ }
+
+ public UnifiedVirtualFile findChild(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null)
+ {
+ // Try the child as URL
+ try
+ {
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (resourceURL == null)
+ {
+ try
+ {
+ File file = new File(resourcePath);
+ if (file.exists())
+ resourceURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (resourceURL == null)
+ {
+ try
+ {
+ resourceURL = getResourceLoader().getResource(resourcePath);
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ if (resourceURL == null)
+ throw new IOException("Cannot get URL for: " + resourcePath);
+
+ return new URLLoaderAdapter(rootURL, loader, resourceURL);
+ }
+
+ public URL toURL()
+ {
+ if (resourceURL != null)
+ return resourceURL;
+ else
+ return rootURL;
+ }
+
+ private URLClassLoader getResourceLoader()
+ {
+ if (loader == null)
+ {
+ loader = new URLClassLoader(new URL[] { rootURL });
+ }
+ return loader;
+ }
+
+ public List<UnifiedVirtualFile> getChildren() throws IOException
+ {
+ List<UnifiedVirtualFile> list = new LinkedList<UnifiedVirtualFile>();
+
+ URL url = toURL();
+
+ if (url.getProtocol().equals("jar"))
+ {
+ String urlString = url.toExternalForm();
+ String jarRoot = urlString.substring(4, urlString.indexOf("ar!") + 2);
+ String path = urlString.contains("!") ? urlString.substring(urlString.lastIndexOf("!") + 2) : "";
+ if (path.endsWith(jarFileSeparator))
+ path = path.substring(0, path.lastIndexOf(jarFileSeparator));
+
+ try
+ {
+ String folder = jarRoot.substring(5,jarRoot.lastIndexOf(File.separator));
+ String filename = jarRoot.substring(jarRoot.lastIndexOf(File.separator)+1);
+ final File jar = new File(folder, filename);
+
+ PrivilegedAction<JarFile> action = new PrivilegedAction<JarFile>()
+ {
+ public JarFile run()
+ {
+ try
+ {
+ return new JarFile(jar);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ };
+ JarFile jarFile = AccessController.doPrivileged(action);
+
+ if (jar.canRead())
+ {
+ Enumeration<JarEntry> entries = jarFile.entries();
+ List<String> pathMatch = new LinkedList<String>();
+ List<String> finalMatch = new LinkedList<String>();
+ while (entries.hasMoreElements())
+ {
+ JarEntry entry = entries.nextElement();
+ String name = entry.getName();
+ //keep entries starting with the current resource path (exclude inner classes and the current file)
+ if (name.startsWith(path + jarFileSeparator) && (name.length() > path.length() + 1) && !name.contains("$"))
+ pathMatch.add(name.substring(path.length() + 1));
+ }
+
+ for (String s : pathMatch)
+ {
+ //do not go deeper than the current dir
+ if (!s.contains(jarFileSeparator) || s.indexOf(jarFileSeparator) == s.length() - 1)
+ finalMatch.add(s);
+ }
+ for (String s : finalMatch)
+ {
+ URL sUrl = new URL(urlString + jarFileSeparator + s);
+ list.add(new URLLoaderAdapter(rootURL, loader, sUrl));
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ log.error("Cannot get children for resource: " + url);
+ }
+ }
+ else //std file/dir
+ {
+ try
+ {
+ File file = new File(url.toURI());
+ if (file.exists() && file.isDirectory())
+ {
+ File[] files = file.listFiles();
+ if (files != null)
+ {
+ for (File f : files)
+ {
+ list.add(new URLLoaderAdapter(rootURL, loader, f.toURL()));
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Cannot get children for resource: " + url, e);
+ }
+ }
+ return list;
+ }
+
+ public String getName()
+ {
+ String name = null;
+ try
+ {
+ String filename = toURL().getFile();
+ File f = new File(filename);
+ name = f.getName();
+ if (f.isDirectory() || (toURL().getProtocol().equals("jar") && filename.endsWith(jarFileSeparator)))
+ name = name + jarFileSeparator;
+ }
+ catch (Exception e)
+ {
+ log.error("Cannot get name for resource: " + toURL(), e);
+ }
+ return name;
+ }
+}
Property changes on: spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 10 months
JBossWS SVN: r11714 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-04 09:30:50 -0500 (Thu, 04 Mar 2010)
New Revision: 11714
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
Log:
Removing System.out
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2010-03-03 11:45:47 UTC (rev 11713)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2010-03-04 14:30:50 UTC (rev 11714)
@@ -27,6 +27,7 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
+import org.jboss.logging.Logger;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -42,6 +43,7 @@
private final Endpoint[] proxies = new Endpoint[THREADS_COUNT];
private final Thread[] threads = new Thread[THREADS_COUNT];
private final TestJob[] jobs = new TestJob[THREADS_COUNT];
+ private final Logger log = Logger.getLogger(this.getClass());
@Override
protected void setUp() throws Exception
@@ -60,19 +62,19 @@
{
for (int i = 0; i < THREADS_COUNT; i++)
{
- System.out.println("Creating thread " + (i + 1));
+ log.debug("Creating thread " + (i + 1));
jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i);
threads[i] = new Thread(jobs[i]);
}
for (int i = 0; i < THREADS_COUNT; i++)
{
- System.out.println("Starting thread " + (i + 1));
+ log.debug("Starting thread " + (i + 1));
threads[i].start();
}
Exception e = null;
for (int i = 0; i < THREADS_COUNT; i++)
{
- System.out.println("Joining thread " + (i + 1));
+ log.debug("Joining thread " + (i + 1));
threads[i].join();
if (e == null)
e = jobs[i].getException();
@@ -86,6 +88,7 @@
private final Endpoint proxy;
private final int countOfRequests;
private Exception exception;
+ private static final Logger log = Logger.getLogger(TestJob.class);
TestJob(Endpoint proxy, int countOfRequests, String jobName)
{
@@ -102,14 +105,14 @@
{
this.setQueryParameter(proxy, i);
int retVal = proxy.getQueryParameter(jobName);
- System.out.println("Thread=" + this.jobName + ", iteration=" + i);
+ log.debug("Thread=" + this.jobName + ", iteration=" + i);
if (retVal != (i + 1))
throw new RuntimeException("Thread=" + this.jobName + ", iteration=" + i + ", received=" + retVal);
}
}
catch (Exception e)
{
- System.out.println("Exception caught: " + e.getMessage());
+ log.error("Exception caught: " + e.getMessage());
this.exception = e;
}
}
14 years, 10 months
JBossWS SVN: r11713 - in spi/trunk/src/main/java/org/jboss/wsf/spi/tools: ant and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-03 06:45:47 -0500 (Wed, 03 Mar 2010)
New Revision: 11713
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
Log:
[JBWS-2950] documenting JAX-WS 2.2 target in wsconsume
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2010-03-03 11:44:53 UTC (rev 11712)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2010-03-03 11:45:47 UTC (rev 11713)
@@ -165,8 +165,8 @@
public abstract void setAdditionalCompilerClassPath(List<String> classPath);
/**
- * Set the target JAX-WS specification target. Defaults to <code>2.0</code>
- * @param target the JAX-WS specification version. Allowed values are 2.0, 2.1
+ * Set the target JAX-WS specification target. Allowed values are 2.0, 2.1 and 2.2
+ * @param target the JAX-WS specification version.
*/
public abstract void setTarget(String target);
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2010-03-03 11:44:53 UTC (rev 11712)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2010-03-03 11:45:47 UTC (rev 11713)
@@ -53,7 +53,7 @@
* <tr><td>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
* <tr><td>extension</td><td>Enable SOAP 1.2 binding extension.</td><td>false</td></tr>
- * <tr><td>target</td><td>The JAX-WS specification target</td><td>2.0 | 2.1</td></tr>
+ * <tr><td>target</td><td>The JAX-WS specification target. Allowed values are 2.0, 2.1 and 2.2</td><td></td></tr>
* <tr><td>verbose</td><td>Enables more informational output about cmd progress.</td><td>false</td><tr>
* <tr><td>wsdl*</td><td>The WSDL file or URL</td><td>n/a</td><tr>
* </table>
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-03 11:44:53 UTC (rev 11712)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-03 11:45:47 UTC (rev 11713)
@@ -39,19 +39,21 @@
* <pre>
* usage: WSConsumeTask [options] <wsdl-url>
* options:
- * -h, --help Show this help message
- * -b, --binding=<file> One or more JAX-WS or JAXB binding files
- * -k, --keep Keep/Generate Java source
- * -c --catalog=<file> Oasis XML Catalog file for entity resolution
- * -p --package=<name> The target package for generated source
- * -w --wsdlLocation=<loc> Value to use for @(a)WebService.wsdlLocation
- * -o, --output=<directory> The directory to put generated artifacts
- * -s, --source=<directory> The directory to put Java source
- * -t, --target=<2.0|2.1> The target specification target
- * -q, --quiet Be somewhat more quiet
- * -v, --verbose Show full exception stack traces
- * -l, --load-consumer Load the consumer and exit (debug utility)
- * -e, --extension Enable SOAP 1.2 binding extension
+ * <table>
+ * <tr><td>-h, --help </td><td>Show this help message</td></tr>
+ * <tr><td>-b, --binding=<file> </td><td>One or more JAX-WS or JAXB binding files</td></tr>
+ * <tr><td>-k, --keep </td><td>Keep/Generate Java source</td></tr>
+ * <tr><td>-c, --catalog=<file> </td><td>Oasis XML Catalog file for entity resolution</td></tr>
+ * <tr><td>-p, --package=<name> </td><td>The target package for generated source</td></tr>
+ * <tr><td>-w, --wsdlLocation=<loc> </td><td>Value to use for @(a)WebService.wsdlLocation</td></tr>
+ * <tr><td>-o, --output=<directory> </td><td>The directory to put generated artifacts</td></tr>
+ * <tr><td>-s, --source=<directory> </td><td>The directory to put Java source</td></tr>
+ * <tr><td>-t, --target=<2.0|2.1|2.2></td><td>The target specification target</td></tr>
+ * <tr><td>-q, --quiet </td><td>Be somewhat more quiet</td></tr>
+ * <tr><td>-v, --verbose </td><td>Show full exception stack traces</td></tr>
+ * <tr><td>-l, --load-consumer </td><td>Load the consumer and exit (debug utility)</td></tr>
+ * <tr><td>-e, --extension </td><td>Enable SOAP 1.2 binding extension</td></tr>
+ * </table>
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
@@ -264,7 +266,7 @@
out.println(" -w --wsdlLocation=<loc> Value to use for @WebService.wsdlLocation");
out.println(" -o, --output=<directory> The directory to put generated artifacts");
out.println(" -s, --source=<directory> The directory to put Java source");
- out.println(" -t, --target=<2.0|2.1> The JAX-WS specification target");
+ out.println(" -t, --target=<2.0|2.1|2.2> The JAX-WS specification target");
out.println(" -q, --quiet Be somewhat more quiet");
out.println(" -v, --verbose Show full exception stack traces");
out.println(" -l, --load-consumer Load the consumer and exit (debug utility)");
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-03 11:44:53 UTC (rev 11712)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-03 11:45:47 UTC (rev 11713)
@@ -41,17 +41,18 @@
* <pre>
* usage: WSProvideTask [options] <endpoint class name>
* options:
- * -h, --help Show this help message
- * -k, --keep Keep/Generate Java source
- * -w, --wsdl Enable WSDL file generation
- * -c, --classpath=<path< The classpath that contains the endpoint
- * -o, --output=<directory> The directory to put generated artifacts
- * -r, --resource=<directory> The directory to put resource artifacts
- * -s, --source=<directory> The directory to put Java source
- * -q, --quiet Be somewhat more quiet
- * -t, --show-traces Show full exception stack traces
- * -l, --load-provider Load the provider and exit (debug utility)
- * -e, --extension Enable SOAP 1.2 binding extension
+ * <table>
+ * <tr><td>-h, --help </td><td>Show this help message</td></tr>
+ * <tr><td>-k, --keep </td><td>Keep/Generate Java source</td></tr>
+ * <tr><td>-w, --wsdl </td><td>Enable WSDL file generation</td></tr>
+ * <tr><td>-c, --classpath=<path< </td><td>The classpath that contains the endpoint</td></tr>
+ * <tr><td>-o, --output=<directory> </td><td>The directory to put generated artifacts</td></tr>
+ * <tr><td>-r, --resource=<directory></td><td>The directory to put resource artifacts</td></tr>
+ * <tr><td>-s, --source=<directory> </td><td>The directory to put Java source</td></tr>
+ * <tr><td>-q, --quiet </td><td>Be somewhat more quiet</td></tr>
+ * <tr><td>-t, --show-traces </td><td>Show full exception stack traces</td></tr>
+ * <tr><td>-l, --load-provider </td><td>Load the provider and exit (debug utility)</td></tr>
+ * <tr><td>-e, --extension </td><td>Enable SOAP 1.2 binding extension</td></tr>
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
14 years, 10 months