You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/10 08:03:55 UTC

svn commit: r169421 [2/2] - in /incubator/beehive/trunk/system-controls/test/src/webservice: ./ schemas/ servers/ servers/local/ servers/local/org/ servers/local/org/controlhaus/ servers/local/org/controlhaus/webservice/ servers/local/org/controlhaus/webservice/testmodel/ servers/local/org/controlhaus/webservice/testmodel/server/ servers/webapp/ servers/webapp/WEB-INF/ servers/webapp/WEB-INF/src/ servers/webapp/WEB-INF/src/org/ servers/webapp/WEB-INF/src/org/apache/ servers/webapp/WEB-INF/src/org/apache/beehive/ servers/webapp/WEB-INF/src/org/apache/beehive/sample/ servers/webapp/WEB-INF/src/org/controlhaus/ servers/webapp/WEB-INF/src/web/ tests/ tests/org/ tests/org/controlhaus/ tests/org/controlhaus/controlunit/ tests/org/controlhaus/utils/ tests/org/controlhaus/webservice/ tests/org/controlhaus/webservice/framework/ tests/org/controlhaus/webservice/testmodel/ tests/org/controlhaus/webservice/testmodel/client/

Added: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/happyaxis.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/happyaxis.jsp?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/happyaxis.jsp (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/happyaxis.jsp Mon May  9 23:03:53 2005
@@ -0,0 +1,488 @@
+<html>
+<%@ page import="java.io.InputStream,
+                 java.io.IOException,
+                 javax.xml.parsers.SAXParser,
+                 javax.xml.parsers.SAXParserFactory"
+   session="false" %>
+ <%
+    /*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<head>
+<title>Axis Happiness Page</title>
+</head>
+<body bgcolor='#ffffff'>
+<%!
+
+    /*
+     * Happiness tests for axis. These look at the classpath and warn if things
+     * are missing. Normally addng this much code in a JSP page is mad
+     * but here we want to validate JSP compilation too, and have a drop-in
+     * page for easy re-use
+     * @author Steve 'configuration problems' Loughran
+     * @author dims
+     * @author Brian Ewins
+     */
+
+
+    /**
+     * Get a string providing install information.
+     * TODO: make this platform aware and give specific hints
+     */
+    public String getInstallHints(HttpServletRequest request) {
+
+        String hint=
+            "<B><I>Note:</I></B> On Tomcat 4.x and Java1.4, you may need to put libraries that contain "
+            +"java.* or javax.* packages into CATALINA_HOME/common/lib"
+            +"<br>jaxrpc.jar and saaj.jar are two such libraries.";
+        return hint;
+    }
+
+    /**
+     * test for a class existing
+     * @param classname
+     * @return class iff present
+     */
+    Class classExists(String classname) {
+        try {
+            return Class.forName(classname);
+        } catch (ClassNotFoundException e) {
+            return null;
+        }
+    }
+
+    /**
+     * test for resource on the classpath
+     * @param resource
+     * @return true iff present
+     */
+    boolean resourceExists(String resource) {
+        boolean found;
+        InputStream instream=this.getClass().getResourceAsStream(resource);
+        found=instream!=null;
+        if(instream!=null) {
+            try {
+                instream.close();
+            } catch (IOException e) {
+            }
+        }
+        return found;
+    }
+
+    /**
+     * probe for a class, print an error message is missing
+     * @param out stream to print stuff
+     * @param category text like "warning" or "error"
+     * @param classname class to look for
+     * @param jarFile where this class comes from
+     * @param errorText extra error text
+     * @param homePage where to d/l the library
+     * @return the number of missing classes
+     * @throws IOException
+     */
+    int probeClass(JspWriter out,
+                   String category,
+                   String classname,
+                   String jarFile,
+                   String description,
+                   String errorText,
+                   String homePage) throws IOException {
+        try {
+            Class clazz = classExists(classname);
+            if(clazz == null)  {
+               String url="";
+               if(homePage!=null) {
+                  url="<br>  See <a href="+homePage+">"+homePage+"</a>";
+               }
+               out.write("<p>"+category+": could not find class "+classname
+                   +" from file <b>"+jarFile
+                   +"</b><br>  "+errorText
+                   +url
+                   +"<p>");
+               return 1;
+            } else {
+               String location = getLocation(out, clazz);
+               if(location == null) {
+                  out.write("Found "+ description + " (" + classname + ")<br>");
+               }
+               else {
+                  out.write("Found "+ description + " (" + classname + ") at " + location + "<br>");
+               }
+               return 0;
+            }
+        } catch(NoClassDefFoundError ncdfe) { 
+            String url="";
+            if(homePage!=null) {
+                url="<br>  See <a href="+homePage+">"+homePage+"</a>";
+            }
+            out.write("<p>"+category+": could not find a dependency"
+                    +" of class "+classname
+                    +" from file <b>"+jarFile
+                    +"</b><br> "+errorText
+                    +url
+                    +"<br>The root cause was: "+ncdfe.getMessage()
+                    +"<br>This can happen e.g. if "+classname+" is in" 
+                    +" the 'common' classpath, but a dependency like "
+                    +" activation.jar is only in the webapp classpath."
+                    +"<p>");
+            return 1;
+        }
+    }
+
+    /**
+     * get the location of a class
+     * @param out
+     * @param clazz
+     * @return the jar file or path where a class was found
+     */
+
+    String getLocation(JspWriter out,
+                       Class clazz) {
+        try {
+            java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
+            String location = url.toString();
+            if(location.startsWith("jar")) {
+                url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
+                location = url.toString();
+            } 
+            
+            if(location.startsWith("file")) {
+                java.io.File file = new java.io.File(url.getFile());
+                return file.getAbsolutePath();
+            } else {
+                return url.toString();
+            }
+        } catch (Throwable t){
+        }
+        return "an unknown location";
+    }
+
+    /**
+     * a class we need if a class is missing
+     * @param out stream to print stuff
+     * @param classname class to look for
+     * @param jarFile where this class comes from
+     * @param errorText extra error text
+     * @param homePage where to d/l the library
+     * @throws IOException when needed
+     * @return the number of missing libraries (0 or 1)
+     */
+    int needClass(JspWriter out,
+                   String classname,
+                   String jarFile,
+                   String description,
+                   String errorText,
+                   String homePage) throws IOException {
+        return probeClass(out,
+                "<b>Error</b>",
+                classname,
+                jarFile,
+                description,
+                errorText,
+                homePage);
+    }
+
+    /**
+     * print warning message if a class is missing
+     * @param out stream to print stuff
+     * @param classname class to look for
+     * @param jarFile where this class comes from
+     * @param errorText extra error text
+     * @param homePage where to d/l the library
+     * @throws IOException when needed
+     * @return the number of missing libraries (0 or 1)
+     */
+    int wantClass(JspWriter out,
+                   String classname,
+                   String jarFile,
+                   String description,
+                   String errorText,
+                   String homePage) throws IOException {
+        return probeClass(out,
+                "<b>Warning</b>",
+                classname,
+                jarFile,
+                description,
+                errorText,
+                homePage);
+    }
+
+    /**
+     * probe for a resource existing,
+     * @param out
+     * @param resource
+     * @param errorText
+     * @throws Exception
+     */
+    int wantResource(JspWriter out,
+                      String resource,
+                      String errorText) throws Exception {
+        if(!resourceExists(resource)) {
+            out.write("<p><b>Warning</b>: could not find resource "+resource
+                        +"<br>"
+                        +errorText);
+            return 0;
+        } else {
+            out.write("found "+resource+"<br>");
+            return 1;
+        }
+    }
+
+
+    /**
+     *  get servlet version string
+     *
+     */
+
+    public String getServletVersion() {
+        ServletContext context=getServletConfig().getServletContext();
+        int major = context.getMajorVersion();
+        int minor = context.getMinorVersion();
+        return Integer.toString(major) + '.' + Integer.toString(minor);
+    }
+
+
+
+    /**
+     * what parser are we using.
+     * @return the classname of the parser
+     */
+    private String getParserName() {
+        SAXParser saxParser = getSAXParser();
+        if (saxParser == null) {
+            return "Could not create an XML Parser";
+        }
+
+        // check to what is in the classname
+        String saxParserName = saxParser.getClass().getName();
+        return saxParserName;
+    }
+
+    /**
+     * Create a JAXP SAXParser
+     * @return parser or null for trouble
+     */
+    private SAXParser getSAXParser() {
+        SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+        if (saxParserFactory == null) {
+            return null;
+        }
+        SAXParser saxParser = null;
+        try {
+            saxParser = saxParserFactory.newSAXParser();
+        } catch (Exception e) {
+        }
+        return saxParser;
+    }
+
+    /**
+     * get the location of the parser
+     * @return path or null for trouble in tracking it down
+     */
+
+    private String getParserLocation(JspWriter out) {
+        SAXParser saxParser = getSAXParser();
+        if (saxParser == null) {
+            return null;
+        }
+        String location = getLocation(out,saxParser.getClass());
+        return location;
+    }
+    %>
+<html><head><title>Axis Happiness Page</title></head>
+<body>
+<h1>Axis Happiness Page</h1>
+<h2>Examining webapp configuration</h2>
+
+<p>
+<h3>Needed Components</h3>
+<%
+    int needed=0,wanted=0;
+
+    /**
+     * the essentials, without these Axis is not going to work
+     */
+    needed=needClass(out, "javax.xml.soap.SOAPMessage",
+            "saaj.jar",
+            "SAAJ API",
+            "Axis will not work",
+            "http://xml.apache.org/axis/");
+
+    needed+=needClass(out, "javax.xml.rpc.Service",
+            "jaxrpc.jar",
+            "JAX-RPC API",
+            "Axis will not work",
+            "http://xml.apache.org/axis/");
+
+    needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet",
+            "axis.jar",
+            "Apache-Axis",
+            "Axis will not work",
+            "http://xml.apache.org/axis/");
+
+    needed+=needClass(out, "org.apache.commons.discovery.Resource",
+            "commons-discovery.jar",
+            "Jakarta-Commons Discovery",
+            "Axis will not work",
+            "http://jakarta.apache.org/commons/discovery.html");
+
+    needed+=needClass(out, "org.apache.commons.logging.Log",
+            "commons-logging.jar",
+            "Jakarta-Commons Logging",
+            "Axis will not work",
+            "http://jakarta.apache.org/commons/logging.html");
+
+    needed+=needClass(out, "org.apache.log4j.Layout",
+            "log4j-1.2.8.jar",
+            "Log4j",
+            "Axis may not work",
+            "http://jakarta.apache.org/log4j");
+
+    //should we search for a javax.wsdl file here, to hint that it needs
+    //to go into an approved directory? because we dont seem to need to do that.
+    needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl",
+            "wsdl4j.jar",
+            "IBM's WSDL4Java",
+            "Axis will not work",
+            null);
+
+    needed+=needClass(out, "javax.xml.parsers.SAXParserFactory",
+            "xerces.jar",
+            "JAXP implementation",
+            "Axis will not work",
+            "http://xml.apache.org/xerces-j/");
+
+    needed+=needClass(out,"javax.activation.DataHandler",
+            "activation.jar",
+            "Activation API",
+            "Axis will not work",
+            "http://java.sun.com/products/javabeans/glasgow/jaf.html");
+%>
+<h3>Optional Components</h3>
+<%
+    /*
+     * now the stuff we can live without
+     */
+    wanted+=wantClass(out,"javax.mail.internet.MimeMessage",
+            "mail.jar",
+            "Mail API",
+            "Attachments will not work",
+            "http://java.sun.com/products/javamail/");
+
+    wanted+=wantClass(out,"org.apache.xml.security.Init",
+            "xmlsec.jar",
+            "XML Security API",
+            "XML Security is not supported",
+            "http://xml.apache.org/security/");
+
+    wanted += wantClass(out, "javax.net.ssl.SSLSocketFactory",
+            "jsse.jar or java1.4+ runtime",
+            "Java Secure Socket Extension",
+            "https is not supported",
+            "http://java.sun.com/products/jsse/");
+    /*
+     * resources on the classpath path
+     */
+    /* broken; this is a file, not a resource
+    wantResource(out,"/server-config.wsdd",
+            "There is no server configuration file;"
+            +"run AdminClient to create one");
+    */
+    /* add more libraries here */
+
+    out.write("<h3>");
+    //is everythng we need here
+    if(needed==0) {
+       //yes, be happy
+        out.write("<i>The core axis libraries are present. </i>");
+    } else {
+        //no, be very unhappy
+        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+        out.write("<i>"
+                +needed
+                +" core axis librar"
+                +(needed==1?"y is":"ies are")
+                +" missing</i>");
+    }
+    //now look at wanted stuff
+    if(wanted>0) {
+        out.write("<i>"
+                +wanted
+                +" optional axis librar"
+                +(wanted==1?"y is":"ies are")
+                +" missing</i>");
+    } else {
+        out.write("The optional components are present.");
+    }
+    out.write("</h3>");
+    //hint if anything is missing
+    if(needed>0 || wanted>0 ) {
+        out.write(getInstallHints(request));
+    }
+
+    %>
+    <p>
+    <B><I>Note:</I></B> Even if everything this page probes for is present, there is no guarantee your
+    web service will work, because there are many configuration options that we do
+    not check for. These tests are <i>necessary</i> but not <i>sufficient</i>
+    <hr>
+
+    <h2>Examining Application Server</h2>
+    <%
+        String servletVersion=getServletVersion();
+        String xmlParser=getParserName();
+        String xmlParserLocation = getParserLocation(out);
+
+    %>
+    <table>
+        <tr><td>Servlet version</td><td><%= servletVersion %></td></tr>
+        <tr><td>XML Parser</td><td><%= xmlParser %></td></tr>
+        <tr><td>XML ParserLocation</td><td><%= xmlParserLocation %></td></tr>
+    </table>
+<% if(xmlParser.indexOf("crimson")>=0) { %>
+    <p>
+    <b>We recommend <a href="http://xml.apache.org/xerces2-j/">Xerces 2</a>
+        over Crimson as the XML parser for Axis</b>
+    </p>
+<%    } %>
+
+    <h2>Examining System Properties</h2>
+<%
+    /** 
+     * Dump the system properties
+     */
+    java.util.Enumeration e=null;
+    try {
+        e= System.getProperties().propertyNames();
+    } catch (SecurityException se) {
+    }
+    if(e!=null) {
+        out.write("<pre>");
+        for (;e.hasMoreElements();) {
+            String key = (String) e.nextElement();
+            out.write(key + "=" + System.getProperty(key)+"\n");
+        }
+        out.write("</pre><p>");
+    } else {
+        out.write("System properties are not accessible<p>");
+    }
+%>
+    <hr>
+    Platform: <%= getServletConfig().getServletContext().getServerInfo()  %>
+</body>
+</html>
+
+

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/happyaxis.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/index.html
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/index.html?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/index.html (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/index.html Mon May  9 23:03:53 2005
@@ -0,0 +1,17 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Apache-Beehive</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1 align="center">Test Web Services For Service Control Unit test cases</h1>
+<ul>
+    <li>
+        View   <a href="web/Service.jws?wsdl">WSDL</a>
+    </li>
+</ul>
+
+</body>
+</html>

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/servers/webapp/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java Mon May  9 23:03:53 2005
@@ -0,0 +1,83 @@
+package org.controlhaus.controlunit;
+
+/*
+ * ServiceControlTestCase.java
+ * 
+ * Copyright 2004 BEA Systems, Inc. 
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Jonathan Colwell
+ */
+
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
+
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.context.ControlContainerContext;
+import org.apache.beehive.controls.api.context.ControlThreadContext;
+
+/*******************************************************************************
+ * 
+ *
+ * @author Jonathan Colwell
+ */
+public abstract class ControlTestCase extends TestCase {
+
+    private ControlContainerContext mContext;
+
+    public void setUp() throws Exception {
+        try { 
+        mContext = ControlThreadContext.getContext();
+        if(mContext == null) {
+            mContext = new org.apache.beehive.controls.runtime.bean.
+                ControlContainerContext();
+            mContext.beginContext();
+        }
+
+        /*
+         * Now that the context is in place, try to initialize the service
+         * control client subclass.
+         */
+        Class cls = getClass();
+        Class clientInitializer =
+            cls.getClassLoader().loadClass(cls.getName()
+                                           + "ClientInitializer");
+        
+        Method init =
+            clientInitializer.getMethod("initialize",
+                                        ControlBeanContext.class, cls);
+        init.invoke(null, mContext, this);
+        } catch ( InvocationTargetException ite) {
+            Throwable t = ite.getCause();
+            System.out.println("Error in method invocation original cause: " + t.getMessage());
+            t.printStackTrace();
+            ite.printStackTrace();
+            throw ite;
+        }catch (Exception e) {
+            e.printStackTrace();
+            throw e;
+        }
+        
+    }
+
+    public void tearDown() throws Exception {
+        if(mContext != null) {
+            mContext.endContext();
+        }
+    }
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/HolderUtilsTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/HolderUtilsTest.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/HolderUtilsTest.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/HolderUtilsTest.java Mon May  9 23:03:53 2005
@@ -0,0 +1,89 @@
+/*
+ * 
+ * Copyright 2004 BEA Systems, Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Daryoush Mehrtash
+ */
+package org.controlhaus.utils;
+
+
+
+
+
+import java.util.ArrayList;
+
+import javax.xml.rpc.holders.Holder;
+import javax.xml.rpc.holders.IntHolder;
+
+import org.apache.beehive.wsm.databinding.GenericHolder;
+import org.apache.beehive.controls.system.webservice.utils.HolderUtils;
+
+import junit.framework.TestCase;
+
+public class HolderUtilsTest extends TestCase {
+
+	public void testStuffingHolders() throws NoSuchFieldException, IllegalAccessException {
+		 GenericHolder<MyClass> myHolder = new GenericHolder<MyClass>(new MyClass());
+		 Holder aHolder = myHolder;
+
+		MyClass theValue = new MyClass("AAA");
+		Object anObject = theValue;
+
+				
+		HolderUtils.stuffHolderValue(myHolder, anObject);
+		assertTrue("AAA".equals(myHolder.value.name));
+				
+		// // stuff null
+		HolderUtils.stuffHolderValue(myHolder, null);
+		 System.out.println("After stuffing null to straight holder my name is: " + myHolder.value);
+
+		// stuff object to holder of static array
+		MyClassArrayHolder myStaticArrayHolder = new MyClassArrayHolder();
+		Holder anStaticArrayHolder = myStaticArrayHolder;
+		HolderUtils.stuffHolderValue(anStaticArrayHolder, anObject);
+		MyClass[] myStaticArrayValueResult = myStaticArrayHolder.value;
+		assertTrue("AAA".equals(myStaticArrayValueResult[0].name));
+
+		// holder of array stuff object
+		GenericHolder<MyClass[]> myArrayHolder = new GenericHolder<MyClass[]>(new MyClass[0]);
+		Holder anArrayHolder = myArrayHolder;
+		HolderUtils.stuffHolderValue(anArrayHolder, anObject);
+		MyClass[] myArrayValueResult = myArrayHolder.value;
+		assertTrue("AAA".equals(myArrayValueResult[0].name));
+
+		// holder of array stuff array list of objects.
+		myArrayHolder = new GenericHolder<MyClass[]>(new MyClass[0]);
+		anArrayHolder = myArrayHolder;
+		ArrayList myClassList = new ArrayList();
+		myClassList.add(new MyClass("aaaa"));
+		myClassList.add(new MyClass("bbbb"));
+		HolderUtils.stuffHolderValue(anArrayHolder, myClassList);
+		myArrayValueResult = myArrayHolder.value;
+		assertTrue("aaaa".equals(myArrayValueResult[0].name));
+		assertTrue("bbbb".equals( myArrayValueResult[1].name));
+		
+
+		// stuff null to my holder of primitive type
+		IntHolder ih = new IntHolder();
+		HolderUtils.stuffHolderValue(ih, null);
+		assertTrue(0 == ih.value);
+		
+
+	}
+}
+
+
+

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/HolderUtilsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClass.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClass.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClass.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClass.java Mon May  9 23:03:53 2005
@@ -0,0 +1,13 @@
+package org.controlhaus.utils;
+
+public class MyClass {
+	public String name;
+
+	public MyClass() {
+		
+	}
+	public MyClass(String name) {
+		super();
+		this.name = name;
+	}
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClassArrayHolder.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClassArrayHolder.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClassArrayHolder.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClassArrayHolder.java Mon May  9 23:03:53 2005
@@ -0,0 +1,9 @@
+package org.controlhaus.utils;
+
+import javax.xml.rpc.holders.Holder;
+
+public class MyClassArrayHolder implements Holder {
+
+		public MyClass[] value;
+
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/utils/MyClassArrayHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java Mon May  9 23:03:53 2005
@@ -0,0 +1,76 @@
+/*
+ * 
+ * Copyright 2004 BEA Systems, Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Daryoush Mehrtash
+ */
+package org.controlhaus.webservice;
+
+
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.holders.StringHolder;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.controlhaus.controlunit.ControlTestCase;
+import org.controlhaus.webservice.testmodel.client.*;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.context.ControlContainerContext;
+import org.apache.beehive.controls.api.context.ControlThreadContext;
+
+public class SimpleWebSericeTest extends ControlTestCase {
+	static Logger logger = Logger.getLogger(SimpleWebSericeTest.class);
+
+	@Control SimpleWSClient client;
+//	@Control SimpleWSClientXMLBeansType xmlbeanTypeClient;
+	
+	
+	   public void setUp() throws Exception  {
+	   		super.setUp();   // initialize my control instance.... 
+	   		
+	   		// TODO:  The local Axis server is not working.... 
+//	   		LocalAxisServiceFacotry.registerAsServiceFactory();
+//	   		LocalAxisServiceFacotry.setWebServiceProvider(SimpleWebService.class);
+	   }
+	   
+//	   public void testFactoryInstantiation() throws ServiceException {
+//        ServiceFactory factory = ServiceFactory.newInstance();
+//        System.out.println("Service factory class: " + factory);
+//        assertTrue(factory.getClass().equals(LocalAxisServiceFacotry.class));
+//        
+//	   }
+	   public void testSimpleInvoke() throws Exception {
+	   		ClientAddress res = client.getAddressFromName("Jack");
+	        logger.debug("Jack... city: " + res.getCity() + " zipcode: " + res.getZip() + " street: " + res.getStreetName());
+	   		assertTrue("Result address is not as expected!:  Result: " +res.getCity() + " Expected: " + "Seattle", 0 == "Seattle".compareTo(res.getCity()));
+	   		assertTrue("Result zipcode is not as expected!:  Result: " +res.getZip() + " Expected: " + "98119", 98119 == res.getZip());	   		
+	   }
+	   
+	   
+	   // TODO: Holders are not working yet,..... enable this test after the code is in place
+//	   public void testHolder() throws Exception {
+//	   	StringHolder data = new StringHolder();
+//	   	data.value = "Ja";
+//   		int res = client.FindClosestName(data);
+//   		System.out.println("Result: " + res + "data + " + data.value);
+//   		assertTrue(res == 1);
+//   		assertTrue(0 == data.value.compareTo("Jack"));
+//    }
+
+
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/framework/LocalAxisServiceFacotry.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/framework/LocalAxisServiceFacotry.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/framework/LocalAxisServiceFacotry.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/framework/LocalAxisServiceFacotry.java Mon May  9 23:03:53 2005
@@ -0,0 +1,160 @@
+/*
+ * 
+ * Copyright 2004 BEA Systems, Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Daryoush Mehrtash
+ */
+package org.controlhaus.webservice.framework;
+
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.MessageContext;
+import org.apache.axis.configuration.BasicServerConfig;
+import org.apache.axis.configuration.SimpleProvider;
+import org.apache.axis.handlers.soap.SOAPService;
+import org.apache.axis.providers.java.RPCProvider;
+import org.apache.axis.server.AxisServer;
+import org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler;
+import org.apache.log4j.Logger;
+
+
+import org.w3c.dom.Element;
+
+
+public class LocalAxisServiceFacotry extends ServiceFactory {
+	static Logger logger = Logger.getLogger(LocalAxisServiceFacotry.class);
+
+	static Class theWebService;   // the jws file
+	
+	public static void registerAsServiceFactory() {
+		System.setProperty(SERVICEFACTORY_PROPERTY, LocalAxisServiceFacotry.class.getCanonicalName());
+	}
+	
+	public static void setWebServiceProvider(Class provider) {
+		theWebService = provider;
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see javax.xml.rpc.ServiceFactory#createService(java.net.URL, javax.xml.namespace.QName)
+	 */
+	public Service createService(URL arg0, QName arg1) throws ServiceException {
+		logger.debug("createService from URL... TBD");
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.xml.rpc.ServiceFactory#createService(javax.xml.namespace.QName)
+	 */
+	public Service createService(QName arg0)  {
+		logger.debug("createService from Qname... ");
+		org.apache.axis.client.Service service = null;
+		try {
+			// set up a local axis service
+			TestWebServiceHandler handler = new TestWebServiceHandler();
+			SOAPService ss = handler.getSOAPService(theWebService);
+			AxisServer server = new DebugAxisServer(ss);
+			ss.setEngine(server);  	// Explicitly setting the engine to be the local
+			// axis server as oppose to opening connection as the normal
+			service = new org.apache.axis.client.Service();	   // axis service 
+			service.setEngine(server);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return service;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.xml.rpc.ServiceFactory#loadService(java.lang.Class)
+	 */
+	public Service loadService(Class arg0) throws ServiceException {
+		logger.debug("loadService from class... TBD");
+		throw new RuntimeException("Unimplemented method");
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.xml.rpc.ServiceFactory#loadService(java.net.URL, java.lang.Class, java.util.Properties)
+	 */
+	public Service loadService(URL arg0, Class arg1, Properties arg2)
+			throws ServiceException {
+		logger.debug("loadService from url/class... TBD");
+		throw new RuntimeException("Unimplemented method");
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.xml.rpc.ServiceFactory#loadService(java.net.URL, javax.xml.namespace.QName, java.util.Properties)
+	 */
+	public Service loadService(URL arg0, QName arg1, Properties arg2)
+			throws ServiceException {
+		logger.debug("loadService from url/qname... TBD");
+		throw new RuntimeException("Unimplemented method");
+	}
+	
+	public String toString() {
+		return "This is the local Axis service factory";
+	}
+	
+    // a server that doesn't go to all chains
+    private class DebugAxisServer extends AxisServer {
+        
+        /**
+		 * Comment for <code>serialVersionUID</code>
+		 */
+		private static final long serialVersionUID = 1L;
+		private SOAPService mInjectedSOAPService;
+        
+        public DebugAxisServer(SOAPService ss) {
+        	super(new SimpleProvider());
+             mInjectedSOAPService = ss;
+        }
+
+        public void invoke(MessageContext mc) throws AxisFault {
+            mc.setService(mInjectedSOAPService);
+            super.invoke(mc);
+        }
+    }
+
+    
+    
+    private class TestWebServiceHandler
+        extends AnnotatedWebServiceDeploymentHandler {
+        
+    	/**
+		 * Comment for <code>serialVersionUID</code>
+		 */
+		private static final long serialVersionUID = 1L;
+
+		// This method is only here to make the call public.
+        public SOAPService getSOAPService(Class cls)
+            throws Exception{
+
+            return super.getSOAPService(cls);
+        }
+    }
+
+ 
+}
+
+

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/framework/LocalAxisServiceFacotry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientAddress.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientAddress.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientAddress.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientAddress.java Mon May  9 23:03:53 2005
@@ -0,0 +1,132 @@
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.controlhaus.webservice.testmodel.client;
+
+import java.io.Serializable;
+
+public class ClientAddress  implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    private int streetNum;
+    private java.lang.String streetName;
+    private java.lang.String city;
+    private ClinetStateType state;
+    private int zip;
+    private ClientPhone phoneNumber;
+
+ 
+ 
+    /**
+     * @param streetNum
+     * @param streetName
+     * @param city
+     * @param state
+     * @param zip
+     * @param phoneNumber
+     */
+    public ClientAddress(int streetNum, java.lang.String streetName,
+            java.lang.String city, ClinetStateType state, int zip, ClientPhone phoneNumber) {
+        super();
+        this.streetNum = streetNum;
+        this.streetName = streetName;
+        this.city = city;
+        this.state = state;
+        this.zip = zip;
+        this.phoneNumber = phoneNumber;
+    }
+    /**
+     * 
+     */
+    public ClientAddress() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @return Returns the city.
+     */
+    public java.lang.String getCity() {
+        return city;
+    }
+    /**
+     * @param city The city to set.
+     */
+    public void setCity(java.lang.String city) {
+        this.city = city;
+    }
+    /**
+     * @return Returns the phoneNumber.
+     */
+    public ClientPhone getPhoneNumber() {
+        return phoneNumber;
+    }
+    /**
+     * @param phoneNumber The phoneNumber to set.
+     */
+    public void setPhoneNumber(ClientPhone phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+    /**
+     * @return Returns the state.
+     */
+    public ClinetStateType getState() {
+        return state;
+    }
+    /**
+     * @param state The state to set.
+     */
+    public void setState(ClinetStateType state) {
+        this.state = state;
+    }
+    /**
+     * @return Returns the streetName.
+     */
+    public java.lang.String getStreetName() {
+        return streetName;
+    }
+    /**
+     * @param streetName The streetName to set.
+     */
+    public void setStreetName(java.lang.String streetName) {
+        this.streetName = streetName;
+    }
+    /**
+     * @return Returns the streetNum.
+     */
+    public int getStreetNum() {
+        return streetNum;
+    }
+    /**
+     * @param streetNum The streetNum to set.
+     */
+    public void setStreetNum(int streetNum) {
+        this.streetNum = streetNum;
+    }
+    /**
+     * @return Returns the zip.
+     */
+    public int getZip() {
+        return zip;
+    }
+    /**
+     * @param zip The zip to set.
+     */
+    public void setZip(int zip) {
+        this.zip = zip;
+    }
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientAddress.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientPhone.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientPhone.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientPhone.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientPhone.java Mon May  9 23:03:53 2005
@@ -0,0 +1,88 @@
+package org.controlhaus.webservice.testmodel.client;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+import java.io.Serializable;
+
+public class ClientPhone  implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    
+    private int areaCode;
+    private java.lang.String exchange;
+    private java.lang.String number;
+
+ 
+
+    /**
+     * @param areaCode
+     * @param exchange
+     * @param number
+     */
+    public ClientPhone(int areaCode, java.lang.String exchange,
+            java.lang.String number) {
+        super();
+        this.areaCode = areaCode;
+        this.exchange = exchange;
+        this.number = number;
+    }
+    /**
+     * 
+     */
+    public ClientPhone() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @return Returns the areaCode.
+     */
+    public int getAreaCode() {
+        return areaCode;
+    }
+    /**
+     * @param areaCode The areaCode to set.
+     */
+    public void setAreaCode(int areaCode) {
+        this.areaCode = areaCode;
+    }
+    /**
+     * @return Returns the exchange.
+     */
+    public java.lang.String getExchange() {
+        return exchange;
+    }
+    /**
+     * @param exchange The exchange to set.
+     */
+    public void setExchange(java.lang.String exchange) {
+        this.exchange = exchange;
+    }
+    /**
+     * @return Returns the number.
+     */
+    public java.lang.String getNumber() {
+        return number;
+    }
+    /**
+     * @param number The number to set.
+     */
+    public void setNumber(java.lang.String number) {
+        this.number = number;
+    }
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClientPhone.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClinetStateType.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClinetStateType.java?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClinetStateType.java (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClinetStateType.java Mon May  9 23:03:53 2005
@@ -0,0 +1,49 @@
+package org.controlhaus.webservice.testmodel.client;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+import java.io.Serializable;
+
+public class ClinetStateType implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    String state;
+   
+    /**
+     * 
+     */
+    public ClinetStateType() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @param state
+     */
+    public ClinetStateType(String state) {
+        super();
+        this.state = state;
+    }
+    /**
+     * @return Returns the state.
+     */
+    public String getState() {
+        return state;
+    }
+
+}

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ClinetStateType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ServiceControlTest.wsdl
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ServiceControlTest.wsdl?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ServiceControlTest.wsdl (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/ServiceControlTest.wsdl Mon May  9 23:03:53 2005
@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://controlhaus.org/ServiceControlTestServer" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://controlhaus.org/ServiceControlTestServer" xmlns:intf="http://controlhaus.org/ServiceControlTestServer" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--WSDL created by Apache Axis version: 1.2RC3
+Built on Feb 28, 2005 (10:15:14 EST)-->
+ <wsdl:types>
+  <schema elementFormDefault="qualified" targetNamespace="http://controlhaus.org/ServiceControlTestServer" xmlns="http://www.w3.org/2001/XMLSchema">
+   <element name="addEntry">
+    <complexType>
+     <sequence>
+      <element name="name" type="xsd:string"/>
+      <element name="address" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <complexType name="Phone">
+    <sequence>
+     <element name="areaCode" nillable="true" type="xsd:int"/>
+     <element name="exchange" nillable="true" type="xsd:string"/>
+     <element name="number" nillable="true" type="xsd:string"/>
+    </sequence>
+   </complexType>
+   <complexType name="StateType">
+    <sequence>
+     <element name="state" nillable="true" type="xsd:string"/>
+    </sequence>
+   </complexType>
+   <complexType name="Address">
+    <sequence>
+     <element name="city" nillable="true" type="xsd:string"/>
+     <element name="phoneNumber" nillable="true" type="impl:Phone"/>
+     <element name="state" nillable="true" type="impl:StateType"/>
+     <element name="streetName" nillable="true" type="xsd:string"/>
+     <element name="streetNum" nillable="true" type="xsd:int"/>
+     <element name="zip" nillable="true" type="xsd:int"/>
+    </sequence>
+   </complexType>
+   <element name="addEntryResponse">
+    <complexType/>
+   </element>
+   <element name="getAddressFromName">
+    <complexType>
+     <sequence>
+      <element name="name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNameResponse">
+    <complexType>
+     <sequence>
+      <element name="result" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNames">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNamesResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="result" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="FindClosestName">
+    <complexType>
+     <sequence>
+      <element name="name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="FindClosestNameResponse">
+    <complexType>
+     <sequence>
+      <element name="result" type="xsd:int"/>
+      <element name="name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="oneWayWithNoParam">
+    <complexType/>
+   </element>
+   <element name="simpleNoParamMethod">
+    <complexType/>
+   </element>
+   <element name="simpleNoParamMethodResponse">
+    <complexType>
+     <sequence>
+      <element name="result" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+  </schema>
+ </wsdl:types>
+
+   <wsdl:message name="getAddressFromNamesResponse">
+
+      <wsdl:part element="impl:getAddressFromNamesResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="addEntryResponse">
+
+      <wsdl:part element="impl:addEntryResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="oneWayWithNoParamRequest">
+
+      <wsdl:part element="impl:oneWayWithNoParam" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="FindClosestNameRequest">
+
+      <wsdl:part element="impl:FindClosestName" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="FindClosestNameResponse">
+
+      <wsdl:part element="impl:FindClosestNameResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNameResponse">
+
+      <wsdl:part element="impl:getAddressFromNameResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="addEntryRequest">
+
+      <wsdl:part element="impl:addEntry" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNamesRequest">
+
+      <wsdl:part element="impl:getAddressFromNames" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNameRequest">
+
+      <wsdl:part element="impl:getAddressFromName" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="simpleNoParamMethodResponse">
+
+      <wsdl:part element="impl:simpleNoParamMethodResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="simpleNoParamMethodRequest">
+
+      <wsdl:part element="impl:simpleNoParamMethod" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="Service">
+
+      <wsdl:operation name="addEntry">
+
+         <wsdl:input message="impl:addEntryRequest" name="addEntryRequest"/>
+
+         <wsdl:output message="impl:addEntryResponse" name="addEntryResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromName">
+
+         <wsdl:input message="impl:getAddressFromNameRequest" name="getAddressFromNameRequest"/>
+
+         <wsdl:output message="impl:getAddressFromNameResponse" name="getAddressFromNameResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromNames">
+
+         <wsdl:input message="impl:getAddressFromNamesRequest" name="getAddressFromNamesRequest"/>
+
+         <wsdl:output message="impl:getAddressFromNamesResponse" name="getAddressFromNamesResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="FindClosestName">
+
+         <wsdl:input message="impl:FindClosestNameRequest" name="FindClosestNameRequest"/>
+
+         <wsdl:output message="impl:FindClosestNameResponse" name="FindClosestNameResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneWayWithNoParam">
+
+         <wsdl:input message="impl:oneWayWithNoParamRequest" name="oneWayWithNoParamRequest"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="simpleNoParamMethod">
+
+         <wsdl:input message="impl:simpleNoParamMethodRequest" name="simpleNoParamMethodRequest"/>
+
+         <wsdl:output message="impl:simpleNoParamMethodResponse" name="simpleNoParamMethodResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="ServiceSoapBinding" type="impl:Service">
+
+      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="addEntry">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="addEntryRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="addEntryResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromName">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="getAddressFromNameRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="getAddressFromNameResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromNames">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="getAddressFromNamesRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="getAddressFromNamesResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="FindClosestName">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="FindClosestNameRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="FindClosestNameResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneWayWithNoParam">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="oneWayWithNoParamRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="simpleNoParamMethod">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="simpleNoParamMethodRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="simpleNoParamMethodResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="ServiceControlTest">
+
+      <wsdl:port binding="impl:ServiceSoapBinding" name="Service">
+
+         <wsdlsoap:address location="http://localhost:8080/ServiceControlDRT/web/Service.jws"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/SimpleWSClient.jcx
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/SimpleWSClient.jcx?rev=169421&view=auto
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/SimpleWSClient.jcx (added)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/SimpleWSClient.jcx Mon May  9 23:03:53 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.controlhaus.webservice.testmodel.client;
+
+import org.apache.beehive.controls.api.bean.ControlExtension;
+import org.apache.beehive.controls.system.webservice.ServiceControl;
+import org.apache.beehive.controls.system.webservice.ServiceControl.Location;
+import org.apache.beehive.controls.system.webservice.ServiceControl.WSDL;
+import javax.xml.rpc.holders.StringHolder;
+import javax.xml.rpc.holders.IntHolder;
+
+@ControlExtension
+@Location(urls = {"http://localhost:8080/ServiceControlDRT/web/Service.jws"})
+@WSDL(path = "ServiceControlTest.wsdl",  //http://localhost:8080/sctestServer/web/Service.jws?wsdl",
+      service = "ServiceControlTest")
+public interface SimpleWSClient extends ServiceControl {
+	public void addEntry(String name, ClientAddress address);	   
+    public ClientAddress getAddressFromName(String name);
+    public ClientAddress[] getAddressFromNames(String[] name);
+    public int FindClosestName( StringHolder name);
+ }

Propchange: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/testmodel/client/SimpleWSClient.jcx
------------------------------------------------------------------------------
    svn:eol-style = native