JBossWS SVN: r2721 - trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 19:05:55 -0400 (Thu, 29 Mar 2007)
New Revision: 2721
Modified:
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml
Log:
Add fisheye config
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml 2007-03-29 22:58:12 UTC (rev 2720)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml 2007-03-29 23:05:55 UTC (rev 2721)
@@ -60,8 +60,17 @@
</publishers>
<buildWrappers class="vector"/>
<scm class="hudson.scm.SubversionSCM">
- <modules>@svn.url@</modules>
+ <locations>
+ <hudson.scm.SubversionSCM-ModuleLocation>
+ <remote>@svn.url@/(a)svn.basename@</remote>
+ <local>@svn.basename@</local>
+ </hudson.scm.SubversionSCM-ModuleLocation>
+ </locations>
<useUpdate>true</useUpdate>
+ <browser class="hudson.scm.browsers.FishEyeSVN">
+ <url>http://fisheye.jboss.com/browse/JBossWS/</url>
+ <rootModule></rootModule>
+ </browser>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
17 years, 9 months
JBossWS SVN: r2720 - trunk/jbossws-tests.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 18:58:12 -0400 (Thu, 29 Mar 2007)
New Revision: 2720
Modified:
trunk/jbossws-tests/build.xml
Log:
Fix ejb3 client classpath
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-03-29 22:33:22 UTC (rev 2719)
+++ trunk/jbossws-tests/build.xml 2007-03-29 22:58:12 UTC (rev 2720)
@@ -198,6 +198,7 @@
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss.lib}/jboss-vfs.jar"/>
<pathelement location="${jboss.server.lib}/hibernate3.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
@@ -452,6 +453,7 @@
<target name="tests" depends="main" description="Run all unit tests and generate a report">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/**/*TestCase.class"/>
+ <param name="exclude.wildcard" value="no-wildcard-exclude-see-excludesfile"/>
<param name="haltonfailure" value="false"/>
</antcall>
<antcall target="tests-report"/>
@@ -461,6 +463,7 @@
<target name="tests-samples" depends="init" description="Run samples unit tests">
<antcall target="tests-main">
<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="true"/>
</antcall>
<antcall target="tests-report"/>
@@ -470,6 +473,7 @@
<target name="tests-tools" depends="init" description="Run tools unit tests">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/tools/**/*TestCase.class"/>
+ <param name="exclude.wildcard" value="no-wildcard-exclude-see-excludesfile"/>
<param name="haltonfailure" value="false"/>
</antcall>
<antcall target="tests-report"/>
@@ -482,6 +486,7 @@
<target name="test" depends="init" if="test" description="Run all unit tests in a given directory">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/${test}/**/*TestCase.class"/>
+ <param name="exclude.wildcard" value="no-wildcard-exclude-see-excludesfile"/>
<param name="haltonfailure" value="false"/>
</antcall>
</target>
@@ -516,7 +521,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}" excludesfile="${excludesfile}"/>
+ <fileset dir="${tests.output.dir}/classes" includes="${include.wildcard}" excludes="${exclude.wildcard}" excludesfile="${excludesfile}"/>
</batchtest>
</junit>
</target>
17 years, 9 months
JBossWS SVN: r2719 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 18:33:22 -0400 (Thu, 29 Mar 2007)
New Revision: 2719
Modified:
trunk/build/README-COMMITTERS
Log:
Test hudson fisheye
Modified: trunk/build/README-COMMITTERS
===================================================================
--- trunk/build/README-COMMITTERS 2007-03-29 21:33:47 UTC (rev 2718)
+++ trunk/build/README-COMMITTERS 2007-03-29 22:33:22 UTC (rev 2719)
@@ -1,3 +1,7 @@
+#
+# $Id: $
+#
+
1. Edit your subversion config ~/.subversion/config and set the following in each section:
[miscellany]
@@ -14,6 +18,6 @@
for example, if you are using Eclipse with Subclipse on windows, you need to
set Team->SVN->Configuration Location to:
-c:\cygwin\home\<your user name>\.subversion
+/home/<your user name>/.subversion
3. If you are using Eclipse, set your code style to JBossWSCodeStyle.xml
17 years, 9 months
JBossWS SVN: r2718 - in trunk: build/ant-import and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 17:33:47 -0400 (Thu, 29 Mar 2007)
New Revision: 2718
Modified:
trunk/build/ant-import/build-hudson.xml
trunk/build/etc/component-info/jbossws-jboss50.xml
trunk/build/etc/component-info/jbossws.xml
trunk/build/version.properties
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
Log:
Add classloader to bindServiceRef
Modified: trunk/build/ant-import/build-hudson.xml
===================================================================
--- trunk/build/ant-import/build-hudson.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/ant-import/build-hudson.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -87,7 +87,6 @@
<copy todir="${hudson.home}" overwrite="true">
<fileset dir="${build.dir}/hudson/hudson-home"/>
<filterset>
- <filter token="version.id" value="${version.id}"/>
<filter token="svn.basedir.local" value="${svn.basedir.local}"/>
<filter token="svn.basename" value="${svn.basename}"/>
<filter token="svn.url" value="${svn.url}"/>
Modified: trunk/build/etc/component-info/jbossws-jboss50.xml
===================================================================
--- trunk/build/etc/component-info/jbossws-jboss50.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/etc/component-info/jbossws-jboss50.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -12,13 +12,13 @@
<compatible version="@repository.id@"/>
</import>
<import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@-jboss50"/>
+ <compatible version="@jboss-jbossxb-jboss50@"/>
</import>
<import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@-jboss50"/>
+ <compatible version="@jboss-microcontainer-jboss50@"/>
</import>
<import componentref="jboss/remoting">
- <compatible version="@jboss-remoting@-jboss50"/>
+ <compatible version="@jboss-remoting-jboss50@"/>
</import>
<export>
Modified: trunk/build/etc/component-info/jbossws.xml
===================================================================
--- trunk/build/etc/component-info/jbossws.xml 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/etc/component-info/jbossws.xml 2007-03-29 21:33:47 UTC (rev 2718)
@@ -14,15 +14,12 @@
<import componentref="apache-xmlsec">
<compatible version="@apache-xmlsec@"/>
- <compatible version="@apache-xmlsec@-brew"/>
</import>
<import componentref="ibm-wsdl4j">
<compatible version="@ibm-wsdl4j@"/>
- <compatible version="@ibm-wsdl4j@-brew"/>
</import>
<import componentref="javassist">
<compatible version="@javassist@"/>
- <compatible version="@javassist@-brew"/>
</import>
<import componentref="jbpm/bpel">
<compatible version="@jbpm-bpel@"/>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/build/version.properties 2007-03-29 21:33:47 UTC (rev 2718)
@@ -6,7 +6,7 @@
specification.version=jbossws-1.2
version.id=2.0.0.DEV
-repository.id=2.0.0.CR5
+repository.id=2.0.0.DEV
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
@@ -74,4 +74,4 @@
sun-servlet=2.4
woodstox=3.1.1
wscommons-policy=1.0
-xmlunit=1.0
+xmlunit=1.0
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29 21:33:47 UTC (rev 2718)
@@ -53,25 +53,25 @@
private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
+
public ServiceRefMetaData newServiceRefMetaData()
{
return new UnifiedServiceRefMetaData();
}
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ServiceRefMetaData sref) throws NamingException
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
{
if (sref.isProcessed())
{
- // Attempt to rebind service-ref
+ log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
return;
}
-
+
UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
serviceRef.setVfsRoot(vfsRoot);
try
{
- if (getServiceRefType(serviceRef) == Type.JAXRPC)
+ if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
{
ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
handler.setupServiceRef(encCtx, encName, serviceRef);
@@ -88,7 +88,7 @@
sref.setProcessed(true);
}
}
-
+
public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
@@ -99,17 +99,17 @@
objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
}
- private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef) throws NamingException
+ private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
{
// The service-ref-type is JAXWS specific
String serviceRefType = serviceRef.getServiceRefType();
if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
return Type.JAXWS;
-
+
// The mapping-file is JAXRPC specific
if (serviceRef.getMappingFile() != null)
return Type.JAXRPC;
-
+
String siName = serviceRef.getServiceInterface();
if (siName == null)
throw new IllegalStateException("<service-interface> cannot be null");
@@ -117,16 +117,6 @@
if (siName.equals("javax.xml.rpc.Service"))
return Type.JAXRPC;
- log.info("Cannot determine service-ref type, assuming JAXWS");
- return Type.JAXWS;
-
- /*
- * Loading the SI like this might not work for webapp clients.
- *
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- URL rootURL = serviceRef.getVfsRoot().toURL();
- URLClassLoader loader = new URLClassLoader(new URL[] {rootURL}, ctxLoader);
-
try
{
Class siClass = loader.loadClass(siName);
@@ -134,13 +124,11 @@
return Type.JAXWS;
else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
return Type.JAXRPC;
- else
- throw new IllegalStateException("Illegal service interface: " + siName);
+ else throw new IllegalStateException("Illegal service interface: " + siName);
}
catch (ClassNotFoundException e)
{
throw new IllegalStateException("Cannot load <service-interface>: " + siName);
}
- */
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29 19:02:50 UTC (rev 2717)
+++ trunk/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29 21:33:47 UTC (rev 2718)
@@ -45,5 +45,5 @@
void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value);
- void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ServiceRefMetaData sref) throws NamingException;
+ void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
}
17 years, 9 months
JBossWS SVN: r2717 - in branches/jbossws-1.2.1: build/ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 15:02:50 -0400 (Thu, 29 Mar 2007)
New Revision: 2717
Modified:
branches/jbossws-1.2.1/build/ant-import/build-hudson.xml
branches/jbossws-1.2.1/build/version.properties
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
Log:
Add classloader to bindServiceRef
Modified: branches/jbossws-1.2.1/build/ant-import/build-hudson.xml
===================================================================
--- branches/jbossws-1.2.1/build/ant-import/build-hudson.xml 2007-03-29 15:29:00 UTC (rev 2716)
+++ branches/jbossws-1.2.1/build/ant-import/build-hudson.xml 2007-03-29 19:02:50 UTC (rev 2717)
@@ -82,7 +82,6 @@
<copy todir="${hudson.home}" overwrite="true">
<fileset dir="${build.dir}/hudson/hudson-home"/>
<filterset>
- <filter token="version.id" value="${version.id}"/>
<filter token="svn.basedir.local" value="${svn.basedir.local}"/>
<filter token="svn.basename" value="${svn.basename}"/>
<filter token="svn.url" value="${svn.url}"/>
Modified: branches/jbossws-1.2.1/build/version.properties
===================================================================
--- branches/jbossws-1.2.1/build/version.properties 2007-03-29 15:29:00 UTC (rev 2716)
+++ branches/jbossws-1.2.1/build/version.properties 2007-03-29 19:02:50 UTC (rev 2717)
@@ -6,7 +6,7 @@
specification.version=jbossws-1.2
version.id=1.2.1.GA
-repository.id=1.2.1.GA
+repository.id=1.2.1.DEV
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
Modified: branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
--- branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29 15:29:00 UTC (rev 2716)
+++ branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-29 19:02:50 UTC (rev 2717)
@@ -53,25 +53,25 @@
private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
+
public ServiceRefMetaData newServiceRefMetaData()
{
return new UnifiedServiceRefMetaData();
}
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ServiceRefMetaData sref) throws NamingException
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
{
if (sref.isProcessed())
{
- // Attempt to rebind service-ref
+ log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
return;
}
-
+
UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
serviceRef.setVfsRoot(vfsRoot);
try
{
- if (getServiceRefType(serviceRef) == Type.JAXRPC)
+ if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
{
ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
handler.setupServiceRef(encCtx, encName, serviceRef);
@@ -88,7 +88,7 @@
sref.setProcessed(true);
}
}
-
+
public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
@@ -99,17 +99,17 @@
objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
}
- private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef) throws NamingException
+ private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
{
// The service-ref-type is JAXWS specific
String serviceRefType = serviceRef.getServiceRefType();
if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
return Type.JAXWS;
-
+
// The mapping-file is JAXRPC specific
if (serviceRef.getMappingFile() != null)
return Type.JAXRPC;
-
+
String siName = serviceRef.getServiceInterface();
if (siName == null)
throw new IllegalStateException("<service-interface> cannot be null");
@@ -117,16 +117,6 @@
if (siName.equals("javax.xml.rpc.Service"))
return Type.JAXRPC;
- log.info("Cannot determine service-ref type, assuming JAXWS");
- return Type.JAXWS;
-
- /*
- * Loading the SI like this might not work for webapp clients.
- *
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- URL rootURL = serviceRef.getVfsRoot().toURL();
- URLClassLoader loader = new URLClassLoader(new URL[] {rootURL}, ctxLoader);
-
try
{
Class siClass = loader.loadClass(siName);
@@ -134,13 +124,11 @@
return Type.JAXWS;
else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
return Type.JAXRPC;
- else
- throw new IllegalStateException("Illegal service interface: " + siName);
+ else throw new IllegalStateException("Illegal service interface: " + siName);
}
catch (ClassNotFoundException e)
{
throw new IllegalStateException("Cannot load <service-interface>: " + siName);
}
- */
}
}
Modified: branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29 15:29:00 UTC (rev 2716)
+++ branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-03-29 19:02:50 UTC (rev 2717)
@@ -45,5 +45,5 @@
void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value);
- void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ServiceRefMetaData sref) throws NamingException;
+ void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
}
17 years, 9 months
JBossWS SVN: r2716 - in trunk: build/ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 11:29:00 -0400 (Thu, 29 Mar 2007)
New Revision: 2716
Added:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamSource.java
Modified:
trunk/build/ant-import/build-hudson.xml
trunk/build/version.properties
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
Log:
Update to hudson-1.93
Modified: trunk/build/ant-import/build-hudson.xml
===================================================================
--- trunk/build/ant-import/build-hudson.xml 2007-03-29 13:53:57 UTC (rev 2715)
+++ trunk/build/ant-import/build-hudson.xml 2007-03-29 15:29:00 UTC (rev 2716)
@@ -57,6 +57,7 @@
</fileset>
<filterset>
<filtersfile file="${build.dir}/ant.properties"/>
+ <filter token="hudson.home" value="${hudson.home}"/>
</filterset>
</copy>
</target>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-29 13:53:57 UTC (rev 2715)
+++ trunk/build/version.properties 2007-03-29 15:29:00 UTC (rev 2716)
@@ -68,7 +68,7 @@
junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
-sun-hudson=1.74
+sun-hudson=1.93
sun-jaf=1.1
sun-javamail=1.4
sun-servlet=2.4
Added: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamSource.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamSource.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamSource.java 2007-03-29 15:29:00 UTC (rev 2716)
@@ -0,0 +1,71 @@
+/*
+ * 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.ws.core.jaxrpc.binding;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * A StreamSource that can be read repeatedly.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-Mar-2007
+ */
+public class BufferedStreamSource extends StreamSource
+{
+ private byte[] bytes;
+
+ public BufferedStreamSource(byte[] bytes)
+ {
+ this.bytes = bytes;
+ }
+
+ @Override
+ public InputStream getInputStream()
+ {
+ return new ByteArrayInputStream(bytes);
+ }
+
+ @Override
+ public Reader getReader()
+ {
+ return new InputStreamReader(new ByteArrayInputStream(bytes));
+ }
+
+ @Override
+ public void setInputStream(InputStream inputStream)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setReader(Reader reader)
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamSource.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 13:53:57 UTC (rev 2715)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 15:29:00 UTC (rev 2716)
@@ -133,7 +133,6 @@
{
source = beginStreamSourceAccess(source);
retElement = DOMUtils.sourceToElement(source);
- source = new DOMSource(retElement);
endStreamSourceAccess();
}
catch (IOException ex)
17 years, 9 months
JBossWS SVN: r2715 - in trunk: jbossws-core/src/java/org/jboss/ws/core/jaxrpc and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 09:53:57 -0400 (Thu, 29 Mar 2007)
New Revision: 2715
Modified:
trunk/build/hudson/hudson-home/hudson.tasks.Mailer.xml
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java
Log:
Refactor XMLFragment to do proper buffering
Modified: trunk/build/hudson/hudson-home/hudson.tasks.Mailer.xml
===================================================================
--- trunk/build/hudson/hudson-home/hudson.tasks.Mailer.xml 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/build/hudson/hudson-home/hudson.tasks.Mailer.xml 2007-03-29 13:53:57 UTC (rev 2715)
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson.tasks.Mailer-DescriptorImpl>
<defaultSuffix>jboss.com</defaultSuffix>
- <hudsonUrl>http://localhost:@hudson.port@/hudson/</hudsonUrl>
+ <hudsonUrl>http://@hudson.host@:@hudson.port@/hudson/</hudsonUrl>
<adminAddress>thomas.diesler(a)jboss.com</adminAddress>
<smtpHost>@hudson.smtp.host@</smtpHost>
</hudson.tasks.Mailer-DescriptorImpl>
\ No newline at end of file
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -23,7 +23,6 @@
// $Id$
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -61,7 +60,6 @@
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
import org.jboss.ws.core.soap.XMLFragment;
-import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
@@ -268,8 +266,8 @@
Result result = ser.serialize(xmlName, xmlType, faultCause, serContext, null);
XMLFragment xmlFragment = new XMLFragment(result);
+ Element domElement = xmlFragment.toElement();
SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- Element domElement = DOMUtils.parse(xmlFragment.resultToString());
SOAPElement soapElement = soapFactory.createElement(domElement);
detail = soapFault.addDetail();
@@ -279,10 +277,6 @@
{
throw new JAXRPCException(e);
}
- catch (IOException e)
- {
- throw new JAXRPCException(e);
- }
}
else
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.ws.core.jaxrpc.binding;
// $Id$
@@ -49,18 +49,19 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if (log.isDebugEnabled())
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
String xmlFragment = null;
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- if(XOPContext.isXOPMessage())
+ if (XOPContext.isXOPMessage())
{
XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
XOPObject xopObject = new XOPObject(value);
xopObject.setContentType("application/octet-stream");
- String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart() );
- String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='"+cid+"'/>";
+ String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart());
+ String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='" + cid + "'/>";
xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, null, attributes, false);
}
else
@@ -69,6 +70,6 @@
String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
}
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -21,43 +21,65 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+// $Id: $
+
+import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import javax.xml.transform.stream.StreamResult;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.IOUtils;
+
/**
* @author Heiko.Braun(a)jboss.org
- * @version $Id$
+ * @author Thomas.Diesler(a)jboss.org
* @since 06.02.2007
*/
-public class BufferedStreamResult extends StreamResult {
+public class BufferedStreamResult extends StreamResult
+{
+ ByteArrayOutputStream bout = new ByteArrayOutputStream(1024);
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
-
public BufferedStreamResult()
{
- super();
}
- public void setOutputStream(OutputStream outputStream)
+ public BufferedStreamResult(String xmlFragment)
{
- throw new IllegalArgumentException("Operation not supported");
+ try
+ {
+ IOUtils.copyStream(getOutputStream(), new ByteArrayInputStream(xmlFragment.getBytes()));
+ }
+ catch (IOException e)
+ {
+ WSException.rethrow(e);
+ }
}
+ @Override
+ public Writer getWriter()
+ {
+ return null;
+ }
+
+ @Override
public OutputStream getOutputStream()
{
return bout;
}
+ @Override
public void setWriter(Writer writer)
{
- throw new IllegalArgumentException("Operation not supported");
+ throw new UnsupportedOperationException();
}
- public Writer getWriter()
+ @Override
+ public void setOutputStream(OutputStream outputStream)
{
- return null;
+ throw new UnsupportedOperationException();
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -61,7 +61,6 @@
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
-
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -61,6 +61,6 @@
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -51,13 +51,13 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes)
throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
throw new IllegalArgumentException("Element value cannot be null");
if ((value instanceof Element) == false)
throw new IllegalArgumentException("Value is not a Element: " + value.getClass().getName());
String xmlFragment = DOMWriter.printNode((Element)value, false);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -53,6 +53,6 @@
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -27,6 +27,7 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
+import javax.xml.transform.stream.StreamResult;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
@@ -34,6 +35,7 @@
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshaller;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.soap.XMLFragment;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.w3c.dom.NamedNodeMap;
@@ -74,7 +76,7 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
// Expect the specific JAXRPC serialization context
SerializationContextJAXRPC jaxrpcContext = (SerializationContextJAXRPC)serContext;
@@ -101,8 +103,8 @@
delegate.marshal(value, strwr);
String xmlFragment = strwr.toString();
- if(log.isDebugEnabled()) log.debug("serialized: " + xmlFragment);
- return stringToResult(xmlFragment);
+ log.debug("serialized: " + xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
catch (RuntimeException rte)
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -56,11 +56,11 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, null, attributes, true);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -65,9 +65,7 @@
}
String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
-
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, nsExtras, attributes, true);
-
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -147,13 +147,12 @@
buffer.append(" xmlns:" + compXmlName.getPrefix() + "='" + compXmlName.getNamespaceURI() + "'");
buffer.append(">");
-
serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
-
buffer.append("</" + nodeName + ">");
-
- log.debug("serialized: " + buffer);
- return stringToResult(buffer.toString());
+ String xmlFragment = buffer.toString();
+
+ log.debug("serialized: " + xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
catch (RuntimeException e)
{
@@ -184,8 +183,7 @@
}
Result result = ser.serialize(new QName("item"), xmlType, compValue, serContext, null);
- XMLFragment fragment = new XMLFragment(result);
- buffer.append(fragment.resultToString());
+ buffer.append(new XMLFragment(result).toXMLString());
}
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -50,13 +50,13 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
throw new IllegalArgumentException("SOAPElement value cannot be null");
if ((value instanceof SOAPElement) == false)
throw new IllegalArgumentException("Value is not a SOAPElement: " + value.getClass().getName());
String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -71,23 +71,6 @@
*/
public abstract Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
- protected Result stringToResult(String xmlFragment)
- {
- BufferedStreamResult result = null;
- try
- {
- ByteArrayInputStream in = new ByteArrayInputStream(xmlFragment.getBytes());
- result = new BufferedStreamResult();
- IOUtils.copyStream(result.getOutputStream(), in);
- }
- catch (IOException e)
- {
- WSException.rethrow(e);
- }
-
- return result;
- }
-
/** Wrap the value string in a XML fragment with the given name
*/
protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry nsRegistry, Set<String> nsExtras, NamedNodeMap attributes, boolean normalize)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -67,6 +67,6 @@
}
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
- return stringToResult(xmlFragment);
+ return new BufferedStreamResult(xmlFragment);
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -14,7 +14,6 @@
*/
package org.jboss.ws.core.jaxws;
-import java.io.IOException;
import java.util.Iterator;
import javax.xml.namespace.QName;
@@ -48,7 +47,6 @@
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
import org.jboss.ws.core.soap.XMLFragment;
-import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.w3c.dom.Element;
@@ -134,8 +132,7 @@
throw new WebServiceException(e);
}
}
- else
- log.debug("Cannot find fault meta data for: " + xmlName);
+ else log.debug("Cannot find fault meta data for: " + xmlName);
}
}
@@ -272,8 +269,7 @@
SOAPElement detailEntry = toDetailEntry(faultBean, serContext, faultMetaData);
detail.addChildElement(detailEntry);
}
- else
- log.debug("Cannot obtain fault meta data for: " + exClass);
+ else log.debug("Cannot obtain fault meta data for: " + exClass);
return soapMessage;
}
@@ -307,7 +303,7 @@
// Get the serializer from the type mapping
QName xmlType = faultMetaData.getXmlType();
- Class javaType = faultMetaData.getFaultBean();
+ Class javaType = faultMetaData.getFaultBean();
serContext.setJavaType(javaType);
SerializerFactoryBase serFactory = (SerializerFactoryBase)serContext.getTypeMapping().getSerializer(javaType, xmlType);
if (serFactory == null)
@@ -317,19 +313,15 @@
{
SerializerSupport ser = serFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, faultObject, serContext, null);
- XMLFragment fragment = new XMLFragment(result);
+ XMLFragment xmlFragment = new XMLFragment(result);
+ Element domElement = xmlFragment.toElement();
SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- Element domElement = DOMUtils.parse(fragment.resultToString());
return soapFactory.createElement(domElement);
}
catch (BindingException e)
{
throw new WebServiceException(e);
}
- catch (IOException e)
- {
- throw new WebServiceException(e);
- }
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -67,18 +67,18 @@
{
SOAPContent next = null;
- if (State.XML_VALID == nextState)
+ if (nextState == State.XML_VALID)
{
XMLFragment fragment = marshallObjectContents();
XMLContent xmlValid = new XMLContent(container);
xmlValid.setXMLFragment(fragment);
next = xmlValid;
}
- else if (State.OBJECT_VALID == nextState)
+ else if (nextState == State.OBJECT_VALID)
{
next = this;
}
- else if (State.DOM_VALID == nextState)
+ else if (nextState == State.DOM_VALID)
{
// first transition to XML valid
XMLFragment fragment = marshallObjectContents();
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -37,7 +37,6 @@
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -87,18 +86,18 @@
{
SOAPContent next;
- if (State.XML_VALID == nextState)
+ if (nextState == State.XML_VALID)
{
next = this;
}
- else if (State.OBJECT_VALID == nextState)
+ else if (nextState == State.OBJECT_VALID)
{
Object obj = unmarshallObjectContents();
SOAPContent objectValid = new ObjectContent(container);
objectValid.setObjectValue(obj);
next = objectValid;
}
- else if (State.DOM_VALID == nextState)
+ else if (nextState == State.DOM_VALID)
{
expandContainerChildren();
next = new DOMContent(container);
@@ -107,10 +106,40 @@
{
throw new IllegalArgumentException("Illegal state requested: " + nextState);
}
-
+
return next;
}
+ public Source getPayload()
+ {
+ return xmlFragment.getSource();
+ }
+
+ public void setPayload(Source source)
+ {
+ xmlFragment = new XMLFragment(source);
+ }
+
+ public XMLFragment getXMLFragment()
+ {
+ return xmlFragment;
+ }
+
+ public void setXMLFragment(XMLFragment xmlFragment)
+ {
+ this.xmlFragment = xmlFragment;
+ }
+
+ public Object getObjectValue()
+ {
+ throw new IllegalStateException("Object value not available");
+ }
+
+ public void setObjectValue(Object objValue)
+ {
+ throw new IllegalStateException("Object value not available");
+ }
+
private Object unmarshallObjectContents()
{
@@ -314,36 +343,4 @@
throw new WSException("Failed to transition to DOM", e);
}
}
-
- public Source getPayload()
- {
- throw new IllegalStateException("Payload not available");
- }
-
- public void setPayload(Source source)
- {
- throw new IllegalStateException("Payload not available");
- }
-
- public XMLFragment getXMLFragment()
- {
- return this.xmlFragment;
- }
-
- public void setXMLFragment(XMLFragment xmlFragment)
- {
-
- this.xmlFragment = xmlFragment;
- }
-
- public Object getObjectValue()
- {
- throw new IllegalStateException("Object value not available");
- }
-
- public void setObjectValue(Object objValue)
- {
- throw new IllegalStateException("Object value not available");
- }
-
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -30,6 +30,7 @@
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
+import java.io.StringWriter;
import java.io.Writer;
import javax.xml.transform.Result;
@@ -41,12 +42,14 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
+import org.jboss.ws.core.jaxrpc.binding.BufferedStreamSource;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
- * A XMLFragment represent either a XML {@link Source} or a {@link Result}.<br>
+ * A XMLFragment represent an XML {@link Source}.
+ *
* The basic idea is that any {@link SOAPContentElement} XML_VALID state
* (either before unmarshalling or after marshalling) is represented through a single interface.<br>
*
@@ -63,111 +66,103 @@
private static Logger log = Logger.getLogger(XMLFragment.class);
private Source source;
- private Result result;
// An exception that is created when a client
// accesses a StreamSource that can only be read once
private RuntimeException streamSourceAccessMarker;
- /** Factory method to create XMLFragment from strings.
- */
- public static XMLFragment fromStringFragment(String fragment)
+ public XMLFragment(Source source)
{
- Source source = new StreamSource(new ByteArrayInputStream(fragment.getBytes()));
- return new XMLFragment(source);
+ this.source = source;
}
- public XMLFragment(Source source)
+ public XMLFragment(String xmlString)
{
- this.source = source;
+ source = new StreamSource(new ByteArrayInputStream(xmlString.getBytes()));
}
public XMLFragment(Result result)
{
- this.result = result;
+ if (result instanceof DOMResult)
+ {
+ DOMResult domResult = (DOMResult)result;
+ source = new DOMSource(domResult.getNode());
+ }
+ else if (result instanceof BufferedStreamResult)
+ {
+ BufferedStreamResult br = (BufferedStreamResult)result;
+ ByteArrayOutputStream baos = (ByteArrayOutputStream)br.getOutputStream();
+ source = new BufferedStreamSource(baos.toByteArray());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsupported result type: " + result);
+ }
}
public Source getSource()
{
- if (null == source)
- throw new IllegalStateException("Source not available");
-
source = beginStreamSourceAccess(source);
endStreamSourceAccess();
-
return source;
}
- public String resultToString()
+ /** Transform the Source to an XML string
+ */
+ public String toXMLString()
{
- if (source != null)
- throw new IllegalStateException("Source should never be converted to String");
-
- return resultToString(this.result);
+ try
+ {
+ StringWriter strWriter = new StringWriter(1024);
+ writeSourceInternal(strWriter);
+ return strWriter.toString();
+ }
+ catch (IOException ex)
+ {
+ throw new WSException(ex);
+ }
}
- /**
- * Transform the Source or Result to an Element
+ /** Transform the Source to an Element
*/
public Element toElement()
{
- Element resultingElement = null;
+ Element retElement = null;
try
{
- if (source != null)
- {
- try
- {
- source = beginStreamSourceAccess(source);
- resultingElement = DOMUtils.sourceToElement(source);
- endStreamSourceAccess();
- }
- catch (IOException ex)
- {
- handleStreamSourceAccessException(ex);
- }
- }
- else
- {
- resultingElement = DOMUtils.parse(resultToString(result));
- }
+ source = beginStreamSourceAccess(source);
+ retElement = DOMUtils.sourceToElement(source);
+ source = new DOMSource(retElement);
+ endStreamSourceAccess();
}
- catch (IOException e)
+ catch (IOException ex)
{
- WSException.rethrow("Failed to convert to org.w3c.dom.Element", e);
+ handleStreamSourceAccessException(ex);
}
- return resultingElement;
+ return retElement;
}
public void writeTo(Writer writer) throws IOException
{
- if (result != null)
- {
- writeResult(writer);
- }
- else
- {
- writeSource(writer);
- }
+ writeSourceInternal(writer);
}
public void writeTo(OutputStream out) throws IOException
{
- writeTo(new PrintWriter(out));
+ writeSourceInternal(new PrintWriter(out));
}
/**
* Should only be called with <code>jbossws.SOAPMessage==TRACE</code>
*/
- private void writeSource(Writer writer) throws IOException
+ private void writeSourceInternal(Writer writer) throws IOException
{
if (source instanceof DOMSource)
{
DOMSource domSource = (DOMSource)source;
- DOMWriter domWriter = new DOMWriter(writer).setPrettyprint(false);
- domWriter.print(domSource.getNode());
+ new DOMWriter(writer).print(domSource.getNode());
}
else if (source instanceof StreamSource)
{
@@ -183,6 +178,10 @@
char[] cbuf = new char[1024];
int r = reader.read(cbuf);
+
+ if (r == -1)
+ throw new IOException("StreamSource already exhausted");
+
while (r > 0)
{
writer.write(cbuf, 0, r);
@@ -202,65 +201,21 @@
}
}
- private void writeResult(Writer writer)
- {
- if (result instanceof DOMResult)
- {
- DOMResult domResult = (DOMResult)result;
- DOMWriter dw = new DOMWriter(writer).setPrettyprint(false);
- dw.print(domResult.getNode());
- }
- else if (result instanceof BufferedStreamResult)
- {
- BufferedStreamResult sr = (BufferedStreamResult)result;
- ByteArrayOutputStream out = (ByteArrayOutputStream)sr.getOutputStream();
- try
- {
- byte[] bytes = out.toByteArray();
- writer.write(new String(bytes));
- }
- catch (IOException e)
- {
- throw new WSException("Failed to write XMLFragment to output stream", e);
- }
- }
- else
- {
- throw new IllegalArgumentException("Unable to process result: " + result);
- }
- }
-
- private String resultToString(Result result)
- {
- if (result instanceof DOMResult)
- {
- return DOMWriter.printNode(((DOMResult)result).getNode(), false);
- }
- else if (result instanceof BufferedStreamResult)
- {
- BufferedStreamResult br = (BufferedStreamResult)result;
- byte[] bytes = ((ByteArrayOutputStream)br.getOutputStream()).toByteArray();
- return new String(bytes);
- }
-
- throw new IllegalArgumentException("Unable to process javax.xml.transform.Result implementation: " + result);
- }
-
private Source beginStreamSourceAccess(Source source)
{
- if (source instanceof StreamSource)
+ if (source instanceof StreamSource && !(source instanceof BufferedStreamSource))
{
/* Do some brute force buffering
- try
- {
- Element element = DOMUtils.sourceToElement(source);
- source = new DOMSource(element);
- }
- catch (IOException ex)
- {
- throw new WSException("Cannot create DOMSource", ex);
- }
- */
+ try
+ {
+ Element element = DOMUtils.sourceToElement(source);
+ source = new DOMSource(element);
+ }
+ catch (IOException ex)
+ {
+ throw new WSException("Cannot create DOMSource", ex);
+ }
+ */
}
return source;
}
@@ -274,18 +229,17 @@
}
}
- private void handleStreamSourceAccessException(IOException ex) throws IOException
+ private void handleStreamSourceAccessException(IOException ex)
{
if (source instanceof StreamSource && streamSourceAccessMarker != null)
{
log.error("StreamSource was previously accessed from", streamSourceAccessMarker);
}
- throw ex;
+ WSException.rethrow(ex);
}
public String toString()
{
- String contents = source != null ? "source=" + source : "result=" + result;
- return "XMLFragment {" + contents + "}";
+ return "[source=" + source + "]";
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -526,7 +526,7 @@
public static Element sourceToElement(Source source) throws IOException
{
- Element elementResult = null;
+ Element retElement = null;
try
{
@@ -537,12 +537,12 @@
InputStream ins = streamSource.getInputStream();
if (ins != null)
{
- elementResult = DOMUtils.parse(ins);
+ retElement = DOMUtils.parse(ins);
}
else
{
Reader reader = streamSource.getReader();
- elementResult = DOMUtils.parse(new InputSource(reader));
+ retElement = DOMUtils.parse(new InputSource(reader));
}
}
else if (source instanceof DOMSource)
@@ -551,11 +551,11 @@
Node node = domSource.getNode();
if (node instanceof Element)
{
- elementResult = (Element)node;
+ retElement = (Element)node;
}
else if (node instanceof Document)
{
- elementResult = ((Document)node).getDocumentElement();
+ retElement = ((Document)node).getDocumentElement();
}
else
{
@@ -572,7 +572,7 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
tf.newTransformer().transform(source, new StreamResult(baos));
- elementResult = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+ retElement = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
}
else
{
@@ -587,6 +587,6 @@
throw ioex;
}
- return elementResult;
+ return retElement;
}
}
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-tests/build.xml 2007-03-29 13:53:57 UTC (rev 2715)
@@ -452,6 +452,7 @@
<target name="tests" depends="main" description="Run all unit tests and generate a report">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/**/*TestCase.class"/>
+ <param name="haltonfailure" value="false"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -460,6 +461,7 @@
<target name="tests-samples" depends="init" description="Run samples unit tests">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/*/samples/**/*TestCase.class"/>
+ <param name="haltonfailure" value="true"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -468,6 +470,7 @@
<target name="tests-tools" depends="init" description="Run tools unit tests">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/tools/**/*TestCase.class"/>
+ <param name="haltonfailure" value="false"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -479,13 +482,14 @@
<target name="test" depends="init" if="test" description="Run all unit tests in a given directory">
<antcall target="tests-main">
<param name="include.wildcard" value="org/jboss/test/ws/${test}/**/*TestCase.class"/>
+ <param name="haltonfailure" value="false"/>
</antcall>
</target>
<!-- Common test target -->
<target name="tests-main" depends="init">
<mkdir dir="${tests.output.dir}/reports"/>
- <junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}">
+ <junit printsummary="yes" showoutput="yes" dir="${tests.output.dir}" haltonfailure="${haltonfailure}">
<jvmarg value="-Djava.security.manager"/>
<sysproperty key="build.testlog" value="${tests.output.dir}/log"/>
<sysproperty key="client.scenario" value="${client.scenario}"/>
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -83,7 +83,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(String.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
String out = (String)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value, out);
@@ -101,7 +101,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(Calendar.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
Calendar out = (Calendar)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value.getTime(), out.getTime());
@@ -120,7 +120,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(BigInteger.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
BigInteger out = (BigInteger)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value, out);
@@ -138,7 +138,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(BigDecimal.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
BigDecimal out = (BigDecimal)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value, out);
@@ -161,7 +161,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(QName.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
QName out = (QName)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value, out);
@@ -179,7 +179,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(URI.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
URI out = (URI)des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(value, out);
@@ -197,7 +197,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(byte[].class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
byte[] out = (byte[])des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(new String(value), new String(out));
@@ -215,7 +215,7 @@
DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(byte[].class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
- Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).resultToString().getBytes()));
+ Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
byte[] out = (byte[])des.deserialize(xmlName, xmlType, source, serContext);
assertEquals(new String(value), new String(out));
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java 2007-03-29 11:27:04 UTC (rev 2714)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java 2007-03-29 13:53:57 UTC (rev 2715)
@@ -63,7 +63,7 @@
"</tns:Order>";
SOAPContentElement soapEl = new SOAPContentElement(name);
- soapEl.setXMLFragment( XMLFragment.fromStringFragment(xmlFragment) );
+ soapEl.setXMLFragment(new XMLFragment(xmlFragment) );
assertEquals(name, soapEl.getElementName());
@@ -95,7 +95,7 @@
String xmlFragment = "<tns:Order xmlns:tns='http://someURI'>No child element</tns:Order>";
SOAPContentElement soapEl = new SOAPContentElement(name);
- soapEl.setXMLFragment( XMLFragment.fromStringFragment(xmlFragment) );
+ soapEl.setXMLFragment(new XMLFragment(xmlFragment) );
assertEquals(name, soapEl.getElementName());
assertEquals("No child element", soapEl.getValue());
@@ -109,7 +109,7 @@
String xmlFragment = "<tns:Order xmlns:tns='http://someURI'/>";
SOAPContentElement soapEl = new SOAPContentElement(name);
- soapEl.setXMLFragment( XMLFragment.fromStringFragment(xmlFragment) );
+ soapEl.setXMLFragment(new XMLFragment(xmlFragment) );
assertEquals(name, soapEl.getElementName());
assertFalse(soapEl.hasChildNodes());
@@ -124,7 +124,7 @@
String xmlFragment = "<tns:BadName xmlns:tns='http://someURI'>No child element</tns:BadName>";
SOAPContentElement soapEl = new SOAPContentElement(name);
- soapEl.setXMLFragment( XMLFragment.fromStringFragment(xmlFragment) );
+ soapEl.setXMLFragment(new XMLFragment(xmlFragment) );
try
{
@@ -147,7 +147,7 @@
SOAPContentElement soapEl = new SOAPContentElement(name);
soapEl.setAttribute("foo", "Kermit");
- soapEl.setXMLFragment( XMLFragment.fromStringFragment(xmlFragment) );
+ soapEl.setXMLFragment(new XMLFragment(xmlFragment) );
assertEquals(name, soapEl.getElementName());
assertEquals("Kermit", soapEl.getAttributeValue(new NameImpl("foo")));
17 years, 9 months
JBossWS SVN: r2714 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 07:27:04 -0400 (Thu, 29 Mar 2007)
New Revision: 2714
Modified:
trunk/build/ant.properties.example
Log:
Update mail recpients
Modified: trunk/build/ant.properties.example
===================================================================
--- trunk/build/ant.properties.example 2007-03-29 11:15:58 UTC (rev 2713)
+++ trunk/build/ant.properties.example 2007-03-29 11:27:04 UTC (rev 2714)
@@ -30,6 +30,7 @@
hudson.password=changeme
hudson.root=/home/tdiesler/workspace
+hudson.host=jbws.dyndns.org
hudson.port=8180
hudson.jdk15=/usr/java/jdk1.5
@@ -47,7 +48,7 @@
hudson.jboss40.build=jboss-4.0.5.SP1
hudson.jboss40.rev=HEAD
-hudson.mail.recipients=thomas.diesler(a)jboss.com
+hudson.mail.recipients=thomas.diesler(a)jboss.com, heiko.braun(a)jboss.com, jason.greene(a)jboss.com, alejandro.guizar(a)jboss.com
hudson.smtp.host=mail.navisite.com
# JBoss Repository
17 years, 9 months
JBossWS SVN: r2713 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 07:15:58 -0400 (Thu, 29 Mar 2007)
New Revision: 2713
Modified:
trunk/build/ant.properties.example
Log:
Cahnge smtp host to mail.navisite.com
Modified: trunk/build/ant.properties.example
===================================================================
--- trunk/build/ant.properties.example 2007-03-29 10:31:45 UTC (rev 2712)
+++ trunk/build/ant.properties.example 2007-03-29 11:15:58 UTC (rev 2713)
@@ -48,7 +48,7 @@
hudson.jboss40.rev=HEAD
hudson.mail.recipients=thomas.diesler(a)jboss.com
-hudson.smtp.host=pobox-2.corp.redhat.com
+hudson.smtp.host=mail.navisite.com
# JBoss Repository
#jboss.repository=file:/home/tdiesler/cvs/jboss.local.repository
17 years, 9 months
JBossWS SVN: r2712 - trunk/jbossws-core/src/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-29 06:31:45 -0400 (Thu, 29 Mar 2007)
New Revision: 2712
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
Log:
Disable brute force buffering
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 10:27:42 UTC (rev 2711)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-29 10:31:45 UTC (rev 2712)
@@ -250,7 +250,7 @@
{
if (source instanceof StreamSource)
{
- // Do some brute force buffering
+ /* Do some brute force buffering
try
{
Element element = DOMUtils.sourceToElement(source);
@@ -260,6 +260,7 @@
{
throw new WSException("Cannot create DOMSource", ex);
}
+ */
}
return source;
}
17 years, 9 months