JBossWS SVN: r11914 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-31 13:26:32 -0400 (Wed, 31 Mar 2010)
New Revision: 11914
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2718] cleaning excludes
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-03-31 17:20:58 UTC (rev 11913)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-03-31 17:26:32 UTC (rev 11914)
@@ -4,9 +4,6 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
-org/jboss/test/ws/jaxws/jbws2718/**
-
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
org/jboss/test/ws/jaxws/jbws2937/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-03-31 17:20:58 UTC (rev 11913)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-03-31 17:26:32 UTC (rev 11914)
@@ -4,9 +4,6 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
-org/jboss/test/ws/jaxws/jbws2718/**
-
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
org/jboss/test/ws/jaxws/jbws2937/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-03-31 17:20:58 UTC (rev 11913)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-03-31 17:26:32 UTC (rev 11914)
@@ -4,9 +4,6 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
-org/jboss/test/ws/jaxws/jbws2718/**
-
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
org/jboss/test/ws/jaxws/jbws2937/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-31 17:20:58 UTC (rev 11913)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-31 17:26:32 UTC (rev 11914)
@@ -4,9 +4,6 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
-org/jboss/test/ws/jaxws/jbws2718/**
-
# [JBXB-243]
org/jboss/test/ws/jaxrpc/jbws434/**
org/jboss/test/ws/jaxrpc/jbws720/**
14 years, 8 months
JBossWS SVN: r11913 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-31 13:20:58 -0400 (Wed, 31 Mar 2010)
New Revision: 11913
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2718/
framework/trunk/testsuite/test/resources/jaxws/jbws2718/
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2718] Removing testcase for rejected issue
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-03-31 17:09:25 UTC (rev 11912)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-03-31 17:20:58 UTC (rev 11913)
@@ -821,17 +821,6 @@
</classes>
</war>
- <!-- jaxws-jbws2718 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2718.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2718/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2718/**/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2718/*TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2718/WEB-INF">
- <include name="wsdl1/**" />
- </webinf>
- </war>
-
<!-- jaxws-jbws2934 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
14 years, 8 months
JBossWS SVN: r11912 - stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-31 13:09:25 -0400 (Wed, 31 Mar 2010)
New Revision: 11912
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBWS-2986] Extending AbstractWsdlFilePublisher
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2010-03-31 16:14:58 UTC (rev 11911)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2010-03-31 17:09:25 UTC (rev 11912)
@@ -22,39 +22,27 @@
package org.jboss.wsf.stack.jbws;
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStream;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.factory.WSDLFactory;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.utils.ResourceURL;
+import org.jboss.ws.core.utils.AbstractWSDLFilePublisher;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLWriter;
-import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.IOUtils;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Document;
-import org.w3c.dom.Element;
/** A helper class that publishes the wsdl files and their imports to the server/data/wsdl directory.
*
@@ -62,33 +50,14 @@
* @author Thomas.Diesler(a)jboss.org
* @since 02-June-2004
*/
-public class WSDLFilePublisher
+public class WSDLFilePublisher extends AbstractWSDLFilePublisher
{
// provide logging
private static final Logger log = Logger.getLogger(WSDLFilePublisher.class);
- // The deployment info for the web service archive
- private ArchiveDeployment dep;
- // The expected wsdl location in the deployment
- private String expLocation;
- // The server config
- private ServerConfig serverConfig;
-
public WSDLFilePublisher(ArchiveDeployment dep)
{
- this.dep = dep;
-
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
-
- if (dep.getType().toString().endsWith("JSE"))
- {
- expLocation = "WEB-INF/wsdl/";
- }
- else
- {
- expLocation = "META-INF/wsdl/";
- }
+ super(dep);
}
/** Publish the deployed wsdl file to the data directory
@@ -100,7 +69,7 @@
// For each service
for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
{
- File wsdlFile = getPublishLocation(deploymentName, serviceMetaData);
+ File wsdlFile = getPublishLocation(deploymentName, serviceMetaData.getWsdlFileOrLocation().toExternalForm(), serviceMetaData.getWsdlPublishLocation());
if (wsdlFile == null)
continue;
@@ -114,22 +83,22 @@
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
new WSDLWriter(wsdlDefinitions).write(fWriter, Constants.DEFAULT_XML_CHARSET);
- URL wsdlPublishURL = wsdlFile.toURL();
+ URL wsdlPublishURL = wsdlFile.toURI().toURL();
log.info("WSDL published to: " + wsdlPublishURL);
// udpate the wsdl file location
- serviceMetaData.setWsdlLocation(wsdlFile.toURL());
+ serviceMetaData.setWsdlLocation(wsdlPublishURL);
// Process the wsdl imports
Definition wsdl11Definition = wsdlDefinitions.getWsdlOneOneDefinition();
if (wsdl11Definition != null)
{
List<String> published = new LinkedList<String>();
- publishWsdlImports(wsdlFile.toURL(), wsdl11Definition, published);
+ publishWsdlImports(wsdlPublishURL, wsdl11Definition, published);
// Publish XMLSchema imports
Document document = wsdlDefinitions.getWsdlDocument();
- publishSchemaImports(wsdlFile.toURL(), document.getDocumentElement(), published);
+ publishSchemaImports(wsdlPublishURL, document.getDocumentElement(), published);
}
else
{
@@ -153,192 +122,23 @@
}
}
}
-
- /** Publish the wsdl imports for a given wsdl definition
- */
- private void publishWsdlImports(URL parentURL, Definition parentDefinition, List<String> published) throws Exception
- {
- String baseURI = parentURL.toExternalForm();
-
- Iterator it = parentDefinition.getImports().values().iterator();
- while (it.hasNext())
- {
- for (Import wsdlImport : (List<Import>)it.next())
- {
- String locationURI = wsdlImport.getLocationURI();
- Definition subdef = wsdlImport.getDefinition();
-
- // its an external import, don't publish locally
- if (locationURI.startsWith("http://") == false)
- {
- // infinity loops prevention
- if (published.contains(locationURI))
- {
- continue;
- }
- else
- {
- published.add(locationURI);
- }
-
- URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
- File targetFile = new File(targetURL.getPath());
- targetFile.getParentFile().mkdirs();
-
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
- FileWriter fw = new FileWriter(targetFile);
- wsdlWriter.writeWSDL(subdef, fw);
- fw.close();
-
- if (log.isDebugEnabled())
- log.debug("WSDL import published to: " + targetURL);
-
- // recursively publish imports
- publishWsdlImports(targetURL, subdef, published);
-
- // Publish XMLSchema imports
- Element subdoc = DOMUtils.parse(targetURL.openStream());
- publishSchemaImports(targetURL, subdoc, published);
- }
- }
- }
- }
-
- /** Publish the schema imports for a given wsdl definition
- */
- private void publishSchemaImports(URL parentURL, Element element, List<String> published) throws Exception
- {
- String baseURI = parentURL.toExternalForm();
-
- Iterator it = DOMUtils.getChildElements(element);
- while (it.hasNext())
- {
- Element childElement = (Element)it.next();
- if ("import".equals(childElement.getLocalName()) || "include".equals(childElement.getLocalName()))
- {
- String schemaLocation = childElement.getAttribute("schemaLocation");
- if (schemaLocation.length() > 0)
- {
- if (schemaLocation.startsWith("http://") == false)
- {
- // infinity loops prevention
- if (published.contains(schemaLocation))
- {
- continue;
- }
- else
- {
- published.add(schemaLocation);
- }
-
- URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
- File targetFile = new File(xsdURL.getPath());
- targetFile.getParentFile().mkdirs();
-
- String deploymentName = dep.getCanonicalName();
-
- // get the resource path including the separator
- int index = baseURI.indexOf(deploymentName) + 1;
- String resourcePath = baseURI.substring(index + deploymentName.length());
- //check for sub-directories
- resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1);
-
- resourcePath = expLocation + resourcePath + schemaLocation;
- while (resourcePath.indexOf("//") != -1)
- {
- resourcePath = resourcePath.replace("//", "/");
- }
- URL resourceURL = dep.getMetaDataFileURL(resourcePath);
- InputStream is = new ResourceURL(resourceURL).openStream();
- if (is == null)
- throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
-
- FileOutputStream fos = null;
- try
- {
- fos = new FileOutputStream(targetFile);
- IOUtils.copyStream(fos, is);
- }
- finally
- {
- if (fos != null) fos.close();
- }
-
- if (log.isDebugEnabled())
- log.debug("XMLSchema import published to: " + xsdURL);
-
- // recursively publish imports
- Element subdoc = DOMUtils.parse(xsdURL.openStream());
- publishSchemaImports(xsdURL, subdoc, published);
- }
- }
- }
- else
- {
- publishSchemaImports(parentURL, childElement, published);
- }
- }
- }
-
+
/**
- * Delete the published wsdl
- */
- public void unpublishWsdlFiles() throws IOException
- {
- String deploymentDir = (dep.getParent() != null ? dep.getParent().getSimpleName() : dep.getSimpleName());
-
- File serviceDir = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
- deleteWsdlPublishDirectory(serviceDir);
- }
-
- /**
- * Delete the published wsdl document, traversing down the dir structure
- */
- private void deleteWsdlPublishDirectory(File dir) throws IOException
- {
- String[] files = dir.list();
- for (int i = 0; files != null && i < files.length; i++)
- {
- String fileName = files[i];
- File file = new File(dir + "/" + fileName);
- if (file.isDirectory())
- {
- deleteWsdlPublishDirectory(file);
- }
- else
- {
- if (file.delete() == false)
- log.warn("Cannot delete published wsdl document: " + file.toURL());
- }
- }
-
- // delete the directory as well
- dir.delete();
- }
-
- /**
* Get the file publish location
*/
- private File getPublishLocation(String archiveName, ServiceMetaData serviceMetaData) throws IOException
+ private File getPublishLocation(String archiveName, String wsdlLocation, String wsdlPublishLocation) throws IOException
{
- String wsdlLocation = null;
- if (serviceMetaData.getWsdlLocation() != null)
- wsdlLocation = serviceMetaData.getWsdlLocation().toExternalForm();
- else if (serviceMetaData.getWsdlFile() != null)
- wsdlLocation = serviceMetaData.getWsdlFile();
-
if (wsdlLocation == null)
{
- log.warn("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
+ log.warn("Cannot get wsdl publish location for null wsdl location!");
return null;
}
- if (log.isDebugEnabled())
- log.debug("Publish WSDL file: " + wsdlLocation);
+ if (log.isTraceEnabled())
+ log.trace("Publishing WSDL file: " + wsdlLocation);
// Only file URLs are supported in <wsdl-publish-location>
- String publishLocation = serviceMetaData.getWsdlPublishLocation();
+ String publishLocation = wsdlPublishLocation;
boolean predefinedLocation = publishLocation != null && publishLocation.startsWith("file:");
File locationFile = null;
@@ -363,22 +163,22 @@
}
}
- File wsdlFile;
+ File result;
if (wsdlLocation.indexOf(expLocation) >= 0)
{
wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(expLocation) + expLocation.length());
- wsdlFile = new File(locationFile + "/" + wsdlLocation);
+ result = new File(locationFile + "/" + wsdlLocation);
}
else if (wsdlLocation.startsWith("vfsfile:") || wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:") || wsdlLocation.startsWith("vfszip:"))
{
wsdlLocation = wsdlLocation.substring(wsdlLocation.lastIndexOf("/") + 1);
- wsdlFile = new File(locationFile + "/" + wsdlLocation);
+ result = new File(locationFile + "/" + wsdlLocation);
}
else
{
- throw new WSException("Invalid wsdlFile '" + wsdlLocation + "', expected in: " + expLocation);
+ throw new RuntimeException("Invalid wsdlFile '" + wsdlLocation + "', expected in: " + expLocation);
}
- return wsdlFile;
+ return result;
}
}
14 years, 8 months
JBossWS SVN: r11911 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-31 12:14:58 -0400 (Wed, 31 Mar 2010)
New Revision: 11911
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSServiceFactoryBean.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WSDLFilePublisher.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
Removed:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BusHolder.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/BusDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
Log:
[JBWS-2971]
- configuring the jaxws:endpoint in the generated jbossws-cxf.xml file with a custom ServiceFactoryBean
- refactoring JBossWSCXFConfigurer and moving the configuration required on server side only to a separate configurer
- refactoring BusHolder
- added WSDLFilePublisher extending the abstract one in jbossws-common
Deleted: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BusHolder.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/BusHolder.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -1,229 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.client.configuration;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.binding.soap.SoapTransportFactory;
-import org.apache.cxf.bus.spring.BusApplicationContext;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.resource.ResourceManager;
-import org.apache.cxf.resource.ResourceResolver;
-import org.apache.cxf.transport.DestinationFactory;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.servlet.ServletTransportFactory;
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.core.io.InputStreamResource;
-
-/**
- * An wrapper of the Bus for performing most of the configurations required on it by JBossWS
- *
- * @author alessio.soldano(a)jboss.com
- * @since 25-Mar-2010
- *
- */
-public class BusHolder
-{
- private static final Logger log = Logger.getLogger(BusHolder.class);
- public static final String PARAM_CXF_BEANS_URL = "jbossws.cxf.beans.url";
- private boolean configured = false;
- protected BusApplicationContext ctx ;
- protected List<GenericApplicationContext> additionalCtx = new LinkedList<GenericApplicationContext>();
- protected Bus bus;
-
- /**
- * Private constructor
- */
- private BusHolder()
- {
- //NOP
- }
-
- /**
- * Creates a new BusHolder instance; a new Bus is created using the
- * provided location for loading additional configurations
- *
- * @param location
- * @return
- */
- public static BusHolder create(URL location)
- {
- BusHolder holder = new BusHolder();
- holder.createBus(location);
- return holder;
- }
-
- /**
- * Creates a new BusHolder instance using the provided Bus
- *
- * @param bus
- * @return
- */
- public static BusHolder create(Bus bus)
- {
- BusHolder holder = new BusHolder();
- holder.setBus(bus);
- holder.setContext(bus.getExtension(BusApplicationContext.class));
- return holder;
- }
-
- /**
- * Update the Bus held by the this instance using the provided parameters.
- * This basically prepares the bus for being used with JBossWS.
- *
- * @param jbossCxfXml The location of the jboss-cxf.xml configuration file
- * @param soapTransportFactory The SoapTransportFactory to configure, if any
- * @param resolver The ResourceResolver to configure, if any
- * @param customization The BindingCustomization to configure, if any
- * @throws IOException Throws IOException if the jboss-cxf.xml file can't be read
- */
- public void configure(URL jbossCxfXml, SoapTransportFactory soapTransportFactory, ResourceResolver resolver, BindingCustomization customization) throws IOException
- {
- if (configured)
- {
- throw new IllegalStateException("Underlying bus is already configured for JBossWS use!");
- }
- setSoapTransportFactory(bus, soapTransportFactory);
- setResourceResolver(bus, resolver);
- setBindingCustomization(bus, customization);
- if (jbossCxfXml != null)
- {
- additionalCtx.add(loadAdditionalConfig(ctx, jbossCxfXml));
- }
- configured = true;
- }
-
- /**
- * Performs close operations (currently implies destroying additional contexts)
- *
- */
- public void close()
- {
- for (GenericApplicationContext gac : additionalCtx)
- {
- gac.destroy();
- }
- }
-
- /**
- * Creates the Bus using a SpringBusFactory with no specific Spring application context.
- * Then loads additional configurations from the provided location
- *
- * @param location
- * @return
- */
- protected void createBus(URL location)
- {
- bus = new SpringBusFactory().createBus();
- ctx = bus.getExtension(BusApplicationContext.class);
- //Load additional configurations from cxf-servlet.xml
- if (location != null)
- {
- try
- {
- additionalCtx.add(loadAdditionalConfig(ctx, location));
- }
- catch (IOException e)
- {
- if (log.isTraceEnabled())
- log.trace("Could not load additional config from location: " + location, e);
- }
- }
- //Force servlet transport to prevent CXF from using Jetty as a transport
- DestinationFactory factory = new ServletTransportFactory(bus);
- for (String s : factory.getTransportIds()) {
- registerTransport(factory, s);
- }
- }
-
- protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
- {
- if (resourceResolver != null)
- {
- bus.getExtension(ResourceManager.class).addResourceResolver(resourceResolver);
- }
- }
-
- protected static void setSoapTransportFactory(Bus bus, SoapTransportFactory factory)
- {
- if (factory != null)
- {
- DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
- factory.setBus(bus);
- dfm.registerDestinationFactory(Constants.NS_SOAP11, factory);
- dfm.registerDestinationFactory(Constants.NS_SOAP12, factory);
- }
- }
-
- protected static void setBindingCustomization(Bus bus, BindingCustomization customization)
- {
- if (customization != null) {
- Configurer prev = bus.getExtension(Configurer.class);
- JBossWSCXFConfigurer jbosswsConfigurer = (prev instanceof JBossWSCXFConfigurer) ? (JBossWSCXFConfigurer)prev : new JBossWSCXFConfigurer(prev);
- jbosswsConfigurer.setBindingCustomization(customization);
- bus.setExtension(jbosswsConfigurer, Configurer.class);
- }
- }
-
- protected static GenericApplicationContext loadAdditionalConfig(ApplicationContext ctx, URL locationUrl) throws IOException
- {
- if (locationUrl == null) throw new IllegalArgumentException("Cannot load additional config from null location!");
- InputStream is = locationUrl.openStream();
- GenericApplicationContext childCtx = new GenericApplicationContext(ctx);
- XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(childCtx);
- reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
- reader.loadBeanDefinitions(new InputStreamResource(is));
- childCtx.refresh();
- return childCtx;
- }
-
- private void registerTransport(DestinationFactory factory, String namespace)
- {
- bus.getExtension(DestinationFactoryManager.class).registerDestinationFactory(namespace, factory);
- }
-
- public Bus getBus()
- {
- return bus;
- }
-
- private void setBus(Bus bus)
- {
- this.bus = bus;
- }
-
- private void setContext(BusApplicationContext ctx)
- {
- this.ctx = ctx;
- }
-}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -38,7 +38,7 @@
*/
public class JBossWSCXFConfigurer implements Configurer
{
- private BindingCustomization customization;
+ protected BindingCustomization customization;
private Configurer delegate;
public JBossWSCXFConfigurer(Configurer delegate)
@@ -46,30 +46,34 @@
this.delegate = delegate;
}
- public void setBindingCustomization(BindingCustomization customization)
+ public JBossWSCXFConfigurer(Configurer delegate, BindingCustomization customization)
{
+ this(delegate);
this.customization = customization;
}
+ @Override
public void configureBean(Object beanInstance)
{
- if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
- {
- configureEndpointFactory((AbstractWSDLBasedEndpointFactory)beanInstance);
- }
- else if (beanInstance instanceof ClientProxyFactoryBean)
- {
- configureClientProxyFactoryBean((ClientProxyFactoryBean)beanInstance);
- }
- //add other beans configuration here below
+ internalConfigure(beanInstance);
if (delegate != null)
{
delegate.configureBean(beanInstance);
}
}
+ @Override
public void configureBean(String name, Object beanInstance)
{
+ internalConfigure(beanInstance);
+ if (delegate != null)
+ {
+ delegate.configureBean(name, beanInstance);
+ }
+ }
+
+ protected void internalConfigure(Object beanInstance)
+ {
if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
{
configureEndpointFactory((AbstractWSDLBasedEndpointFactory)beanInstance);
@@ -79,39 +83,15 @@
configureClientProxyFactoryBean((ClientProxyFactoryBean)beanInstance);
}
//add other beans configuration here below
- if (delegate != null)
- {
- delegate.configureBean(name, beanInstance);
- }
}
/**
- * Configure the endpoint factory; currently set the binding customization in the databinding (Server Side).
+ * Configure the endpoint factory
*
* @param factory
*/
protected synchronized void configureEndpointFactory(AbstractWSDLBasedEndpointFactory factory)
{
- //Configure binding customization
- if (customization != null)
- {
- //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
- ReflectionServiceFactoryBean serviceFactory = factory.getServiceFactory();
- serviceFactory.reset();
- DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
- setBindingCustomization(serviceFactoryDataBinding, customization);
- serviceFactory.setDataBinding(serviceFactoryDataBinding);
- //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one)
- if (factory.getDataBinding() == null)
- {
- //set the service factory's databinding to prevent CXF resetting everything because user did not provide anything
- factory.setDataBinding(serviceFactoryDataBinding);
- }
- else
- {
- setBindingCustomization(factory.getDataBinding(), customization);
- }
- }
//add other configurations here below
}
@@ -134,7 +114,7 @@
//customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one)
if (factory.getDataBinding() == null)
{
- //set the service factory's databinding to prevent CXF resetting everything because user did not provide anything
+ //set the endpoint factory's databinding to prevent CXF resetting everything because user did not provide anything
factory.setDataBinding(serviceFactoryDataBinding);
}
else
@@ -145,6 +125,7 @@
//add other configurations here below
}
+ @SuppressWarnings("unchecked")
protected static void setBindingCustomization(DataBinding db, BindingCustomization customization)
{
//JAXB
@@ -157,4 +138,9 @@
}
//add other binding customizations here below
}
+
+ public void setBindingCustomization(BindingCustomization customization)
+ {
+ this.customization = customization;
+ }
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/BusDeploymentAspect.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/BusDeploymentAspect.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -34,7 +34,8 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.ResourceResolver;
-import org.jboss.wsf.stack.cxf.client.configuration.BusHolder;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+import org.jboss.wsf.stack.cxf.configuration.BusHolder;
/**
* A deployment aspect that creates the CXF Bus early and attaches it to the endpoints (wrapped in a BusHolder)
@@ -56,10 +57,11 @@
ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
try
{
+ ArchiveDeployment aDep = (ArchiveDeployment)dep;
//set the runtime classloader (pointing to the deployment unit) to allow CXF accessing to the classes
SecurityActions.setContextClassLoader(dep.getRuntimeClassLoader());
- ResourceResolver deploymentResolver = ((ArchiveDeployment)dep).getResourceResolver();
+ ResourceResolver deploymentResolver = aDep.getResourceResolver();
URL cxfServletURL = null;
try
@@ -68,7 +70,7 @@
}
catch (IOException e)
{
- } //ignore, cxf-servlet.xml is optional
+ } //ignore, cxf-servlet.xml is optional, we might even decide not to support this
holder = BusHolder.create(cxfServletURL);
@@ -77,8 +79,8 @@
{
URL jbossCxfXml = deploymentResolver.resolve(contextParams.get(BusHolder.PARAM_CXF_BEANS_URL));
org.apache.cxf.resource.ResourceResolver resolver = new JBossWSResourceResolver(deploymentResolver);
- BindingCustomization customizations = dep.getAttachment(BindingCustomization.class);
- holder.configure(jbossCxfXml, new SoapTransportFactoryExt(), resolver, customizations);
+ JBossWSCXFConfigurer configurer = holder.createConfigurer(dep.getAttachment(BindingCustomization.class), new WSDLFilePublisher(aDep));
+ holder.configure(jbossCxfXml, new SoapTransportFactoryExt(), resolver, configurer);
}
catch (IOException e)
{
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -54,7 +54,8 @@
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.stack.cxf.client.configuration.BusHolder;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.management.InstrumentationManagerExtImpl;
import org.springframework.context.ApplicationContext;
@@ -133,7 +134,8 @@
{
ResourceResolver resolver = endpoint.getAttachment(ResourceResolver.class);
BindingCustomization customizations = endpoint.getAttachment(BindingCustomization.class);
- lazyLoadedBusHolder.configure(new URL(jbossCxfXml), new SoapTransportFactoryExt(), resolver, customizations);
+ JBossWSCXFConfigurer configurer = lazyLoadedBusHolder.createConfigurer(customizations, null);
+ lazyLoadedBusHolder.configure(new URL(jbossCxfXml), new SoapTransportFactoryExt(), resolver, configurer);
}
catch (IOException e)
{
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -37,7 +37,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.stack.cxf.client.configuration.BusHolder;
+import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.metadata.services.DDBeans;
import org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint;
@@ -171,7 +171,7 @@
boolean mtomEnabled = isMtomEnabled(ep.getTargetBeanClass());
- DDEndpoint ddep = new DDEndpoint(id, address, implementor, mtomEnabled);
+ DDEndpoint ddep = new DDEndpoint(id, address, implementor, mtomEnabled, JBossWSServiceFactoryBean.class.getName());
if (depType == DeploymentType.JAXWS_EJB3)
{
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSServiceFactoryBean.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSServiceFactoryBean.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSServiceFactoryBean.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf;
+
+import java.io.IOException;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.EndpointException;
+import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.jboss.logging.Logger;
+
+/**
+ * A service factory bean that performs additional operations
+ * required by the JBossWS integration when creating a service.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Mar-2010
+ *
+ */
+public class JBossWSServiceFactoryBean extends JaxWsServiceFactoryBean
+{
+ private WSDLFilePublisher wsdlPublisher;
+
+ @Override
+ public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException
+ {
+ Endpoint endpoint = super.createEndpoint(ei);
+ Service service = endpoint.getService();
+ // Publish wsdl after endpoint deployment, as required by JSR-109, section 8.2
+ if (wsdlPublisher != null)
+ {
+ String wsdlLocation = isFromWsdl() ? getWsdlURL() : null;
+ try
+ {
+ wsdlPublisher.publishWsdlFiles(service.getName(), wsdlLocation, BusFactory.getThreadDefaultBus(false), service.getServiceInfos());
+ }
+ catch (IOException ioe)
+ {
+ throw new RuntimeException("Error while publishing wsdl for service " + service.getName(), ioe);
+ }
+ }
+ else
+ {
+ Logger.getLogger(JBossWSServiceFactoryBean.class).warn("WSDLPublisher not configured, unable to publish contract!");
+ }
+ return endpoint;
+ }
+
+ public void setWsdlPublisher(WSDLFilePublisher wsdlPublisher)
+ {
+ this.wsdlPublisher = wsdlPublisher;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSServiceFactoryBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WSDLFilePublisher.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WSDLFilePublisher.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WSDLFilePublisher.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.xml.WSDLWriter;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.utils.AbstractWSDLFilePublisher;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.w3c.dom.Document;
+
+/**
+ * A WSDL file publisher for CXF based stack
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Mar-2010
+ *
+ */
+public class WSDLFilePublisher extends AbstractWSDLFilePublisher
+{
+ private static final Logger log = Logger.getLogger(WSDLFilePublisher.class);
+
+ public WSDLFilePublisher(ArchiveDeployment dep)
+ {
+ super(dep);
+ }
+
+ /** Publish the deployed wsdl file to the data directory
+ */
+ public void publishWsdlFiles(QName serviceName, String wsdlLocation, Bus bus, List<ServiceInfo> serviceInfos) throws IOException
+ {
+ String deploymentName = dep.getCanonicalName();
+ File wsdlFile = getPublishLocation(serviceName.getLocalPart(), deploymentName, wsdlLocation);
+ wsdlFile.getParentFile().mkdirs();
+ try
+ {
+ // Write the wsdl def to file
+ ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, serviceInfos);
+ Definition def = builder.build();
+
+ Document doc = getWsdlDocument(bus, def);
+ writeDocument(doc, wsdlFile);
+
+ URL wsdlPublishURL = wsdlFile.toURI().toURL();
+ log.info("WSDL published to: " + wsdlPublishURL);
+
+ // Process the wsdl imports
+ if (def != null)
+ {
+ List<String> published = new LinkedList<String>();
+ publishWsdlImports(wsdlPublishURL, def, published);
+
+ // Publish XMLSchema imports
+ publishSchemaImports(wsdlPublishURL, doc.getDocumentElement(), published);
+ }
+ else
+ {
+ throw new NotImplementedException("WSDL-2.0 imports");
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Cannot publish wsdl to: " + wsdlFile, e);
+ }
+ }
+
+ private static Document getWsdlDocument(Bus bus, Definition def) throws WSDLException
+ {
+ WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter();
+ def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
+ return wsdlWriter.getDocument(def);
+ }
+
+ private static void writeDocument(Document doc, File file) throws IOException, XMLStreamException
+ {
+ String enc = null;
+ try
+ {
+ enc = doc.getXmlEncoding();
+ }
+ catch (Exception ex)
+ {
+ //ignore - not dom level 3
+ }
+ if (enc == null)
+ {
+ enc = "utf-8";
+ }
+ FileOutputStream fos = new FileOutputStream(file);
+ try
+ {
+ XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(fos, enc);
+ StaxUtils.writeNode(doc, writer, true);
+ writer.flush();
+ }
+ finally
+ {
+ fos.close();
+ }
+ }
+
+ /**
+ * Get the file publish location
+ */
+ private File getPublishLocation(String serviceName, String archiveName, String wsdlLocation) throws IOException
+ {
+ if (wsdlLocation == null && serviceName == null)
+ {
+ log.warn("Cannot get wsdl publish location for null wsdl location and serviceName!");
+ return null;
+ }
+
+ //JBWS-2829: windows issue
+ if (archiveName.startsWith("http://"))
+ {
+ archiveName = archiveName.replace("http://", "http-");
+ }
+
+ File locationFile = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
+
+ File result;
+ if (wsdlLocation != null && wsdlLocation.indexOf(expLocation) >= 0)
+ {
+ wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(expLocation) + expLocation.length());
+ result = new File(locationFile + "/" + wsdlLocation);
+ }
+ else if (wsdlLocation != null && (wsdlLocation.startsWith("vfsfile:") || wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:") || wsdlLocation.startsWith("vfszip:")))
+ {
+ wsdlLocation = wsdlLocation.substring(wsdlLocation.lastIndexOf("/") + 1);
+ result = new File(locationFile + "/" + wsdlLocation);
+ }
+ else
+ {
+ result = new File(locationFile + "/" + serviceName + ".wsdl");
+ }
+
+ return result;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WSDLFilePublisher.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -0,0 +1,243 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.configuration;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.soap.SoapTransportFactory;
+import org.apache.cxf.bus.spring.BusApplicationContext;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.resource.ResourceManager;
+import org.apache.cxf.resource.ResourceResolver;
+import org.apache.cxf.transport.DestinationFactory;
+import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.transport.servlet.ServletTransportFactory;
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.stack.cxf.WSDLFilePublisher;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.core.io.InputStreamResource;
+
+/**
+ * An wrapper of the Bus for performing most of the configurations required on it by JBossWS
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Mar-2010
+ *
+ */
+public class BusHolder
+{
+ private static final Logger log = Logger.getLogger(BusHolder.class);
+ public static final String PARAM_CXF_BEANS_URL = "jbossws.cxf.beans.url";
+ private boolean configured = false;
+ protected BusApplicationContext ctx ;
+ protected List<GenericApplicationContext> additionalCtx = new LinkedList<GenericApplicationContext>();
+ protected Bus bus;
+
+ /**
+ * Private constructor
+ */
+ private BusHolder()
+ {
+ //NOP
+ }
+
+ /**
+ * Creates a new BusHolder instance; a new Bus is created using the
+ * provided location for loading additional configurations
+ *
+ * @param location
+ * @return
+ */
+ public static BusHolder create(URL location)
+ {
+ BusHolder holder = new BusHolder();
+ holder.createBus(location);
+ return holder;
+ }
+
+ /**
+ * Creates a new BusHolder instance using the provided Bus
+ *
+ * @param bus
+ * @return
+ */
+ public static BusHolder create(Bus bus)
+ {
+ BusHolder holder = new BusHolder();
+ holder.setBus(bus);
+ holder.setContext(bus.getExtension(BusApplicationContext.class));
+ return holder;
+ }
+
+ /**
+ * Update the Bus held by the this instance using the provided parameters.
+ * This basically prepares the bus for being used with JBossWS.
+ *
+ * @param jbossCxfXml The location of the jboss-cxf.xml configuration file
+ * @param soapTransportFactory The SoapTransportFactory to configure, if any
+ * @param resolver The ResourceResolver to configure, if any
+ * @param configurer The JBossWSCXFConfigurer to install in the bus, if any
+ * @throws IOException Throws IOException if the jboss-cxf.xml file can't be read
+ */
+ public void configure(URL jbossCxfXml, SoapTransportFactory soapTransportFactory, ResourceResolver resolver, JBossWSCXFConfigurer configurer) throws IOException
+ {
+ if (configured)
+ {
+ throw new IllegalStateException("Underlying bus is already configured for JBossWS use!");
+ }
+ if (configurer != null)
+ {
+ bus.setExtension(configurer, Configurer.class);
+ }
+ setSoapTransportFactory(bus, soapTransportFactory);
+ setResourceResolver(bus, resolver);
+ if (jbossCxfXml != null)
+ {
+ additionalCtx.add(loadAdditionalConfig(ctx, jbossCxfXml));
+ }
+ configured = true;
+ }
+
+ /**
+ * A convenient method for getting a jbossws cxf configurer delegating to the cxf configurer
+ * that's currently installed in the hold bus.
+ *
+ * @param customization The binding customization to set in the configurer, if any
+ * @param wsdlPublisher The wsdl file publisher to set in the configurer, if any
+ * @return The new jbossws cxf configurer
+ */
+ public JBossWSCXFConfigurer createConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
+ {
+ Configurer delegate = bus.getExtension(Configurer.class);
+ return new JBossWSServerCXFConfigurer(delegate, customization, wsdlPublisher);
+ }
+
+ /**
+ * Performs close operations (currently implies destroying additional contexts)
+ *
+ */
+ public void close()
+ {
+ for (GenericApplicationContext gac : additionalCtx)
+ {
+ gac.destroy();
+ }
+ }
+
+ /**
+ * Creates the Bus using a SpringBusFactory with no specific Spring application context.
+ * Then loads additional configurations from the provided location
+ *
+ * @param location
+ * @return
+ */
+ protected void createBus(URL location)
+ {
+ bus = new SpringBusFactory().createBus();
+ ctx = bus.getExtension(BusApplicationContext.class);
+ //Load additional configurations from cxf-servlet.xml
+ if (location != null)
+ {
+ try
+ {
+ additionalCtx.add(loadAdditionalConfig(ctx, location));
+ }
+ catch (IOException e)
+ {
+ if (log.isTraceEnabled())
+ log.trace("Could not load additional config from location: " + location, e);
+ }
+ }
+ //Force servlet transport to prevent CXF from using Jetty as a transport
+ DestinationFactory factory = new ServletTransportFactory(bus);
+ for (String s : factory.getTransportIds()) {
+ registerTransport(factory, s);
+ }
+ }
+
+ protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
+ {
+ if (resourceResolver != null)
+ {
+ bus.getExtension(ResourceManager.class).addResourceResolver(resourceResolver);
+ }
+ }
+
+ protected static void setSoapTransportFactory(Bus bus, SoapTransportFactory factory)
+ {
+ if (factory != null)
+ {
+ DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
+ factory.setBus(bus);
+ dfm.registerDestinationFactory(Constants.NS_SOAP11, factory);
+ dfm.registerDestinationFactory(Constants.NS_SOAP12, factory);
+ }
+ }
+
+ protected static GenericApplicationContext loadAdditionalConfig(ApplicationContext ctx, URL locationUrl) throws IOException
+ {
+ if (locationUrl == null) throw new IllegalArgumentException("Cannot load additional config from null location!");
+ InputStream is = locationUrl.openStream();
+ GenericApplicationContext childCtx = new GenericApplicationContext(ctx);
+ XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(childCtx);
+ reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
+ reader.loadBeanDefinitions(new InputStreamResource(is));
+ childCtx.refresh();
+ return childCtx;
+ }
+
+ private void registerTransport(DestinationFactory factory, String namespace)
+ {
+ bus.getExtension(DestinationFactoryManager.class).registerDestinationFactory(namespace, factory);
+ }
+
+ /**
+ * Return the hold bus
+ *
+ * @return
+ */
+ public Bus getBus()
+ {
+ return bus;
+ }
+
+ private void setBus(Bus bus)
+ {
+ this.bus = bus;
+ }
+
+ private void setContext(BusApplicationContext ctx)
+ {
+ this.ctx = ctx;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.configuration;
+
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
+import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.stack.cxf.JBossWSServiceFactoryBean;
+import org.jboss.wsf.stack.cxf.WSDLFilePublisher;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+
+/**
+ * A JBossWSCXFConfigured to be used on server side
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 31-Mar-2010
+ */
+public class JBossWSServerCXFConfigurer extends JBossWSCXFConfigurer
+{
+ private WSDLFilePublisher wsdlPublisher;
+
+ public JBossWSServerCXFConfigurer(Configurer delegate)
+ {
+ super(delegate);
+ }
+
+ public JBossWSServerCXFConfigurer(Configurer delegate, BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
+ {
+ super(delegate, customization);
+ this.wsdlPublisher = wsdlPublisher;
+ }
+
+ @Override
+ protected synchronized void configureEndpointFactory(AbstractWSDLBasedEndpointFactory factory)
+ {
+ ReflectionServiceFactoryBean serviceFactory = factory.getServiceFactory();
+ //Configure binding customization
+ if (customization != null)
+ {
+ //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
+ serviceFactory.reset();
+ DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
+ setBindingCustomization(serviceFactoryDataBinding, customization);
+ serviceFactory.setDataBinding(serviceFactoryDataBinding);
+ //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one)
+ if (factory.getDataBinding() == null)
+ {
+ //set the endpoint factory's databinding to prevent CXF resetting everything because user did not provide anything
+ factory.setDataBinding(serviceFactoryDataBinding);
+ }
+ else
+ {
+ setBindingCustomization(factory.getDataBinding(), customization);
+ }
+ }
+ //Configure wsdl file publisher
+ if (wsdlPublisher != null && serviceFactory instanceof JBossWSServiceFactoryBean)
+ {
+ ((JBossWSServiceFactoryBean)serviceFactory).setWsdlPublisher(wsdlPublisher);
+ }
+ //add other configurations here below
+ }
+
+ public void setWsdlPublisher(WSDLFilePublisher wsdlPublisher)
+ {
+ this.wsdlPublisher = wsdlPublisher;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java 2010-03-31 15:55:22 UTC (rev 11910)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java 2010-03-31 16:14:58 UTC (rev 11911)
@@ -37,13 +37,15 @@
private String implementor;
private String invoker;
private boolean mtomEnabled;
+ private String serviceFactory;
- public DDEndpoint(String id, String address, String implementor, boolean mtomEnabled)
+ public DDEndpoint(String id, String address, String implementor, boolean mtomEnabled, String serviceFactory)
{
this.id = id;
this.address = address;
this.implementor = implementor;
this.mtomEnabled = mtomEnabled;
+ this.serviceFactory = serviceFactory;
}
public void setInvoker(String invoker)
@@ -58,6 +60,8 @@
writer.write(" implementor='" + this.implementor + "'");
writer.write(">");
+ writer.write("<jaxws:serviceFactory><bean class='" + this.serviceFactory + "'/></jaxws:serviceFactory>");
+
if (this.mtomEnabled)
{
writer.write("<jaxws:binding>");
@@ -81,6 +85,7 @@
str.append("\n implementor=" + this.implementor);
str.append("\n invoker=" + this.invoker);
str.append("\n mtomEnabled=" + this.mtomEnabled);
+ str.append("\n serviceFactory=" + this.serviceFactory);
return str.toString();
}
}
14 years, 8 months
JBossWS SVN: r11910 - in common/trunk: src/main/java/org/jboss/ws/core/utils and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-31 11:55:22 -0400 (Wed, 31 Mar 2010)
New Revision: 11910
Added:
common/trunk/src/main/java/org/jboss/ws/core/utils/AbstractWSDLFilePublisher.java
Modified:
common/trunk/pom.xml
Log:
[JBWS-2986] Adding AbstractWSDLFilePublisher to common
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2010-03-31 13:57:29 UTC (rev 11909)
+++ common/trunk/pom.xml 2010-03-31 15:55:22 UTC (rev 11910)
@@ -34,6 +34,7 @@
<jboss.web.version>2.1.3.GA</jboss.web.version>
<jbossws.spi.version>1.3.0-SNAPSHOT</jbossws.spi.version>
<junit.version>3.8.2</junit.version>
+ <wsdl4j.version>1.6.2</wsdl4j.version>
</properties>
<!-- Dependencies -->
@@ -92,6 +93,12 @@
<version>${jboss.web.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>${wsdl4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- test dependencies -->
<dependency>
Added: common/trunk/src/main/java/org/jboss/ws/core/utils/AbstractWSDLFilePublisher.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/core/utils/AbstractWSDLFilePublisher.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/ws/core/utils/AbstractWSDLFilePublisher.java 2010-03-31 15:55:22 UTC (rev 11910)
@@ -0,0 +1,244 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Import;
+import javax.wsdl.factory.WSDLFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.IOUtils;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.w3c.dom.Element;
+
+/**
+ * Abstract WSDL file publisher
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Mar-2010
+ *
+ */
+public abstract class AbstractWSDLFilePublisher
+{
+ private static final Logger log = Logger.getLogger(AbstractWSDLFilePublisher.class);
+
+ // The deployment info for the web service archive
+ protected ArchiveDeployment dep;
+ // The expected wsdl location in the deployment
+ protected String expLocation;
+ // The server config
+ protected ServerConfig serverConfig;
+
+ public AbstractWSDLFilePublisher(ArchiveDeployment dep)
+ {
+ this.dep = dep;
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+
+ if (dep.getType().toString().endsWith("JSE"))
+ {
+ expLocation = "WEB-INF/wsdl/";
+ }
+ else
+ {
+ expLocation = "META-INF/wsdl/";
+ }
+ }
+
+ /** Publish the wsdl imports for a given wsdl definition
+ */
+ @SuppressWarnings("unchecked")
+ protected void publishWsdlImports(URL parentURL, Definition parentDefinition, List<String> published) throws Exception
+ {
+ String baseURI = parentURL.toExternalForm();
+
+ Iterator it = parentDefinition.getImports().values().iterator();
+ while (it.hasNext())
+ {
+ for (Import wsdlImport : (List<Import>)it.next())
+ {
+ String locationURI = wsdlImport.getLocationURI();
+ Definition subdef = wsdlImport.getDefinition();
+
+ // its an external import, don't publish locally
+ if (locationURI.startsWith("http://") == false)
+ {
+ // infinity loops prevention
+ if (published.contains(locationURI))
+ {
+ continue;
+ }
+ else
+ {
+ published.add(locationURI);
+ }
+
+ URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
+ File targetFile = new File(targetURL.getPath());
+ targetFile.getParentFile().mkdirs();
+
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
+ FileWriter fw = new FileWriter(targetFile);
+ wsdlWriter.writeWSDL(subdef, fw);
+ fw.close();
+
+ log.debug("WSDL import published to: " + targetURL);
+
+ // recursively publish imports
+ publishWsdlImports(targetURL, subdef, published);
+
+ // Publish XMLSchema imports
+ Element subdoc = DOMUtils.parse(targetURL.openStream());
+ publishSchemaImports(targetURL, subdoc, published);
+ }
+ }
+ }
+ }
+
+ /** Publish the schema imports for a given wsdl definition
+ */
+ protected void publishSchemaImports(URL parentURL, Element element, List<String> published) throws Exception
+ {
+ String baseURI = parentURL.toExternalForm();
+
+ Iterator<Element> it = DOMUtils.getChildElements(element);
+ while (it.hasNext())
+ {
+ Element childElement = (Element)it.next();
+ if ("import".equals(childElement.getLocalName()) || "include".equals(childElement.getLocalName()))
+ {
+ String schemaLocation = childElement.getAttribute("schemaLocation");
+ if (schemaLocation.length() > 0)
+ {
+ if (schemaLocation.startsWith("http://") == false)
+ {
+ // infinity loops prevention
+ if (published.contains(schemaLocation))
+ {
+ continue;
+ }
+ else
+ {
+ published.add(schemaLocation);
+ }
+
+ URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
+ File targetFile = new File(xsdURL.getPath());
+ targetFile.getParentFile().mkdirs();
+
+ String deploymentName = dep.getCanonicalName();
+
+ // get the resource path including the separator
+ int index = baseURI.indexOf(deploymentName) + 1;
+ String resourcePath = baseURI.substring(index + deploymentName.length());
+ //check for sub-directories
+ resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1);
+
+ resourcePath = expLocation + resourcePath + schemaLocation;
+ while (resourcePath.indexOf("//") != -1)
+ {
+ resourcePath = resourcePath.replace("//", "/");
+ }
+ URL resourceURL = dep.getResourceResolver().resolve(resourcePath);
+// URL resourceURL = dep.getMetaDataFileURL(resourcePath);
+ InputStream is = new ResourceURL(resourceURL).openStream();
+ if (is == null)
+ throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
+
+ FileOutputStream fos = null;
+ try
+ {
+ fos = new FileOutputStream(targetFile);
+ IOUtils.copyStream(fos, is);
+ }
+ finally
+ {
+ if (fos != null) fos.close();
+ }
+
+ log.debug("XMLSchema import published to: " + xsdURL);
+
+ // recursively publish imports
+ Element subdoc = DOMUtils.parse(xsdURL.openStream());
+ publishSchemaImports(xsdURL, subdoc, published);
+ }
+ }
+ }
+ else
+ {
+ publishSchemaImports(parentURL, childElement, published);
+ }
+ }
+ }
+
+ /**
+ * Delete the published wsdl
+ */
+ public void unpublishWsdlFiles() throws IOException
+ {
+ String deploymentDir = (dep.getParent() != null ? dep.getParent().getSimpleName() : dep.getSimpleName());
+
+ File serviceDir = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
+ deleteWsdlPublishDirectory(serviceDir);
+ }
+
+ /**
+ * Delete the published wsdl document, traversing down the dir structure
+ */
+ protected void deleteWsdlPublishDirectory(File dir) throws IOException
+ {
+ String[] files = dir.list();
+ for (int i = 0; files != null && i < files.length; i++)
+ {
+ String fileName = files[i];
+ File file = new File(dir + "/" + fileName);
+ if (file.isDirectory())
+ {
+ deleteWsdlPublishDirectory(file);
+ }
+ else
+ {
+ if (file.delete() == false)
+ log.warn("Cannot delete published wsdl document: " + file.toURL());
+ }
+ }
+
+ // delete the directory as well
+ dir.delete();
+ }
+}
Property changes on: common/trunk/src/main/java/org/jboss/ws/core/utils/AbstractWSDLFilePublisher.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 8 months
JBossWS SVN: r11909 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core: server and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-31 09:57:29 -0400 (Wed, 31 Mar 2010)
New Revision: 11909
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
Log:
[JBPAPP-3984]:refactor the previous fix
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31 10:55:29 UTC (rev 11908)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31 13:57:29 UTC (rev 11909)
@@ -288,10 +288,11 @@
{
for (QName qname : epInv.getRequestParamNames())
{
- Object obj = epInv.getRequestParamValue(qname);
- if (obj == null)
+ ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
+ if (paramMetaData.getMode().equals(ParameterMode.IN) && epInv.getRequestParamValue(qname) == null)
{
- throw new WebServiceException("The RPC/Literal Operation [" + opName + "] Parameter can not be null");
+ throw new WebServiceException("The RPC/Literal Operation [" + opMetaData.getQName()
+ + "] parameters can not be null");
}
}
}
@@ -400,22 +401,9 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
- //JBWS-2969: check if the RPC/Lit input/output paramter is null
+ //JBWS-2969: check if the RPC/Lit output paramter is null
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
- {
- if (epInv.getResponseParamNames() != null)
- {
- for (QName qname : epInv.getResponseParamNames())
- {
- Object obj = epInv.getResponsePayLoadParamValue(qname);
- if (obj == null)
- {
- throw new WebServiceException("The RPC/Literal Operation [" + opName
- + "] response parameters can not be null");
- }
- }
- }
-
+ {
if (opMetaData.getReturnParameter() != null && epInv.getReturnValue() == null)
{
throw new WebServiceException("The RPC/Literal Operation [" + opName
@@ -423,7 +411,6 @@
}
}
-
retObj = syncOutputParams(inputParams, epInv);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-31 10:55:29 UTC (rev 11908)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-31 13:57:29 UTC (rev 11909)
@@ -172,17 +172,7 @@
}
return paramValue;
}
-
- public Object getResponsePayLoadParamValue(QName xmlName) throws SOAPException
- {
- if (log.isDebugEnabled())
- log.debug("getResponseParamValue: " + xmlName);
- Object paramValue = resPayload.get(xmlName);
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- return paramValue;
- }
-
+
public void setReturnValue(Object value)
{
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31 10:55:29 UTC (rev 11908)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31 13:57:29 UTC (rev 11909)
@@ -28,6 +28,7 @@
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
import javax.xml.soap.Name;
@@ -64,6 +65,7 @@
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.common.JavaUtils;
import org.jboss.wsf.spi.SPIProvider;
@@ -216,11 +218,12 @@
//JBWS-2969:check if the RPC/Lit input paramter is null
if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
&& opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
- {
+ {
+
for (QName qname : sepInv.getRequestParamNames())
{
- Object obj = sepInv.getRequestParamValue(qname);
- if (obj == null)
+ ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
+ if (paramMetaData.getMode().equals(ParameterMode.IN) && sepInv.getRequestParamValue(qname) == null)
{
throw new WebServiceException("The RPC/Literal Operation [" + opMetaData.getQName()
+ "] parameters can not be null");
14 years, 8 months
JBossWS SVN: r11908 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes: types and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: pmacik(a)redhat.com
Date: 2010-03-31 06:55:29 -0400 (Wed, 31 Mar 2010)
New Revision: 11908
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesTest.java
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3DocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3RPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJODocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJORPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3DocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3RPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedDocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedRPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJODocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJORPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedDocImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedRPCImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeRPCTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringDocTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringRPCTest.java
Log:
[JBWS-2984] Calendar (day+1) issue fixed, tests refactored
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3DocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3DocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3DocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,16 +26,16 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesEJB3DocTest implements BenchmarkTest
+public abstract class DataTypesEJB3DocTest extends DataTypesTest
{
- protected String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3DocImpl";
+ protected String endpointURL = "http://" + Runner.getServerAddress()
+ + "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3DocImpl";
protected String targetNS = "http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3RPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3RPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3RPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,16 +26,16 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesEJB3RPCTest implements BenchmarkTest
+public abstract class DataTypesEJB3RPCTest extends DataTypesTest
{
- protected String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3RPCImpl";
+ protected String endpointURL = "http://" + Runner.getServerAddress()
+ + "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3RPCImpl";
protected String targetNS = "http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,14 +26,13 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public abstract class DataTypesEJB3WrappedDocTest extends DataTypesTest
{
protected String endpointURL = "http://" + Runner.getServerAddress()
+ "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3WrappedDocImpl";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesEJB3WrappedRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,14 +26,13 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public abstract class DataTypesEJB3WrappedRPCTest extends DataTypesTest
{
protected String endpointURL = "http://" + Runner.getServerAddress()
+ "/jaxws-benchmark-datatypes-ejb3/EndpointEJB3WrappedRPCImpl";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJODocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJODocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJODocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,16 +26,16 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesPOJODocTest implements BenchmarkTest
+public abstract class DataTypesPOJODocTest extends DataTypesTest
{
- protected String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-datatypes-pojo/EndpointPOJODocImpl";
+ protected String endpointURL = "http://" + Runner.getServerAddress()
+ + "/jaxws-benchmark-datatypes-pojo/EndpointPOJODocImpl";
protected String targetNS = "http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJORPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJORPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJORPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,16 +26,16 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesPOJORPCTest implements BenchmarkTest
+public abstract class DataTypesPOJORPCTest extends DataTypesTest
{
- protected String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-datatypes-pojo/EndpointPOJORPCImpl";
+ protected String endpointURL = "http://" + Runner.getServerAddress()
+ + "/jaxws-benchmark-datatypes-pojo/EndpointPOJORPCImpl";
protected String targetNS = "http://datatypes.test.benchmark.jaxws.ws.test.jboss.org/";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,14 +26,13 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public abstract class DataTypesPOJOWrappedDocTest extends DataTypesTest
{
protected String endpointURL = "http://" + Runner.getServerAddress()
+ "/jaxws-benchmark-datatypes-pojo/EndpointPOJOWrappedDocImpl";
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesPOJOWrappedRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -26,14 +26,13 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.Runner;
/**
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public abstract class DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public abstract class DataTypesPOJOWrappedRPCTest extends DataTypesTest
{
protected String endpointURL = "http://" + Runner.getServerAddress()
+ "/jaxws-benchmark-datatypes-pojo/EndpointPOJOWrappedRPCImpl";
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesTest.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/DataTypesTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -0,0 +1,152 @@
+package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.List;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+
+import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
+import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
+
+public abstract class DataTypesTest implements BenchmarkTest
+{
+
+ protected static final XMLGregorianCalendar testedCalendar;
+
+ protected static final XMLGregorianCalendar expectedCalendar;
+
+ protected static final String testedString = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </Ord!
erLine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Pr!
oduct pr
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Pro!
duct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n !
<Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \!
"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old !
Virgin \"\n price=\"29.98\" />\n </OrderLi!
ne>\n
<Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
+
+ protected static final String expectedString = "Hello World Greeting for '" + testedString + "' today";
+
+ protected static final boolean testedBoolean = true;
+
+ protected static final boolean expectedBoolean = !testedBoolean;
+
+ protected static final byte testedByte = (byte) 63;
+
+ protected static final byte expectedByte = testedByte + 1;
+
+ protected static final byte[] testedByteArray = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
+ .getBytes();
+
+ protected static final byte[] expectedByteArray;
+
+ protected static final short testedShort = (short) 25;
+
+ protected static final short expectedShort = testedShort + 1;
+
+ protected static final int testedInt = 4567;
+
+ protected static final int expectedInt = testedInt + 1;
+
+ protected static final long testedLong = 1234567890L;
+
+ protected static final long expectedLong = testedLong + 1L;
+
+ protected static final float testedFloat = 6.7f;
+
+ protected static final float expectedFloat = testedFloat + 1.0f;
+
+ protected static final double testedDouble = 8.9;
+
+ protected static final double expectedDouble = testedDouble + 1.0f;
+
+ protected static final QName testedQName = new QName("qname_value");
+
+ protected static final QName expectedQName = new QName("qname_value_modified");
+
+ protected static final ComplexType testedComplexType, expectedComplexType, expectedReturnedComplexType;
+
+ protected static final String expectedValuesString;
+
+ protected static final List<String> testedStringList;
+
+ protected static final List<String> expectedStringList;
+
+ protected static final Date testedDate = new Date(1234567890L);
+
+ protected static final Date expectedDate = new Date(testedDate.getTime() + 86400000L);
+
+ static
+ {
+ DatatypeFactory dtFactory = null;
+ GregorianCalendar calendar = new GregorianCalendar();
+ Duration dayDuration = null;
+ try
+ {
+ dtFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e)
+ {
+
+ e.printStackTrace();
+ }
+ testedCalendar = dtFactory.newXMLGregorianCalendar(calendar);
+
+ dayDuration = dtFactory.newDuration(86400000L);
+ expectedCalendar = (XMLGregorianCalendar) testedCalendar.clone();
+ expectedCalendar.add(dayDuration);
+
+ testedStringList = new ArrayList<String>();
+ for (int i = 0; i < 10; i++)
+ {
+ testedStringList.add("item " + Math.random());
+ }
+ expectedStringList = new ArrayList<String>(testedStringList);
+ Collections.sort(expectedStringList);
+
+ expectedByteArray = new byte[testedByteArray.length];
+ int len = testedByteArray.length;
+ for (int i = 0; i < len; i++)
+ {
+ expectedByteArray[i] = testedByteArray[len - 1 - i];
+ }
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("[byteValue=" + testedByte);
+ sb.append(" byteArrayValue=" + new String(testedByteArray));
+ sb.append(" shortValue=" + testedShort);
+ sb.append(" intValue=" + testedInt);
+ sb.append(" longValue=" + testedLong);
+ sb.append(" floatValue=" + testedFloat);
+ sb.append(" doubleValue=" + testedDouble);
+ sb.append(" stringValue=" + testedString);
+ sb.append(" qNameValue=" + testedQName);
+ sb.append(" dateValue=" + testedDate);
+ sb.append(" calendarValue=" + testedCalendar);
+ sb.append("]");
+ expectedValuesString = sb.toString();
+
+ List<String> valuesStringList = new ArrayList<String>(11);
+ valuesStringList.add(String.valueOf(testedByte));
+ valuesStringList.add(Arrays.toString(testedByteArray));
+ valuesStringList.add(String.valueOf(testedShort));
+ valuesStringList.add(String.valueOf(testedInt));
+ valuesStringList.add(String.valueOf(testedLong));
+ valuesStringList.add(String.valueOf(testedFloat));
+ valuesStringList.add(String.valueOf(testedDouble));
+ valuesStringList.add(testedString);
+ valuesStringList.add(testedQName.toString());
+ valuesStringList.add(testedDate.toString());
+ valuesStringList.add(testedCalendar.toString());
+
+ expectedReturnedComplexType = new ComplexType(testedByte, testedByteArray, testedShort, testedInt, testedLong,
+ testedFloat, testedDouble, testedString, valuesStringList, testedQName, testedDate, testedCalendar);
+
+ testedComplexType = new ComplexType(testedByte, testedByteArray, testedShort, testedInt, testedLong, testedFloat,
+ testedDouble, testedString, testedStringList, testedQName, testedDate, testedCalendar);
+
+ expectedComplexType = new ComplexType(expectedByte, expectedByteArray, expectedShort, expectedInt, expectedLong,
+ expectedFloat, expectedDouble, expectedString, expectedStringList, expectedQName, expectedDate,
+ expectedCalendar);
+ }
+}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3DocImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3DocImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3DocImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,15 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import javax.ejb.Stateless;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -37,8 +39,22 @@
*/
@WebService(serviceName = "EndpointDocService", portName = "EndpointDocPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc")
@Stateless
-public class EndpointEJB3DocImpl
+public class EndpointEJB3DocImpl implements EndpointDoc
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
+
public String sayHello(@WebParam(name = "toWhom") String toWhom)
{
String greeting = "Hello World Greeting for '" + toWhom + "' today";
@@ -60,7 +76,7 @@
return (byte) (value + 1);
}
- public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data) throws IOException
+ public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data)
{
byte[] retVal = new byte[data.length];
for (int i = 0; i < data.length; i++)
@@ -72,7 +88,7 @@
public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar") XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3RPCImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3RPCImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3RPCImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,15 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import javax.ejb.Stateless;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -37,8 +39,21 @@
*/
@WebService(serviceName = "EndpointRPCService", portName = "EndpointRPCPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC")
@Stateless
-public class EndpointEJB3RPCImpl
+public class EndpointEJB3RPCImpl implements EndpointRPC
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
public String sayHello(@WebParam(name = "toWhom") String toWhom)
{
@@ -61,7 +76,7 @@
return (byte) (value + 1);
}
- public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data) throws IOException
+ public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data)
{
byte[] retVal = new byte[data.length];
for (int i = 0; i < data.length; i++)
@@ -73,7 +88,7 @@
public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar") XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedDocImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedDocImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedDocImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,12 +23,16 @@
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -40,8 +44,21 @@
*/
@WebService(serviceName = "EndpointWrappedDocService", portName = "EndpointWrappedDocPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc")
@Stateless
-public class EndpointEJB3WrappedDocImpl
+public class EndpointEJB3WrappedDocImpl implements EndpointDoc
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
private static final List<String> stringList;
@@ -87,7 +104,7 @@
public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
@@ -155,7 +172,18 @@
long longValue, float floatValue, double doubleValue, String stringValue, QName qNameValue, Date dateValue,
XMLGregorianCalendar calendarValue)
{
-
+ List<String> stringList = new ArrayList<String>(11);
+ stringList.add(String.valueOf(byteValue));
+ stringList.add(Arrays.toString(byteArrayValue));
+ stringList.add(String.valueOf(shortValue));
+ stringList.add(String.valueOf(intValue));
+ stringList.add(String.valueOf(longValue));
+ stringList.add(String.valueOf(floatValue));
+ stringList.add(String.valueOf(doubleValue));
+ stringList.add(stringValue);
+ stringList.add(qNameValue.toString());
+ stringList.add(dateValue.toString());
+ stringList.add(calendarValue.toString());
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedRPCImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedRPCImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointEJB3WrappedRPCImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,12 +23,16 @@
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -40,12 +44,25 @@
*/
@WebService(serviceName = "EndpointWrappedRPCService", portName = "EndpointWrappedRPCPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC")
@Stateless
-public class EndpointEJB3WrappedRPCImpl
+public class EndpointEJB3WrappedRPCImpl implements EndpointRPC
{
private static final List<String> stringList;
+ private static Duration dayDuration;
static
{
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
+ static
+ {
stringList = new ArrayList<String>();
for (int i = 0; i < 10; i++)
{
@@ -86,7 +103,7 @@
public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
@@ -154,7 +171,18 @@
long longValue, float floatValue, double doubleValue, String stringValue, QName qNameValue, Date dateValue,
XMLGregorianCalendar calendarValue)
{
-
+ List<String> stringList = new ArrayList<String>(11);
+ stringList.add(String.valueOf(byteValue));
+ stringList.add(Arrays.toString(byteArrayValue));
+ stringList.add(String.valueOf(shortValue));
+ stringList.add(String.valueOf(intValue));
+ stringList.add(String.valueOf(longValue));
+ stringList.add(String.valueOf(floatValue));
+ stringList.add(String.valueOf(doubleValue));
+ stringList.add(stringValue);
+ stringList.add(qNameValue.toString());
+ stringList.add(dateValue.toString());
+ stringList.add(calendarValue.toString());
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJODocImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJODocImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJODocImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,14 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -35,8 +37,21 @@
* @since 09-Mar-2010
*/
@WebService(serviceName = "EndpointDocService", portName = "EndpointDocPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc")
-public class EndpointPOJODocImpl
+public class EndpointPOJODocImpl implements EndpointDoc
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
public String sayHello(@WebParam(name = "toWhom") String toWhom)
{
@@ -59,7 +74,7 @@
return (byte) (value + 1);
}
- public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data) throws IOException
+ public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data)
{
byte[] retVal = new byte[data.length];
for (int i = 0; i < data.length; i++)
@@ -71,7 +86,7 @@
public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar") XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJORPCImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJORPCImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJORPCImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,14 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes;
-import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -35,8 +37,21 @@
* @since 09-Mar-2010
*/
@WebService(serviceName = "EndpointRPCService", portName = "EndpointRPCPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC")
-public class EndpointPOJORPCImpl
+public class EndpointPOJORPCImpl implements EndpointRPC
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
public String sayHello(@WebParam(name = "toWhom") String toWhom)
{
@@ -59,7 +74,7 @@
return (byte) (value + 1);
}
- public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data) throws IOException
+ public byte[] reverseByteOrder(@WebParam(name = "data") byte[] data)
{
byte[] retVal = new byte[data.length];
for (int i = 0; i < data.length; i++)
@@ -71,7 +86,7 @@
public XMLGregorianCalendar getCalendarPlusDay(@WebParam(name = "calendar") XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedDocImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedDocImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedDocImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,12 +23,16 @@
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -40,8 +44,21 @@
*/
@WebService(serviceName = "EndpointWrappedDocService", portName = "EndpointWrappedDocPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc")
@Stateless
-public class EndpointPOJOWrappedDocImpl
+public class EndpointPOJOWrappedDocImpl implements EndpointDoc
{
+ private static Duration dayDuration;
+ static
+ {
+ try
+ {
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
+ }
private static final List<String> stringList;
@@ -87,7 +104,7 @@
public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
@@ -155,7 +172,18 @@
long longValue, float floatValue, double doubleValue, String stringValue, QName qNameValue, Date dateValue,
XMLGregorianCalendar calendarValue)
{
-
+ List<String> stringList = new ArrayList<String>(11);
+ stringList.add(String.valueOf(byteValue));
+ stringList.add(Arrays.toString(byteArrayValue));
+ stringList.add(String.valueOf(shortValue));
+ stringList.add(String.valueOf(intValue));
+ stringList.add(String.valueOf(longValue));
+ stringList.add(String.valueOf(floatValue));
+ stringList.add(String.valueOf(doubleValue));
+ stringList.add(stringValue);
+ stringList.add(qNameValue.toString());
+ stringList.add(dateValue.toString());
+ stringList.add(calendarValue.toString());
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedRPCImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedRPCImpl.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/EndpointPOJOWrappedRPCImpl.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,12 +23,16 @@
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
@@ -40,17 +44,20 @@
*/
@WebService(serviceName = "EndpointWrappedRPCService", portName = "EndpointWrappedRPCPort", endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC")
@Stateless
-public class EndpointPOJOWrappedRPCImpl
+public class EndpointPOJOWrappedRPCImpl implements EndpointRPC
{
- private static final List<String> stringList;
-
+ private static Duration dayDuration;
static
{
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
+ try
{
- stringList.add("item " + i);
+ dayDuration = DatatypeFactory.newInstance().newDuration(86400000L);
}
+ catch (DatatypeConfigurationException e)
+ {
+ dayDuration = null;
+ e.printStackTrace();
+ }
}
public String sayHello(String toWhom)
@@ -86,7 +93,7 @@
public XMLGregorianCalendar getCalendarPlusDay(XMLGregorianCalendar calendar)
{
- calendar.setDay(calendar.getDay() + 1);
+ calendar.add(dayDuration);
return (XMLGregorianCalendar) calendar.clone();
}
@@ -154,7 +161,18 @@
long longValue, float floatValue, double doubleValue, String stringValue, QName qNameValue, Date dateValue,
XMLGregorianCalendar calendarValue)
{
-
+ List<String> stringList = new ArrayList<String>(11);
+ stringList.add(String.valueOf(byteValue));
+ stringList.add(Arrays.toString(byteArrayValue));
+ stringList.add(String.valueOf(shortValue));
+ stringList.add(String.valueOf(intValue));
+ stringList.add(String.valueOf(longValue));
+ stringList.add(String.valueOf(floatValue));
+ stringList.add(String.valueOf(doubleValue));
+ stringList.add(stringValue);
+ stringList.add(qNameValue.toString());
+ stringList.add(dateValue.toString());
+ stringList.add(calendarValue.toString());
return new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
stringValue, stringList, qNameValue, dateValue, calendarValue);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/types/ComplexType.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -35,7 +35,6 @@
*/
public class ComplexType
{
-
private byte byteValue;
private byte[] byteArrayValue;
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class BooleanDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class BooleanDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointDoc) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointDoc) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/BooleanRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class BooleanRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class BooleanRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointRPC) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointRPC) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,20 +28,14 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteArrayDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class ByteArrayDocTest extends DataTypesEJB3DocTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
-
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointDoc) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointDoc) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteArrayRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,20 +28,14 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteArrayRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class ByteArrayRPCTest extends DataTypesEJB3RPCTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
-
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointRPC) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointRPC) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class ByteDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointDoc) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ByteRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class ByteRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointRPC) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -35,39 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class CalendarDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class CalendarDocTest extends DataTypesEJB3DocTest
{
- private static final XMLGregorianCalendar tested;
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointDoc) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointDoc) port).getCalendarPlusDay(testedCalendar);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/CalendarRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import java.util.GregorianCalendar; //import java.util.GregorianCalendar;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -34,40 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class CalendarRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class CalendarRPCTest extends DataTypesEJB3RPCTest
{
- private static final XMLGregorianCalendar tested;
-
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointRPC) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointRPC) port).getCalendarPlusDay(testedCalendar);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DateDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class DateDocTest extends DataTypesEJB3DocTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointDoc) port).getDatePlusDay(tested);
+ Date ret = ((EndpointDoc) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DateRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DateRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class DateRPCTest extends DataTypesEJB3RPCTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointRPC) port).getDatePlusDay(tested);
+ Date ret = ((EndpointRPC) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DoubleDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class DoubleDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointDoc) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointDoc) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/DoubleRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DoubleRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class DoubleRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointRPC) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointRPC) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class FloatDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class FloatDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointDoc) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointDoc) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/FloatRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class FloatRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class FloatRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointRPC) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointRPC) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class IntegerDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class IntegerDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointDoc) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/IntegerRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class IntegerRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class IntegerRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointRPC) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class LongDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class LongDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointDoc) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointDoc) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/LongRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class LongRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class LongRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointRPC) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointRPC) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -31,18 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class QNameDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class QNameDocTest extends DataTypesEJB3DocTest
{
- public static final QName exp = new QName("qname_value_modified");
-
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointDoc) port).modifyQName(new QName("qname_value"));
+ QName ret = ((EndpointDoc) port).modifyQName(testedQName);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/QNameRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -31,16 +30,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class QNameRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class QNameRPCTest extends DataTypesEJB3RPCTest
{
- public static final QName exp = new QName("qname_value_modified");
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointRPC) port).modifyQName(new QName("qname_value"));
- if (!ret.equals(exp))
+ QName ret = ((EndpointRPC) port).modifyQName(testedQName);
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ShortDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class ShortDocTest extends DataTypesEJB3DocTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointDoc) port).increaseShort((short) 123);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointDoc) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/ShortRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ShortRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class ShortRPCTest extends DataTypesEJB3RPCTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointRPC) port).increaseShort((short) 124);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointRPC) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3DocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,17 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class StringDocTest extends DataTypesEJB3DocTest implements BenchmarkTest
+public class StringDocTest extends DataTypesEJB3DocTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointDoc) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointDoc) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/ejb3/StringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3RPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,18 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class StringRPCTest extends DataTypesEJB3RPCTest implements BenchmarkTest
+public class StringRPCTest extends DataTypesEJB3RPCTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointRPC) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointRPC) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class BooleanDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class BooleanDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointDoc) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointDoc) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/BooleanRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class BooleanRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class BooleanRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointRPC) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointRPC) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,20 +28,14 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteArrayDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class ByteArrayDocTest extends DataTypesPOJODocTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
-
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointDoc) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointDoc) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteArrayRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,20 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteArrayRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class ByteArrayRPCTest extends DataTypesPOJORPCTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointRPC) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointRPC) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class ByteDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointDoc) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ByteRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class ByteRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointRPC) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -35,39 +30,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class CalendarDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class CalendarDocTest extends DataTypesPOJODocTest
{
- private static final XMLGregorianCalendar tested;
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointDoc) port).getCalendarPlusDay(tested);
-
- if (!ret.equals(exp))
+ XMLGregorianCalendar ret = ((EndpointDoc) port).getCalendarPlusDay(testedCalendar);
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/CalendarRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import java.util.GregorianCalendar; //import java.util.GregorianCalendar;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -34,40 +30,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class CalendarRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class CalendarRPCTest extends DataTypesPOJORPCTest
{
- private static final XMLGregorianCalendar tested;
-
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointRPC) port).getCalendarPlusDay(tested);
-
- if (!ret.equals(exp))
+ XMLGregorianCalendar ret = ((EndpointRPC) port).getCalendarPlusDay(testedCalendar);
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DateDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class DateDocTest extends DataTypesPOJODocTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointDoc) port).getDatePlusDay(tested);
+ Date ret = ((EndpointDoc) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DateRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -31,19 +30,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DateRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class DateRPCTest extends DataTypesPOJORPCTest
{
- private static final Date tested = new Date(1234567890L);;
-
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointRPC) port).getDatePlusDay(tested);
+ Date ret = ((EndpointRPC) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DoubleDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class DoubleDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointDoc) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointDoc) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/DoubleRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DoubleRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class DoubleRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointRPC) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointRPC) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class FloatDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class FloatDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointDoc) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointDoc) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/FloatRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class FloatRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class FloatRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointRPC) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointRPC) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class IntegerDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class IntegerDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointDoc) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/IntegerRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class IntegerRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class IntegerRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointRPC) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class LongDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class LongDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointDoc) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointDoc) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/LongRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class LongRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class LongRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointRPC) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointRPC) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -31,18 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class QNameDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class QNameDocTest extends DataTypesPOJODocTest
{
- public static final QName exp = new QName("qname_value_modified");
-
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointDoc) port).modifyQName(new QName("qname_value"));
+ QName ret = ((EndpointDoc) port).modifyQName(testedQName);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/QNameRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -31,16 +30,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class QNameRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class QNameRPCTest extends DataTypesPOJORPCTest
{
- public static final QName exp = new QName("qname_value_modified");
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointRPC) port).modifyQName(new QName("qname_value"));
- if (!ret.equals(exp))
+ QName ret = ((EndpointRPC) port).modifyQName(testedQName);
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ShortDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class ShortDocTest extends DataTypesPOJODocTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointDoc) port).increaseShort((short) 123);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointDoc) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/ShortRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ShortRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class ShortRPCTest extends DataTypesPOJORPCTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointRPC) port).increaseShort((short) 124);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointRPC) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJODocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointDoc;
@@ -29,17 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class StringDocTest extends DataTypesPOJODocTest implements BenchmarkTest
+public class StringDocTest extends DataTypesPOJODocTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointDoc) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointDoc) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/unwrapped/pojo/StringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.unwrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJORPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointRPC;
@@ -29,18 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class StringRPCTest extends DataTypesPOJORPCTest implements BenchmarkTest
+public class StringRPCTest extends DataTypesPOJORPCTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointRPC) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointRPC) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class BooleanDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class BooleanDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointWrappedDoc) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointWrappedDoc) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/BooleanRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class BooleanRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class BooleanRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointWrappedRPC) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointWrappedRPC) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,20 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteArrayDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ByteArrayDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointWrappedDoc) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointWrappedDoc) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteArrayRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,20 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteArrayRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ByteArrayRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointWrappedRPC) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointWrappedRPC) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ByteDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedDoc) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ByteRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ByteRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ByteRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedRPC) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.GregorianCalendar;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -34,39 +30,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class CalendarDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class CalendarDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final XMLGregorianCalendar tested;
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(tested);
-
- if (!ret.equals(exp))
+ XMLGregorianCalendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(testedCalendar);
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/CalendarRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -35,40 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class CalendarRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class CalendarRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final XMLGregorianCalendar tested;
-
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(testedCalendar);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,84 +29,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ComplexTypeDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ComplexTypeDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final byte[] modifiedByteArrayValue;
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType tested, exp;
-
- private static final List<String> stringList;
-
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- int length = byteArrayValue.length;
- modifiedByteArrayValue = new byte[length];
- for (int i = 0; i < length; i++)
- {
- modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
-
- exp = new ComplexType((byte) (byteValue + 1), modifiedByteArrayValue, (short) (shortValue + 1), intValue + 1,
- longValue + 1, floatValue + 1, doubleValue + 1, "Hello World Greeting for '" + stringValue + "' today",
- stringList, new QName(qNameValue.getNamespaceURI(), qNameValue.getLocalPart() + "_modified", qNameValue
- .getPrefix()), new Date(dateValue.getTime() + 86400000L), modifiedCalendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedDoc) port).modifyComplexType(tested);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedDoc) port).modifyComplexType(testedComplexType);
+ if (!ret.equals(expectedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ComplexTypeRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,84 +29,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ComplexTypeRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ComplexTypeRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final byte[] modifiedByteArrayValue;
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType tested, exp;
-
- private static final List<String> stringList;
-
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- int length = byteArrayValue.length;
- modifiedByteArrayValue = new byte[length];
- for (int i = 0; i < length; i++)
- {
- modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
-
- exp = new ComplexType((byte) (byteValue + 1), modifiedByteArrayValue, (short) (shortValue + 1), intValue + 1,
- longValue + 1, floatValue + 1, doubleValue + 1, "Hello World Greeting for '" + stringValue + "' today",
- stringList, new QName(qNameValue.getNamespaceURI(), qNameValue.getLocalPart() + "_modified", qNameValue
- .getPrefix()), new Date(dateValue.getTime() + 86400000L), modifiedCalendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedRPC) port).modifyComplexType(tested);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedRPC) port).modifyComplexType(testedComplexType);
+ if (!ret.equals(expectedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DateDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class DateDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointWrappedDoc) port).getDatePlusDay(tested);
+ Date ret = ((EndpointWrappedDoc) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DateRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DateRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class DateRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointWrappedRPC) port).getDatePlusDay(tested);
+ Date ret = ((EndpointWrappedRPC) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DoubleDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class DoubleDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointWrappedDoc) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointWrappedDoc) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/DoubleRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class DoubleRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class DoubleRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointWrappedRPC) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointWrappedRPC) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class FloatDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class FloatDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointWrappedDoc) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointWrappedDoc) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/FloatRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class FloatRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class FloatRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointWrappedRPC) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointWrappedRPC) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class IntegerDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class IntegerDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedDoc) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/IntegerRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class IntegerRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class IntegerRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedRPC) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class LongDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class LongDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointWrappedDoc) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointWrappedDoc) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/LongRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class LongRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class LongRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointWrappedRPC) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointWrappedRPC) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -31,18 +30,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class QNameDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class QNameDocTest extends DataTypesEJB3WrappedDocTest
{
- public static final QName exp = new QName("qname_value_modified");
-
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointWrappedDoc) port).modifyQName(new QName("qname_value"));
+ QName ret = ((EndpointWrappedDoc) port).modifyQName(testedQName);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/QNameRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -31,16 +30,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class QNameRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class QNameRPCTest extends DataTypesEJB3WrappedRPCTest
{
- public static final QName exp = new QName("qname_value_modified");
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointWrappedRPC) port).modifyQName(new QName("qname_value"));
- if (!ret.equals(exp))
+ QName ret = ((EndpointWrappedRPC) port).modifyQName(testedQName);
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ShortDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ShortDocTest extends DataTypesEJB3WrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointWrappedDoc) port).increaseShort((short) 123);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointWrappedDoc) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ShortRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ShortRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ShortRPCTest extends DataTypesEJB3WrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointWrappedRPC) port).increaseShort((short) 124);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointWrappedRPC) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,17 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class StringDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class StringDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedDoc) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedDoc) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/StringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,18 +28,15 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class StringRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class StringRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedRPC) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedRPC) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,66 +29,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ValuesToComplexTypeDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ValuesToComplexTypeDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final ComplexType exp;
-
- private static final List<String> stringList;
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedDoc) port).valuesToComplexType(byteValue, byteArrayValue, shortValue,
- intValue, longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedDoc) port).valuesToComplexType(testedByte, testedByteArray, testedShort,
+ testedInt, testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedReturnedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedReturnedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToComplexTypeRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,69 +29,16 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ValuesToComplexTypeRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ValuesToComplexTypeRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType exp;
-
- private static final List<String> stringList;
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedRPC) port).valuesToComplexType(byteValue, byteArrayValue, shortValue,
- intValue, longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedRPC) port).valuesToComplexType(testedByte, testedByteArray, testedShort,
+ testedInt, testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedReturnedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedReturnedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,15 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -37,73 +28,17 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ValuesToStringDocTest extends DataTypesEJB3WrappedDocTest implements BenchmarkTest
+public class ValuesToStringDocTest extends DataTypesEJB3WrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final String exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- StringBuffer sb = new StringBuffer();
- sb.append("[byteValue=" + byteValue);
- sb.append(" byteArrayValue=" + new String(byteArrayValue));
- sb.append(" shortValue=" + shortValue);
- sb.append(" intValue=" + intValue);
- sb.append(" longValue=" + longValue);
- sb.append(" floatValue=" + floatValue);
- sb.append(" doubleValue=" + doubleValue);
- sb.append(" stringValue=" + stringValue);
- sb.append(" qNameValue=" + qNameValue);
- sb.append(" dateValue=" + dateValue);
- sb.append(" calendarValue=" + calendarValue);
- sb.append("]");
-
- exp = sb.toString();
- }
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedDoc) port).valuesToString(byteValue, byteArrayValue, shortValue, intValue,
- longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedDoc) port).valuesToString(testedByte, testedByteArray, testedShort, testedInt,
+ testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedValuesString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedValuesString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/ejb3/ValuesToStringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,15 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.ejb3;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesEJB3WrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -37,73 +28,17 @@
* @author pmacik(a)redhat.com
* @since 09-Mar-2010
*/
-public class ValuesToStringRPCTest extends DataTypesEJB3WrappedRPCTest implements BenchmarkTest
+public class ValuesToStringRPCTest extends DataTypesEJB3WrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final String exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- StringBuffer sb = new StringBuffer();
- sb.append("[byteValue=" + byteValue);
- sb.append(" byteArrayValue=" + new String(byteArrayValue));
- sb.append(" shortValue=" + shortValue);
- sb.append(" intValue=" + intValue);
- sb.append(" longValue=" + longValue);
- sb.append(" floatValue=" + floatValue);
- sb.append(" doubleValue=" + doubleValue);
- sb.append(" stringValue=" + stringValue);
- sb.append(" qNameValue=" + qNameValue);
- sb.append(" dateValue=" + dateValue);
- sb.append(" calendarValue=" + calendarValue);
- sb.append("]");
-
- exp = sb.toString();
- }
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedRPC) port).valuesToString(byteValue, byteArrayValue, shortValue, intValue,
- longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedRPC) port).valuesToString(testedByte, testedByteArray, testedShort, testedInt,
+ testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedValuesString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedValuesString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class BooleanDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class BooleanDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointWrappedDoc) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointWrappedDoc) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/BooleanRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class BooleanRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class BooleanRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- boolean ret = ((EndpointWrappedRPC) port).negateBoolean(true);
- boolean exp = false;
- if (ret != exp)
+ boolean ret = ((EndpointWrappedRPC) port).negateBoolean(testedBoolean);
+ if (ret != expectedBoolean)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedBoolean);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,20 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteArrayDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ByteArrayDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointWrappedDoc) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointWrappedDoc) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteArrayRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,20 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteArrayRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ByteArrayRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final byte[] tested =
- {1, 2, 4, 8, 16, 32, 64};
- private static final byte[] exp =
- {64, 32, 16, 8, 4, 2, 1};
-
public void performIteration(Object port) throws Exception
{
- byte[] ret = ((EndpointWrappedRPC) port).reverseByteOrder(tested);
+ byte[] ret = ((EndpointWrappedRPC) port).reverseByteOrder(testedByteArray);
for (int i = 0; i < ret.length; i++)
{
- if (ret[i] != exp[i])
+ if (ret[i] != expectedByteArray[i])
{
throw new Exception("Unexpected result: [" + i + "] " + ret);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ByteDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedDoc) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ByteRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ByteRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ByteRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedRPC) port).increaseByte(testedByte);
+ if (ret != expectedByte)
{
- throw new Exception("Unexpected result: " + ret);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedByte);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,12 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.GregorianCalendar;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -34,39 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class CalendarDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class CalendarDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final XMLGregorianCalendar tested;
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointWrappedDoc) port).getCalendarPlusDay(testedCalendar);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/CalendarRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,13 +21,8 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -35,40 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class CalendarRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class CalendarRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final XMLGregorianCalendar tested;
-
- private static final XMLGregorianCalendar exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- tested = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = dtFactory.newXMLGregorianCalendar(calendar);
- exp.setDay(exp.getDay() + 1);
-
- }
-
public void performIteration(Object port) throws Exception
{
- XMLGregorianCalendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(tested);
+ XMLGregorianCalendar ret = ((EndpointWrappedRPC) port).getCalendarPlusDay(testedCalendar);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedCalendar))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedCalendar);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,84 +29,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ComplexTypeDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ComplexTypeDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
-
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final byte[] modifiedByteArrayValue;
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType tested, exp;
-
- private static final List<String> stringList;
-
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- int length = byteArrayValue.length;
- modifiedByteArrayValue = new byte[length];
- for (int i = 0; i < length; i++)
- {
- modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
-
- exp = new ComplexType((byte) (byteValue + 1), modifiedByteArrayValue, (short) (shortValue + 1), intValue + 1,
- longValue + 1, floatValue + 1, doubleValue + 1, "Hello World Greeting for '" + stringValue + "' today",
- stringList, new QName(qNameValue.getNamespaceURI(), qNameValue.getLocalPart() + "_modified", qNameValue
- .getPrefix()), new Date(dateValue.getTime() + 86400000L), modifiedCalendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedDoc) port).modifyComplexType(tested);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedDoc) port).modifyComplexType(testedComplexType);
+ if (!ret.equals(expectedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ComplexTypeRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,84 +29,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ComplexTypeRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ComplexTypeRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final byte[] modifiedByteArrayValue;
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType tested, exp;
-
- private static final List<String> stringList;
-
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- int length = byteArrayValue.length;
- modifiedByteArrayValue = new byte[length];
- for (int i = 0; i < length; i++)
- {
- modifiedByteArrayValue[i] = byteArrayValue[length - i - 1];
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- tested = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
-
- exp = new ComplexType((byte) (byteValue + 1), modifiedByteArrayValue, (short) (shortValue + 1), intValue + 1,
- longValue + 1, floatValue + 1, doubleValue + 1, "Hello World Greeting for '" + stringValue + "' today",
- stringList, new QName(qNameValue.getNamespaceURI(), qNameValue.getLocalPart() + "_modified", qNameValue
- .getPrefix()), new Date(dateValue.getTime() + 86400000L), modifiedCalendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedRPC) port).modifyComplexType(tested);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedRPC) port).modifyComplexType(testedComplexType);
+ if (!ret.equals(expectedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DateDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class DateDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointWrappedDoc) port).getDatePlusDay(tested);
+ Date ret = ((EndpointWrappedDoc) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DateRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import java.util.Date;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -31,19 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DateRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class DateRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final Date tested = new Date(1234567890L);;
- private static final Date exp = new Date(tested.getTime() + 86400000L);;
-
public void performIteration(Object port) throws Exception
{
- Date ret = ((EndpointWrappedRPC) port).getDatePlusDay(tested);
+ Date ret = ((EndpointWrappedRPC) port).getDatePlusDay(testedDate);
- if (!ret.equals(exp))
+ if (!ret.equals(expectedDate))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDate);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DoubleDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class DoubleDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointWrappedDoc) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointWrappedDoc) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/DoubleRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class DoubleRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class DoubleRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- double ret = ((EndpointWrappedRPC) port).increaseDouble(123456.0);
- double exp = 123457.0;
- if (ret != exp)
+ double ret = ((EndpointWrappedRPC) port).increaseDouble(testedDouble);
+ if (ret != expectedDouble)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedDouble);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class FloatDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class FloatDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointWrappedDoc) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointWrappedDoc) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/FloatRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class FloatRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class FloatRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- float ret = ((EndpointWrappedRPC) port).increaseFloat(123456f);
- float exp = 123457f;
- if (ret != exp)
+ float ret = ((EndpointWrappedRPC) port).increaseFloat(testedFloat);
+ if (ret != expectedFloat)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedFloat);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class IntegerDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class IntegerDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedDoc) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedDoc) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/IntegerRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class IntegerRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class IntegerRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- int ret = ((EndpointWrappedRPC) port).increaseInt(123456);
- int exp = 123457;
- if (ret != exp)
+ int ret = ((EndpointWrappedRPC) port).increaseInt(testedInt);
+ if (ret != expectedInt)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedInt);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class LongDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class LongDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointWrappedDoc) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointWrappedDoc) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/LongRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class LongRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class LongRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- long ret = ((EndpointWrappedRPC) port).increaseLong(1234567890L);
- long exp = 1234567891L;
- if (ret != exp)
+ long ret = ((EndpointWrappedRPC) port).increaseLong(testedLong);
+ if (ret != expectedLong)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedLong);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -31,18 +30,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class QNameDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class QNameDocTest extends DataTypesPOJOWrappedDocTest
{
- public static final QName exp = new QName("qname_value_modified");
-
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointWrappedDoc) port).modifyQName(new QName("qname_value"));
-
- if (!ret.equals(exp))
+ QName ret = ((EndpointWrappedDoc) port).modifyQName(testedQName);
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/QNameRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -23,7 +23,6 @@
import javax.xml.namespace.QName;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -31,16 +30,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class QNameRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class QNameRPCTest extends DataTypesPOJOWrappedRPCTest
{
public static final QName exp = new QName("qname_value_modified");
public void performIteration(Object port) throws Exception
{
- QName ret = ((EndpointWrappedRPC) port).modifyQName(new QName("qname_value"));
- if (!ret.equals(exp))
+ QName ret = ((EndpointWrappedRPC) port).modifyQName(testedQName);
+ if (!ret.equals(expectedQName))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedQName);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ShortDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ShortDocTest extends DataTypesPOJOWrappedDocTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointWrappedDoc) port).increaseShort((short) 123);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointWrappedDoc) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ShortRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,16 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ShortRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ShortRPCTest extends DataTypesPOJOWrappedRPCTest
{
public void performIteration(Object port) throws Exception
{
- short ret = ((EndpointWrappedRPC) port).increaseShort((short) 124);
- short exp = 124;
- if (ret != exp)
+ short ret = ((EndpointWrappedRPC) port).increaseShort(testedShort);
+ if (ret != expectedShort)
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedShort);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -29,17 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class StringDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class StringDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedDoc) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedDoc) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/StringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -29,18 +28,15 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class StringRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class StringRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final String MESSAGE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>!
\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <Ord!
erLine position=\"11\" quantity=\"1\">\n <Product p!
roductId
=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"16\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"17\" quantity=\"1\">\n <Product pr!
oductId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"18\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"19\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"20\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"21\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"22\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"23\" quantity=\"1\">\n <Pr!
oduct productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"24\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"25\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"26\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"27\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"28\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"29\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n !
price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"30\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"31\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"32\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"33\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"34\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"35\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin !
\"\n price=\"29.98\" />\n </OrderLine>\n !
<Mem
o>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedRPC) port).sayHello(MESSAGE);
- String exp = "Hello World Greeting for '" + MESSAGE + "' today";
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedRPC) port).sayHello(testedString);
+ if (!ret.equals(expectedString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedString);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,66 +29,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ValuesToComplexTypeDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ValuesToComplexTypeDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final ComplexType exp;
-
- private static final List<String> stringList;
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedDoc) port).valuesToComplexType(byteValue, byteArrayValue, shortValue,
- intValue, longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedDoc) port).valuesToComplexType(testedByte, testedByteArray, testedShort,
+ testedInt, testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedReturnedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedReturnedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToComplexTypeRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,17 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.types.ComplexType;
@@ -40,69 +29,16 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ValuesToComplexTypeRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ValuesToComplexTypeRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue, modifiedCalendarValue;
-
- private static final ComplexType exp;
-
- private static final List<String> stringList;
- static
- {
- stringList = new ArrayList<String>();
- for (int i = 0; i < 10; i++)
- {
- stringList.add("item " + i);
- }
-
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- modifiedCalendarValue = dtFactory.newXMLGregorianCalendar(calendar);
- modifiedCalendarValue.setDay(modifiedCalendarValue.getDay() + 1);
-
- exp = new ComplexType(byteValue, byteArrayValue, shortValue, intValue, longValue, floatValue, doubleValue,
- stringValue, stringList, qNameValue, dateValue, calendarValue);
- }
-
public void performIteration(Object port) throws Exception
{
- ComplexType ret = ((EndpointWrappedRPC) port).valuesToComplexType(byteValue, byteArrayValue, shortValue,
- intValue, longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ ComplexType ret = ((EndpointWrappedRPC) port).valuesToComplexType(testedByte, testedByteArray, testedShort,
+ testedInt, testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedReturnedComplexType))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedReturnedComplexType);
}
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringDocTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringDocTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringDocTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,15 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedDocTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedDoc;
@@ -37,73 +28,18 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ValuesToStringDocTest extends DataTypesPOJOWrappedDocTest implements BenchmarkTest
+public class ValuesToStringDocTest extends DataTypesPOJOWrappedDocTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final String exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- StringBuffer sb = new StringBuffer();
- sb.append("[byteValue=" + byteValue);
- sb.append(" byteArrayValue=" + new String(byteArrayValue));
- sb.append(" shortValue=" + shortValue);
- sb.append(" intValue=" + intValue);
- sb.append(" longValue=" + longValue);
- sb.append(" floatValue=" + floatValue);
- sb.append(" doubleValue=" + doubleValue);
- sb.append(" stringValue=" + stringValue);
- sb.append(" qNameValue=" + qNameValue);
- sb.append(" dateValue=" + dateValue);
- sb.append(" calendarValue=" + calendarValue);
- sb.append("]");
-
- exp = sb.toString();
- }
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedDoc) port).valuesToString(byteValue, byteArrayValue, shortValue, intValue,
- longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedDoc) port).valuesToString(testedByte, testedByteArray, testedShort, testedInt,
+ testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedValuesString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedValuesString);
}
+
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringRPCTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringRPCTest.java 2010-03-31 09:09:06 UTC (rev 11907)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/datatypes/wrapped/pojo/ValuesToStringRPCTest.java 2010-03-31 10:55:29 UTC (rev 11908)
@@ -21,15 +21,6 @@
*/
package org.jboss.test.ws.jaxws.benchmark.test.datatypes.wrapped.pojo;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-
-import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.DataTypesPOJOWrappedRPCTest;
import org.jboss.test.ws.jaxws.benchmark.test.datatypes.EndpointWrappedRPC;
@@ -37,73 +28,17 @@
* @author pmacik(a)redhat.com
* @since 25-Mar-2010
*/
-public class ValuesToStringRPCTest extends DataTypesPOJOWrappedRPCTest implements BenchmarkTest
+public class ValuesToStringRPCTest extends DataTypesPOJOWrappedRPCTest
{
- private static final String stringValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Order orderId=\"1\" orderDate=\"Wed Nov 15 13:45:28 EST 2006\"\n statusCode=\"9\" netAmount=\"59.97\" totalAmount=\"64.92\" tax=\"4.95\">\n <Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\"\n state=\"SD\" />\n <OrderLines>\n <OrderLine position=\"1\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"2\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"3\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"4\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderL!
ine>\n <OrderLine position=\"5\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"6\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"7\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"8\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"9\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"10\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n !
<OrderLine position=\"11\" quantity=\"1\">\n <Produ!
ct produ
ctId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"12\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"13\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n </OrderLine>\n <OrderLine position=\"14\" quantity=\"1\">\n <Product productId=\"299\" title=\"Pulp Fiction\" price=\"29.99\" />\n </OrderLine>\n <OrderLine position=\"15\" quantity=\"1\">\n <Product productId=\"364\" title=\"The 40-Year-Old Virgin \"\n price=\"29.98\" />\n <Memo>\n abcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pahoda,kterou_sni_pan_Lahodaabcdefghijklmn!
opqrstuvwxyz0123456789!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sni_pan_Lahoda\n </Memo>\n </OrderLines>\n</Order>\n";
- private static final byte byteValue = (byte) 1;
-
- private static final byte[] byteArrayValue = "!@#$%^°*()_+-=[]{}:\",.?/`~Pada,pada_jahoda,kterou_sěščřžýáíégggaabcdefghijklmnopqrstuvwxyz0123456789"
- .getBytes();
-
- private static final short shortValue = (short) 3;
-
- private static final int intValue = 4;
-
- private static final long longValue = 5L;
-
- private static final float floatValue = 6.7f;
-
- private static final double doubleValue = 8.9;
-
- private static final QName qNameValue = new QName("eleven");
-
- private static final Date dateValue = new Date();
-
- private static final XMLGregorianCalendar calendarValue;
-
- private static final String exp;
-
- static
- {
- DatatypeFactory dtFactory = null;
- GregorianCalendar calendar = new GregorianCalendar();;
- try
- {
- dtFactory = DatatypeFactory.newInstance();
- }
- catch (DatatypeConfigurationException e)
- {
-
- e.printStackTrace();
- }
- calendarValue = dtFactory.newXMLGregorianCalendar(calendar);
-
- StringBuffer sb = new StringBuffer();
- sb.append("[byteValue=" + byteValue);
- sb.append(" byteArrayValue=" + new String(byteArrayValue));
- sb.append(" shortValue=" + shortValue);
- sb.append(" intValue=" + intValue);
- sb.append(" longValue=" + longValue);
- sb.append(" floatValue=" + floatValue);
- sb.append(" doubleValue=" + doubleValue);
- sb.append(" stringValue=" + stringValue);
- sb.append(" qNameValue=" + qNameValue);
- sb.append(" dateValue=" + dateValue);
- sb.append(" calendarValue=" + calendarValue);
- sb.append("]");
-
- exp = sb.toString();
- }
-
public void performIteration(Object port) throws Exception
{
- String ret = ((EndpointWrappedRPC) port).valuesToString(byteValue, byteArrayValue, shortValue, intValue,
- longValue, floatValue, doubleValue, stringValue, qNameValue, dateValue, calendarValue);
- if (!exp.equals(ret))
+ String ret = ((EndpointWrappedRPC) port).valuesToString(testedByte, testedByteArray, testedShort, testedInt,
+ testedLong, testedFloat, testedDouble, testedString, testedQName, testedDate, testedCalendar);
+ if (!ret.equals(expectedValuesString))
{
- throw new Exception("Unexpected result: " + ret + "\nExpected:" + exp);
+ throw new Exception("Unexpected result: " + ret + "\nExpected:" + expectedValuesString);
}
}
}
14 years, 8 months
JBossWS SVN: r11907 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/server and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-31 05:09:06 -0400 (Wed, 31 Mar 2010)
New Revision: 11907
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
Log:
[JBPAPP-3408]:check if RPC/Lit return value in client side
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31 06:45:05 UTC (rev 11906)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31 09:09:06 UTC (rev 11907)
@@ -400,7 +400,7 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
- //JBWS-2969: check if the rpc/lit input paramter is null
+ //JBWS-2969: check if the RPC/Lit input/output paramter is null
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
{
if (epInv.getResponseParamNames() != null)
@@ -415,7 +415,15 @@
}
}
}
- }
+
+ if (opMetaData.getReturnParameter() != null && epInv.getReturnValue() == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName
+ + "] return value can not be null");
+ }
+ }
+
+
retObj = syncOutputParams(inputParams, epInv);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31 06:45:05 UTC (rev 11906)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31 09:09:06 UTC (rev 11907)
@@ -213,7 +213,7 @@
reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- //JBWS-2969:check if the rpc/lit input paramter is null
+ //JBWS-2969:check if the RPC/Lit input paramter is null
if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
&& opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2010-03-31 06:45:05 UTC (rev 11906)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2010-03-31 09:09:06 UTC (rev 11907)
@@ -48,11 +48,22 @@
}
public void testSync() throws Exception
- {
+ {
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/dar?wsdl");
AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
Date start = new Date();
- client.run(false);
+ try
+ {
+ client.run(true);
+ }
+ catch (Exception e)
+ {
+ if (e.getMessage().indexOf("return value can not be null") == -1)
+ {
+ throw e ;
+ }
+ // do nothing, ingore the expected WebServiceException, See JBWS2969
+ }
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
@@ -62,7 +73,18 @@
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/dar?wsdl");
AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
Date start = new Date();
- client.run(true);
+ try
+ {
+ client.run(true);
+ }
+ catch (Exception e)
+ {
+ if (e.getMessage().indexOf("return value can not be null") == -1)
+ {
+ throw e ;
+ }
+ //do nothing, ingore the expected WebServiceException, See JBWS2969
+ }
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
14 years, 8 months
JBossWS SVN: r11906 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/server and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-31 02:45:05 -0400 (Wed, 31 Mar 2010)
New Revision: 11906
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java
Log:
[JBPAPP-3984]:Check if the RPC/Lit parameter is null
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-30 16:25:37 UTC (rev 11905)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-31 06:45:05 UTC (rev 11906)
@@ -38,6 +38,7 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.handler.MessageContext;
@@ -255,10 +256,8 @@
{
if (opName.equals(operationName) == false)
setOperationName(opName);
-
OperationMetaData opMetaData = getOperationMetaData();
boolean oneway = forceOneway || opMetaData.isOneWay();
-
// Associate a message context with the current thread
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setOperationMetaData(opMetaData);
@@ -284,6 +283,19 @@
epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
+ if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
+ && epInv.getRequestParamNames() != null)
+ {
+ for (QName qname : epInv.getRequestParamNames())
+ {
+ Object obj = epInv.getRequestParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName + "] Parameter can not be null");
+ }
+ }
+ }
+
// Set the required outbound properties
setOutboundContextProperties();
@@ -388,6 +400,22 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
+ //JBWS-2969: check if the rpc/lit input paramter is null
+ if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
+ {
+ if (epInv.getResponseParamNames() != null)
+ {
+ for (QName qname : epInv.getResponseParamNames())
+ {
+ Object obj = epInv.getResponsePayLoadParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName
+ + "] response parameters can not be null");
+ }
+ }
+ }
+ }
retObj = syncOutputParams(inputParams, epInv);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-30 16:25:37 UTC (rev 11905)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-31 06:45:05 UTC (rev 11906)
@@ -172,6 +172,16 @@
}
return paramValue;
}
+
+ public Object getResponsePayLoadParamValue(QName xmlName) throws SOAPException
+ {
+ if (log.isDebugEnabled())
+ log.debug("getResponseParamValue: " + xmlName);
+ Object paramValue = resPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ return paramValue;
+ }
public void setReturnValue(Object value)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-30 16:25:37 UTC (rev 11905)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-31 06:45:05 UTC (rev 11906)
@@ -35,6 +35,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
@@ -75,6 +76,7 @@
import org.jboss.wsf.spi.invocation.InvocationType;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/** An implementation handles invocations on the endpoint
*
@@ -211,7 +213,21 @@
reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
-
+ //JBWS-2969:check if the rpc/lit input paramter is null
+ if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
+ && opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
+ {
+ for (QName qname : sepInv.getRequestParamNames())
+ {
+ Object obj = sepInv.getRequestParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opMetaData.getQName()
+ + "] parameters can not be null");
+ }
+ }
+ }
+
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
@@ -219,6 +235,7 @@
try
{
invHandler.invoke(endpoint, inv);
+
}
catch (InvocationTargetException th)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java 2010-03-30 16:25:37 UTC (rev 11905)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.java 2010-03-31 06:45:05 UTC (rev 11906)
@@ -151,11 +151,12 @@
assertEquals(intArr, jbel.getValue());
}
- public void testEchoNullArray() throws Exception
+ //Comment out this test , it is BP-2211 violation, see JBWS-2969
+ /*public void testEchoNullArray() throws Exception
{
Integer[] outArr = endpoint.intArr("null", null);
assertNull(outArr);
- }
+ }*/
public void testEchoEmptyArray() throws Exception
{
14 years, 8 months
JBossWS SVN: r11905 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-30 12:25:37 -0400 (Tue, 30 Mar 2010)
New Revision: 11905
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
Log:
[JBWS-2981]:Add <wsa:MessageID>
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-03-30 14:27:02 UTC (rev 11904)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-03-30 16:25:37 UTC (rev 11905)
@@ -22,6 +22,7 @@
package org.jboss.ws.extensions.addressing.jaxws;
import org.jboss.logging.Logger;
+import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
@@ -122,6 +123,13 @@
}
}
+ //Add optional messageID
+ if (addrProps.getMessageID() == null)
+ {
+ addrProps.setMessageID(AddressingClientUtil.createMessageID());
+ }
+
+
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
addrProps.writeHeaders(soapMessage);
14 years, 8 months