[jbossws-commits] JBossWS SVN: r3622 - in tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws: jbws1665 and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Jun 18 23:22:39 EDT 2007


Author: david.boeren
Date: 2007-06-18 23:22:39 -0400 (Mon, 18 Jun 2007)
New Revision: 3622

Added:
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java
   tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceInterface.java
Log:
Adding test case skeleton for JBWS-1665

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/CoordinateData.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,9 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class CoordinateData implements Serializable {
+  public BigDecimal latitude;
+  public BigDecimal longitude;
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * incorrect wsdl generation
+ * 
+ * http://jira.jboss.org/jira/browse/JBWS-1665
+ */
+public class JBWS1665TestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1655/TrackingService";
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(JBWS1665TestCase.class, "jaxws-jbws1665.jar");
+   }
+
+   public void testWebService() throws Exception
+   {
+      assertWSDLAccess();
+
+      // Need to validate the WSDL is property populated.  Several fields such as
+      // element names are being left blank.  This is related to case 16130.  The
+      // entire generated wsdl is attached to the case.
+
+      /*
+      QName serviceName = new QName("http://org.jboss.ws/jbws1665", "EJB3BeanService");
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      Service service = Service.create(wsdlURL, serviceName);
+      TrackingServiceInterface port = (TrackingServiceInterface)service.getPort(TrackingServiceInterface.class);
+      */
+   }
+
+   private void assertWSDLAccess() throws MalformedURLException
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+      assertNotNull(wsdlDefinitions);
+   }
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/PropertyData.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,24 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.io.Serializable;
+
+public class PropertyData implements Serializable {
+   private String key;
+   private String value;
+
+   public String getKey() {
+      return key;
+   }
+
+   public void setKey(String key) {
+      this.key = key;
+   }
+
+   public String getValue() {
+      return value;
+   }
+
+   public void setValue(String value) {
+      this.value = value;
+   }
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TraceData.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,90 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.io.Serializable;
+import java.util.Calendar;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TraceData", propOrder = { "type", "source", "time",
+      "coordinate", "mileage", "heading", "speed", "property" })
+public class TraceData implements Serializable {
+   @XmlElement(required=true)
+   private short type;
+   @XmlElement(required=true)
+   private String source;
+   @XmlElement(required=true)
+   private Calendar time;
+   private CoordinateData coordinate;
+   private Integer mileage;
+   private Short heading;
+   private Short speed;
+   private PropertyData[] property;
+   
+   public CoordinateData getCoordinate() {
+      return coordinate;
+   }
+
+   public void setCoordinate(CoordinateData coordinate) {
+      this.coordinate = coordinate;
+   }
+
+   public Short getHeading() {
+      return heading;
+   }
+
+   public void setHeading(Short heading) {
+      this.heading = heading;
+   }
+
+   public Integer getMileage() {
+      return mileage;
+   }
+
+   public void setMileage(Integer mileage) {
+      this.mileage = mileage;
+   }
+
+   public String getSource() {
+      return source;
+   }
+
+   public void setSource(String source) {
+      this.source = source;
+   }
+
+   public Short getSpeed() {
+      return speed;
+   }
+
+   public void setSpeed(Short speed) {
+      this.speed = speed;
+   }
+
+   public Calendar getTime() {
+      return time;
+   }
+
+   public void setTime(Calendar time) {
+      this.time = time;
+   }
+
+   public short getType() {
+      return type;
+   }
+
+   public void setType(short type) {
+      this.type = type;
+   }
+   
+   public void setProperty(PropertyData[] property) {
+      this.property = property;
+   }
+
+   public PropertyData[] getProperty() {
+      return property;
+   }
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TracePollData.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,42 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TracePollData", propOrder = { "traces", "mark", "more" })
+public class TracePollData implements Serializable {
+   @XmlElement(required=true,nillable=true)
+   protected TraceData[] traces;
+   @XmlElement(required = true, nillable = true)
+   protected String mark;
+   protected boolean more;
+
+   public String getMark() {
+      return mark;
+   }
+
+   public void setMark(String mark) {
+      this.mark = mark;
+   }
+
+   public boolean isMore() {
+      return more;
+   }
+
+   public void setMore(boolean more) {
+      this.more = more;
+   }
+   
+   public void setTraces(TraceData[] traces) {
+      this.traces = traces;
+   }
+
+   public TraceData[] getTraces() {
+      return traces;
+   }
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,38 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+import java.rmi.RemoteException;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.ejb.FinderException;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at Stateless
+ at WebService(name = "TrackingService", targetNamespace = "http://fleetworks.acunia.com/fleet/service")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class TrackingServiceBean implements TrackingServiceInterface {  
+  @WebMethod
+  public TracePollData pollTraces(
+     @WebParam(name="customer") String customer, 
+     @WebParam(name="mark") String mark) throws NullPointerException
+  {
+     return null;
+  }
+  
+  @WebMethod
+  public void requestTrace(
+     @WebParam(name="customer") String customer, 
+     @WebParam(name="terminals") String[] terminals) 
+  throws NullPointerException
+  {
+  }
+}

Added: tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceInterface.java
===================================================================
--- tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceInterface.java	                        (rev 0)
+++ tags/jbossws-1.2.1.GA/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1665/TrackingServiceInterface.java	2007-06-19 03:22:39 UTC (rev 3622)
@@ -0,0 +1,7 @@
+package org.jboss.test.ws.jaxws.jbws1665;
+
+public interface TrackingServiceInterface {
+  public TracePollData pollTraces(String customer, String mark) throws NullPointerException;
+  
+  public void requestTrace(String customer, String[] terminals) throws NullPointerException;
+}




More information about the jbossws-commits mailing list