JBossWS SVN: r4878 - in framework/trunk/src/test: java/org/jboss/test/ws/jaxws/samples/eardeployment and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-24 06:55:04 -0400 (Wed, 24 Oct 2007)
New Revision: 4878
Modified:
framework/trunk/src/test/ant-import/build-testsuite.xml
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBareTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
Log:
Remove Metro fixme's
Modified: framework/trunk/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/trunk/src/test/ant-import/build-testsuite.xml 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/ant-import/build-testsuite.xml 2007-10-24 10:55:04 UTC (rev 4878)
@@ -456,6 +456,7 @@
<mkdir dir="${tests.output.dir}/reports"/>
<junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}" haltonfailure="${haltonfailure}">
<jvmarg value="-Djava.security.manager"/>
+ <jvmarg value="-ea"/>
<sysproperty key="jdk.home" value="${env.JAVA_HOME}"/>
<sysproperty key="test.execution.dir" value="${tests.output.dir}"/>
<sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
@@ -497,6 +498,7 @@
<junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}">
<jvmarg line="${remote.debug.line}"/>
<jvmarg value="-Djava.security.manager"/>
+ <jvmarg value="-ea"/>
<sysproperty key="jdk.home" value="${env.JAVA_HOME}"/>
<sysproperty key="test.execution.dir" value="${tests.output.dir}"/>
<sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -57,6 +57,7 @@
if (isIntegrationXFire())
{
System.out.println("FIXME: [JBWS-1746] - Add support for configurable invoker in cxf.xml");
+ System.out.println("FIXME: [JBWS-1655] - Add support for endpoint address rewriting");
return;
}
@@ -65,19 +66,10 @@
Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
TestEndpoint port = service.getPort(TestEndpoint.class);
- if (!isIntegrationSunRI())
- {
- System.out.println("[JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation");
Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
String nsURI = wsdl.getNamespace("jbws1616");
assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
- }
- else
- {
- System.out.println("FIXME [JBWS-1616]: Verify correct bahaviour of @WebService.wsdlLocation");
- }
- System.out.println("[JBWS-1655] Add support for endpoint address rewriting");
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
@@ -93,12 +85,10 @@
Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
TestEndpoint port = service.getPort(TestEndpoint.class);
- System.out.println("[JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation");
Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
String nsURI = wsdl.getNamespace("jbws1616");
assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
- System.out.println("[JBWS-1655] Add support for endpoint address rewriting");
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -25,11 +25,15 @@
import javax.activation.DataHandler;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.BindingType;
import org.jboss.logging.Logger;
@WebService(name = "MTOMEndpoint", serviceName = "MTOMService", endpointInterface = "org.jboss.test.ws.jaxws.samples.xop.doclit.MTOMEndpoint")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
public class MTOMEndpointBean implements MTOMEndpoint
{
private Logger log = Logger.getLogger(MTOMEndpointBean.class);
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -21,14 +21,13 @@
*/
package org.jboss.test.ws.jaxws.samples.xop.doclit;
-import java.io.IOException;
-
import javax.activation.DataHandler;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.ws.BindingType;
import javax.xml.ws.WebServiceException;
+import java.io.IOException;
/**
* @author Heiko.Braun(a)jboss.com
@@ -40,11 +39,11 @@
@WebMethod
@XmlMimeType("text/plain")
- public DataHandler parameterAnnotation(@XmlMimeType("text/plain")
- DataHandler data)
+ public DataHandler parameterAnnotation(@XmlMimeType("text/plain") DataHandler data)
{
try
{
+ System.out.println("Recv " + data.getContentType());
System.out.println("Got " + data.getContent());
return new DataHandler("Server data", "text/plain");
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBareTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBareTestCase.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBareTestCase.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -63,11 +63,7 @@
Service service = Service.create(wsdlURL, serviceName);
port = service.getPort(MTOMEndpoint.class);
-
- // enable MTOM
binding = (SOAPBinding)((BindingProvider)port).getBinding();
- binding.setMTOMEnabled(true);
-
}
/**
@@ -77,7 +73,7 @@
{
getBinding().setMTOMEnabled(true);
- DataHandler dh = new DataHandler("Client Data", "text/plain");
+ DataHandler dh = new DataHandler("testDataHandlerRoundtrip", "text/plain");
DHResponse response = getPort().echoDataHandler(new DHRequest(dh));
assertNotNull(response);
@@ -85,15 +81,7 @@
String contentType = response.getDataHandler().getContentType();
assertEquals("Server data", content);
-
- if (isIntegrationSunRI())
- {
- System.out.println("FIXME: [JBWS-1681] Fix SunRI XOP contentType handling");
- }
- else
- {
- assertEquals("text/plain", contentType);
- }
+ assertEquals("text/plain", contentType);
}
/**
@@ -103,22 +91,15 @@
{
getBinding().setMTOMEnabled(false);
- DataHandler dh = new DataHandler("Client data", "text/plain");
+ DataHandler dh = new DataHandler("testDataHandlerResponseOptimzed", "text/plain");
DHResponse response = getPort().echoDataHandler(new DHRequest(dh));
assertNotNull(response);
Object content = getContent(response.getDataHandler());
String contentType = response.getDataHandler().getContentType();
- assertEquals("Server data", content);
-
- if (isIntegrationSunRI())
- {
- System.out.println("FIXME: [JBWS-1681] Fix SunRI XOP contentType handling");
- }
- else
- {
- assertEquals("text/plain", contentType);
- }
+ assertEquals("Server data", content);
+ assertEquals("text/plain", contentType);
+
}
}
\ No newline at end of file
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -68,11 +68,8 @@
Service service = Service.create(wsdlURL, serviceName);
port = service.getPort(MTOMEndpoint.class);
+ binding = (SOAPBinding)((BindingProvider)port).getBinding();
- // enable MTOM
- binding = (SOAPBinding)((BindingProvider)port).getBinding();
- binding.setMTOMEnabled(true);
-
List<Handler> handlerChain = new ArrayList<Handler>();
handlerChain.addAll(binding.getHandlerChain());
handlerChain.add(new MTOMProtocolHandler());
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPWrappedTestCase.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -79,15 +79,7 @@
String contentType = response.getContentType();
assertEquals("Server data", content);
-
- if (isIntegrationSunRI())
- {
- System.out.println("FIXME: [JBWS-1681] Fix SunRI XOP contentType handling");
- }
- else
- {
- assertEquals("text/plain", contentType);
- }
+ assertEquals("text/plain", contentType);
}
protected Object getContent(DataHandler dh) throws IOException
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2007-10-24 10:52:45 UTC (rev 4877)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2007-10-24 10:55:04 UTC (rev 4878)
@@ -219,7 +219,7 @@
System.out.println(messageOut);
System.out.println("--- End captured output --");
- System.out.println("FIXME [JBWS-1772]: WSConsume output is not correctly redirected");
+ System.out.println("[JBWS-1772]: WSConsume output is not correctly redirected");
/*assertTrue("Tools output not correctly redirected",
messageOut.indexOf("org/jboss/test/ws/tools/testMessageStream/EndpointInterface.java")!=-1
17 years, 4 months
JBossWS SVN: r4877 - framework/branches/jbossws-framework-2.0.2/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-24 06:52:45 -0400 (Wed, 24 Oct 2007)
New Revision: 4877
Modified:
framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
Log:
ejb3 excludes cannot be compiled because this may fail for AS42
Modified: framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 10:39:21 UTC (rev 4876)
+++ framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 10:52:45 UTC (rev 4877)
@@ -334,7 +334,7 @@
<sequential>
<mkdir dir="${tests.output.dir}/classes"/>
<javac destdir="${tests.output.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}"
- failonerror="${javac.fail.onerror}">
+ failonerror="${javac.fail.onerror}" excludesfile="${excludesfile}">
<src path="@{srcdir}"/>
<classpath refid="tests.javac.classpath"/>
</javac>
@@ -483,7 +483,7 @@
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
<batchtest todir="${tests.output.dir}/reports" fork="true">
- <fileset dir="${tests.output.dir}/classes" includes="${include.wildcard}" excludes="${exclude.wildcard}" excludesfile="${excludesfile}"/>
+ <fileset dir="${tests.output.dir}/classes" includes="${include.wildcard}" excludes="${exclude.wildcard}"/>
</batchtest>
</junit>
</target>
17 years, 4 months
JBossWS SVN: r4876 - in stack/metro/branches/hbraun: src/main/java/org/jboss/wsf/stack/sunri and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-24 06:39:21 -0400 (Wed, 24 Oct 2007)
New Revision: 4876
Added:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java
Modified:
stack/metro/branches/hbraun/metro_b_hbraun.iml
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
Log:
Message trace, first cut
Modified: stack/metro/branches/hbraun/metro_b_hbraun.iml
===================================================================
--- stack/metro/branches/hbraun/metro_b_hbraun.iml 2007-10-24 10:27:49 UTC (rev 4875)
+++ stack/metro/branches/hbraun/metro_b_hbraun.iml 2007-10-24 10:39:21 UTC (rev 4876)
@@ -289,6 +289,24 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/thirdparty/junit.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/thirdparty/activation.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-10-24 10:27:49 UTC (rev 4875)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-10-24 10:39:21 UTC (rev 4876)
@@ -132,11 +132,11 @@
public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext context)
{
- throw new IllegalArgumentException("Not implemented");
+ throw new IllegalArgumentException("JBWS-1869: Not implemented");
}
public void handleWSDLRequest(Endpoint endpoint, OutputStream outStream, InvocationContext context)
{
- throw new IllegalArgumentException("Not implemented");
+ throw new IllegalArgumentException("JBWS-1869: Not implemented");
}
}
Added: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java (rev 0)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java 2007-10-24 10:39:21 UTC (rev 4876)
@@ -0,0 +1,171 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.log;
+
+import com.sun.xml.ws.api.message.Packet;
+import com.sun.xml.ws.api.pipe.Pipe;
+import com.sun.xml.ws.api.pipe.PipeCloner;
+import com.sun.xml.ws.api.pipe.helper.AbstractFilterPipeImpl;
+import org.jboss.logging.Logger;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+
+/**
+ * {@link Pipe} that dumps messages that pass through.
+ * Borrowed from the SUN-RI sources.
+ *
+ * @author Kohsuke Kawaguchi
+ * @author Heiko Braun
+ */
+public class DumpPipe extends AbstractFilterPipeImpl {
+
+ private static Logger msgLog = Logger.getLogger("org.jboss.wsf.spi.MessageTrace");
+
+ private final String name;
+
+ private final PrintStream out;
+
+ private final XMLOutputFactory staxOut;
+
+ /**
+ * @param name
+ * Specify the name that identifies this {@link DumpPipe}
+ * instance. This string will be printed when this pipe
+ * dumps messages, and allows people to distinguish which
+ * pipe instance is dumping a message when multiple
+ * {@link DumpPipe}s print messages out.
+ * @param out
+ * The output to send dumps to.
+ * @param next
+ * The next {@link Pipe} in the pipeline.
+ */
+ public DumpPipe(String name, PrintStream out, Pipe next) {
+ super(next);
+ this.name = name;
+ this.out = out;
+ this.staxOut = XMLOutputFactory.newInstance();
+ //staxOut.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES,true);
+ }
+
+ /**
+ * @param out
+ * The output to send dumps to.
+ * @param next
+ * The next {@link Pipe} in the pipeline.
+ *
+ * @deprecated
+ * use {@link #DumpPipe(String, PrintStream, Pipe)}
+ */
+ public DumpPipe(PrintStream out, Pipe next) {
+ this("DumpPipe",out,next);
+ }
+
+ /**
+ * Copy constructor.
+ */
+ private DumpPipe(DumpPipe that, PipeCloner cloner) {
+ super(that,cloner);
+ this.name = that.name;
+ this.out = that.out;
+ this.staxOut = that.staxOut;
+ }
+
+ public Packet process(Packet packet) {
+ dump("request",packet);
+ Packet reply = next.process(packet);
+ dump("response",reply);
+ return reply;
+ }
+
+ private void dump(String header, Packet packet) {
+
+ if(!msgLog.isTraceEnabled())
+ return;
+
+ msgLog.trace("====["+name+":"+header+"]====");
+ if(packet.getMessage()==null)
+ {
+ msgLog.trace("(none)");
+ }
+ else
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+
+ try {
+
+ XMLStreamWriter writer = staxOut.createXMLStreamWriter(new PrintStream(bout) {
+ public void close() {
+ // noop
+ }
+ });
+ writer = createIndenter(writer);
+ packet.getMessage().copy().writeTo(writer);
+ writer.close();
+
+ } catch (XMLStreamException e) {
+ e.printStackTrace(new PrintStream(bout));
+ }
+
+ msgLog.trace(new String(bout.toByteArray()));
+ }
+
+ msgLog.trace("============");
+ }
+
+ /**
+ * Wraps {@link XMLStreamWriter} by an indentation engine if possible.
+ *
+ * <p>
+ * We can do this only when we have <tt>stax-utils.jar</tt> in the classpath.
+ */
+ private XMLStreamWriter createIndenter(XMLStreamWriter writer) {
+ try {
+ Class clazz = getClass().getClassLoader().loadClass("javanet.staxutils.IndentingXMLStreamWriter");
+ Constructor c = clazz.getConstructor(XMLStreamWriter.class);
+ writer = (XMLStreamWriter)c.newInstance(writer);
+ } catch (Exception e) {
+ // if stax-utils.jar is not in the classpath, this will fail
+ // so, we'll just have to do without indentation
+ if(!warnStaxUtils) {
+ warnStaxUtils = true;
+ msgLog.warn("WARNING: put stax-utils.jar to the classpath to indent the dump output");
+ }
+ }
+ return writer;
+ }
+
+
+ public Pipe copy(PipeCloner cloner) {
+ return new DumpPipe(this,cloner);
+ }
+
+ public void preDestroy() {
+ // noop
+ }
+
+ private static boolean warnStaxUtils;
+}
Property changes on: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/DumpPipe.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java (rev 0)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java 2007-10-24 10:39:21 UTC (rev 4876)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.log;
+
+import com.sun.xml.ws.api.server.ServerPipelineHook;
+import com.sun.xml.ws.api.pipe.Pipe;
+import com.sun.xml.ws.api.pipe.ServerPipeAssemblerContext;
+import com.sun.istack.NotNull;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class MessageLogPipelineHook extends ServerPipelineHook
+{
+
+ public
+ @NotNull
+ Pipe createMonitoringPipe(ServerPipeAssemblerContext ctxt, @NotNull Pipe tail)
+ {
+ return new DumpPipe("Message Log", System.out, tail);
+ }
+}
Property changes on: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/log/MessageLogPipelineHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-24 10:27:49 UTC (rev 4875)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-24 10:39:21 UTC (rev 4876)
@@ -26,6 +26,7 @@
import com.sun.xml.ws.api.server.Container;
import com.sun.xml.ws.api.server.Module;
import com.sun.xml.ws.api.server.ResourceInjector;
+import com.sun.xml.ws.api.server.ServerPipelineHook;
import com.sun.xml.ws.transport.http.DeploymentDescriptorParser;
import com.sun.xml.ws.transport.http.ResourceLoader;
import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
@@ -37,6 +38,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.stack.sunri.DeploymentDescriptorParserExt;
+import org.jboss.wsf.stack.sunri.log.MessageLogPipelineHook;
import javax.xml.ws.WebServiceException;
import java.io.IOException;
@@ -186,6 +188,10 @@
{
return (T)ResourceInjector.STANDALONE;
}
+ else if (spiType == ServerPipelineHook.class)
+ {
+ return (T)new MessageLogPipelineHook();
+ }
log.warn("Unable to resolve SPI for type: " + spiType);
return null;
17 years, 4 months
JBossWS SVN: r4875 - stack/native/branches/jbossws-native-2.0.2/src/test/resources.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-24 06:27:49 -0400 (Wed, 24 Oct 2007)
New Revision: 4875
Modified:
stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt
Log:
Fix some excludes
Modified: stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt 2007-10-24 10:11:51 UTC (rev 4874)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/test-excludes-jboss500.txt 2007-10-24 10:27:49 UTC (rev 4875)
@@ -10,7 +10,7 @@
# [JBAS-4890] EJBAccessException: Caller unauthorized
org/jboss/test/ws/jaxws/jbws1840/**
org/jboss/test/ws/jaxws/samples/context/**
-# org/jboss/test/ws/jaxws/samples/wssecurity/**
+org/jboss/test/ws/jaxws/samples/wssecurity/**
# [JBAS-4895] JAXB based ServiceRef meta data
org/jboss/test/ws/benchmark/jaxrpc/**
@@ -88,9 +88,10 @@
org/jboss/test/ws/jaxrpc/samples/dynamichandler/**
org/jboss/test/ws/jaxrpc/samples/exception/**
org/jboss/test/ws/jaxrpc/samples/handler/**
-org/jboss/test/ws/jaxrpc/samples/holdler/**
+org/jboss/test/ws/jaxrpc/samples/holder/**
org/jboss/test/ws/jaxrpc/samples/jsr109ejb/**
org/jboss/test/ws/jaxrpc/samples/jsr109pojo/**
+org/jboss/test/ws/jaxrpc/samples/jmstransport/**
org/jboss/test/ws/jaxrpc/samples/message/**
org/jboss/test/ws/jaxrpc/samples/mtom/**
org/jboss/test/ws/jaxrpc/samples/oneway/**
@@ -98,7 +99,7 @@
org/jboss/test/ws/jaxrpc/samples/secureejb/**
org/jboss/test/ws/jaxrpc/samples/swa/**
org/jboss/test/ws/jaxrpc/samples/wsbpel/**
-org/jboss/test/ws/jaxrpc/samples/wsecurity/**
+org/jboss/test/ws/jaxrpc/samples/wssecurity/**
org/jboss/test/ws/jaxrpc/samples/serviceref/**
org/jboss/test/ws/jaxrpc/samples/utf16/**
org/jboss/test/ws/jaxrpc/samples/wsdlpublish/**
17 years, 4 months
JBossWS SVN: r4874 - framework/branches/jbossws-framework-2.0.2/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-24 06:11:51 -0400 (Wed, 24 Oct 2007)
New Revision: 4874
Modified:
framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
Log:
Fix typo
Modified: framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 10:03:25 UTC (rev 4873)
+++ framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 10:11:51 UTC (rev 4874)
@@ -413,7 +413,7 @@
<param name="include.wildcard" value="org/jboss/test/ws/jaxws/samples/**/*TestCase.class org/jboss/test/ws/*/smoke/**/*TestCase.class"/>
<param name="exclude.wildcard" value="org/jboss/test/ws/*/samples/jaxr/**"/>
<!--
- According to our commit policy, haltonfailure MUST be be true for tests-samples.
+ According to our commit policy, haltonfailure MUST be be true for tests-smoke
It is a prerequisite for any commit that this target passes without failure.
-->
<param name="haltonfailure" value="true"/>
@@ -426,6 +426,7 @@
<antcall target="tests-run-internal">
<param name="include.wildcard" value="org/jboss/test/ws/*/samples/**/*TestCase.class"/>
<param name="exclude.wildcard" value="org/jboss/test/ws/*/samples/jaxr/**"/>
+ <param name="haltonfailure" value="false"/>
</antcall>
</target>
17 years, 4 months
JBossWS SVN: r4873 - framework/branches/jbossws-framework-2.0.2/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-24 06:03:25 -0400 (Wed, 24 Oct 2007)
New Revision: 4873
Modified:
framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
Log:
Do not exclude tests from compile
Modified: framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 09:32:54 UTC (rev 4872)
+++ framework/branches/jbossws-framework-2.0.2/src/test/ant-import/build-testsuite.xml 2007-10-24 10:03:25 UTC (rev 4873)
@@ -334,7 +334,7 @@
<sequential>
<mkdir dir="${tests.output.dir}/classes"/>
<javac destdir="${tests.output.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}"
- failonerror="${javac.fail.onerror}" excludesfile="@{excludesfile}">
+ failonerror="${javac.fail.onerror}">
<src path="@{srcdir}"/>
<classpath refid="tests.javac.classpath"/>
</javac>
@@ -482,7 +482,7 @@
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
<batchtest todir="${tests.output.dir}/reports" fork="true">
- <fileset dir="${tests.output.dir}/classes" includes="${include.wildcard}" excludes="${exclude.wildcard}"/>
+ <fileset dir="${tests.output.dir}/classes" includes="${include.wildcard}" excludes="${exclude.wildcard}" excludesfile="${excludesfile}"/>
</batchtest>
</junit>
</target>
17 years, 4 months
JBossWS SVN: r4872 - stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-24 05:32:54 -0400 (Wed, 24 Oct 2007)
New Revision: 4872
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
Log:
API docs
Modified: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-24 08:08:21 UTC (rev 4871)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-24 09:32:54 UTC (rev 4872)
@@ -47,10 +47,17 @@
import java.util.List;
/**
- * Creates a METRO runtime model and associates it with the deployment.
+ * Creates a Metro runtime model and associates it with the deployment.
* Doing so requires a valid runtime loader present, that will act as a temporary
- * thread local classloader.
+ * thread local classloader. <p>The <code>spi.Endpoint</code> carries a Metro <code>ServletAdapter</code>
+ * that is associated with the runtime model:<br>
+ * <code>(Endpoint.getAttachment(ServletAdapter.class))</code>
+ * This adapter acts as the main entry point for SOAP/HTTP requests.
+ * Please note that the current implementation doesnt support the stream based RequestHandler API.
*
+ * @see org.jboss.wsf.stack.sunri.RequestHandlerImpl
+ * @see org.jboss.wsf.stack.sunri.DeploymentDescriptorParserExt
+ *
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
*/
17 years, 4 months
JBossWS SVN: r4871 - stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-24 04:08:21 -0400 (Wed, 24 Oct 2007)
New Revision: 4871
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
Log:
Improved error handling and logging
Modified: stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
===================================================================
--- stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-10-24 07:38:33 UTC (rev 4870)
+++ stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-10-24 08:08:21 UTC (rev 4871)
@@ -24,7 +24,6 @@
//$Id$
import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
-import com.sun.xml.ws.util.exception.JAXWSExceptionBase;
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.InvocationContext;
@@ -39,7 +38,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Writer;
-import java.util.logging.Level;
/**
* A request handler
@@ -52,10 +50,6 @@
// provide logging
private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
- // TODO: unify logging
- private static final java.util.logging.Logger logger =
- java.util.logging.Logger.getLogger( com.sun.xml.ws.util.Constants.LoggingDomain + ".jboss.requestHandler");
-
RequestHandlerImpl()
{
}
@@ -106,7 +100,7 @@
}
catch (Exception e)
{
- logger.log(Level.SEVERE, e.getMessage(), e);
+ log.error("Failed to process GET request", e);
throw new ServletException(e.getMessage());
}
}
@@ -127,14 +121,9 @@
{
target.handle(context, req, res);
}
- catch (JAXWSExceptionBase e)
- {
- logger.log(Level.SEVERE, e.getMessage());
- res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
catch (Throwable e)
{
- logger.log(Level.SEVERE, "caught throwable", e);
+ log.error("Failed to process POST request", e);
res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
17 years, 4 months
JBossWS SVN: r4870 - in stack/metro/branches/hbraun: ant-import and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-24 03:38:33 -0400 (Wed, 24 Oct 2007)
New Revision: 4870
Modified:
stack/metro/branches/hbraun/ant-import/build-thirdparty.xml
stack/metro/branches/hbraun/version.properties
Log:
Include JAF and JUnit jars in thirdparty
Modified: stack/metro/branches/hbraun/ant-import/build-thirdparty.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/build-thirdparty.xml 2007-10-24 05:37:43 UTC (rev 4869)
+++ stack/metro/branches/hbraun/ant-import/build-thirdparty.xml 2007-10-24 07:38:33 UTC (rev 4870)
@@ -57,9 +57,11 @@
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxrpc/${sun-jaxrpc}/lib/jaxrpc-api.jar" dest="${thirdparty.dir}/jaxrpc-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/FastInfoset.jar" dest="${thirdparty.dir}/FastInfoset.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/http.jar" dest="${thirdparty.dir}/http.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar" dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaf/${sun-jaf}/lib/activation.jar" dest="${thirdparty.dir}/activation.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar" dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-ri-src.jar" dest="${thirdparty.dir}/jaxws-ri-src.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-rt.jar" dest="${thirdparty.dir}/jaxws-rt.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-tools.jar" dest="${thirdparty.dir}/jaxws-tools.jar" usetimestamp="true" verbose="true"/>
Modified: stack/metro/branches/hbraun/version.properties
===================================================================
--- stack/metro/branches/hbraun/version.properties 2007-10-24 05:37:43 UTC (rev 4869)
+++ stack/metro/branches/hbraun/version.properties 2007-10-24 07:38:33 UTC (rev 4870)
@@ -19,11 +19,13 @@
jbossws-spi=1.0.0.GA
jbossws-jboss42=2.0.1.GA
+junit=3.8.1
jboss-common-core=2.0.2.GA
jboss-common-logging-spi=2.0.2.GA
jboss-javaee=5.0.0-SNAPSHOT
jboss-jaxr=1.2.0.GA
jboss-security-spi=2.0.0.Beta
+sun-jaf=1.1
sun-jaxb=2.1.4
sun-jaxrpc=1.1
sun-jaxws=2.1.1
17 years, 4 months
JBossWS SVN: r4869 - in legacy/branches/jbossws-1.2.1.GA_JBWS-1860: jbossws-core/src/java/org/jboss/ws/metadata/umdm and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-10-24 01:37:43 -0400 (Wed, 24 Oct 2007)
New Revision: 4869
Modified:
legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java
Log:
[JBWS-1860] Ported JBWS-1833 - ConfigObserver was causing a memory leak
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-23 18:19:13 UTC (rev 4868)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-24 05:37:43 UTC (rev 4869)
@@ -55,6 +55,7 @@
{
this.epMetaData = epMetaData;
initBinding(epMetaData.getBindingId(), epMetaData.getType());
+ this.epMetaData.registerConfigObserver(this);
configure();
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-23 18:19:13 UTC (rev 4868)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-24 05:37:43 UTC (rev 4869)
@@ -52,6 +52,8 @@
import java.lang.reflect.Method;
import java.util.*;
+import java.lang.ref.WeakReference;
+
/**
* A Service component describes a set of endpoints.
*
@@ -604,9 +606,6 @@
if (config == null)
initEndpointConfig();
- // register any configurable with the ConfigProvider
- configObservable.addObserver(configurable);
-
// SOAPBinding configuration
if (configurable instanceof CommonBindingProvider)
{
@@ -715,11 +714,51 @@
class ConfigObservable extends Observable
{
+
+ private List<WeakReference<Observer>> observer = new ArrayList<WeakReference<Observer>>();
+
public void doNotify(Object object)
{
setChanged();
notifyObservers(object);
}
+
+ public synchronized void addObserver(Observer o)
+ {
+ observer.add( new WeakReference(o));
+ }
+
+ public synchronized void deleteObserver(Observer o)
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ if(tmp.equals(o))
+ {
+ observer.remove(o);
+ break;
+ }
+
+ }
+ }
+
+ public void notifyObservers()
+ {
+ notifyObservers(null);
+ }
+
+ public void notifyObservers(Object arg)
+ {
+ if(hasChanged())
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ tmp.update(this, arg);
+
+ }
+ }
+ }
}
public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java 2007-10-23 18:19:13 UTC (rev 4868)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1860/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java 2007-10-24 05:37:43 UTC (rev 4869)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxrpc.jbws626;
+import org.jboss.ws.core.CommonMessageContext;
+
import java.util.Iterator;
import javax.xml.namespace.QName;
@@ -83,6 +85,10 @@
wasName = soapElement.getElementName();
assertElementName(expName, wasName);
}
+
+ // for testing the CommonBindingProvider memory leak. Not related to this test...
+ ((CommonMessageContext)msgContext).setModified(true);
+
}
catch (SOAPException ex)
{
17 years, 4 months