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/10/21 18:13:52 UTC

svn commit: r327215 - in /beehive/trunk: system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/ system-controls/test/src/webservice/servers/webapp/WEB-INF/ system-controls/test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/tes...

Author: ekoneil
Date: Fri Oct 21 09:11:46 2005
New Revision: 327215

URL: http://svn.apache.org/viewcvs?rev=327215&view=rev
Log:
Bunch of WSM / system control work.

- cleanup the WSM web application to match the "new" Beehive project model
- remove the DebugPrintMessageHandler from wsm/src/axis as it's not needed in the framework
- start implementing WSDL <-> web service implementation bean validation checking

BB: self
DRT: Beehive pass


Added:
    beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/test/
    beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/test/util/
    beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/src/org/apache/beehive/test/util/DebugPrintMessageHandler.java
      - copied unchanged from r326145, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/DebugPrintMessageHandler.java
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeDocWebService.java
      - copied unchanged from r326145, beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeDocWebService.jws
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeWebService.java
      - copied unchanged from r326145, beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeWebService.jws
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.java
      - copied, changed from r326145, beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.jws
    beehive/trunk/wsm/test/src/junit-services/web/Bar.java
      - copied unchanged from r326145, beehive/trunk/wsm/test/src/junit-services/web/Bar.jws
    beehive/trunk/wsm/test/src/junit-services/web/Bar3.java
      - copied unchanged from r326145, beehive/trunk/wsm/test/src/junit-services/web/Bar3.jws
    beehive/trunk/wsm/test/src/junit-services/web/Foo.java
      - copied unchanged from r326145, beehive/trunk/wsm/test/src/junit-services/web/Foo.jws
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java   (with props)
    beehive/trunk/wsm/test/webapp/src/
      - copied from r326145, beehive/trunk/wsm/test/webapp/WEB-INF/src/
    beehive/trunk/wsm/test/webapp/src-ws/
      - copied from r326145, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/
    beehive/trunk/wsm/test/webapp/src-ws/WebServiceTargetNamespaceEmpty.java
      - copied unchanged from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java
    beehive/trunk/wsm/test/webapp/src-ws/WebServiceTargetNamespaceNotUsed.java
      - copied unchanged from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java
    beehive/trunk/wsm/test/webapp/src-ws/oneway/
      - copied from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/oneway/
    beehive/trunk/wsm/test/webapp/src-ws/webmethod/
      - copied from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webmethod/
    beehive/trunk/wsm/test/webapp/src-ws/webservice/
      - copied from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/
    beehive/trunk/wsm/test/webapp/src/org/
      - copied from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/
    beehive/trunk/wsm/test/webapp/web/
    beehive/trunk/wsm/test/webapp/web/WEB-INF/
      - copied from r326145, beehive/trunk/wsm/test/webapp/WEB-INF/
    beehive/trunk/wsm/test/webapp/web/WEB-INF/server-config.wsdd
      - copied unchanged from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd
    beehive/trunk/wsm/test/webapp/web/WEB-INF/web.xml
      - copied unchanged from r327182, beehive/trunk/wsm/test/webapp/WEB-INF/web.xml
Removed:
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/util/DebugPrintMessageHandler.java
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeDocWebService.jws
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/axis/FakeWebService.jws
    beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.jws
    beehive/trunk/wsm/test/src/junit-services/web/Bar.jws
    beehive/trunk/wsm/test/src/junit-services/web/Bar3.jws
    beehive/trunk/wsm/test/src/junit-services/web/Foo.jws
    beehive/trunk/wsm/test/webapp/WEB-INF/
    beehive/trunk/wsm/test/webapp/web/WEB-INF/src/
    beehive/trunk/wsm/test/webapp/web/WEB-INF/src-ws/
Modified:
    beehive/trunk/system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/JdbcControl.java
    beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/server-config.wsdd
    beehive/trunk/wsm/build.xml
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisFaultAdaptor.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ant/AxisTypeGeneratorTask.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisTypeLookup.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeMappingMetaData.java
    beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeRegistrar.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java
    beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java
    beehive/trunk/wsm/test/build.xml
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/WSDL2AnnotatedJavaTest.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
    beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl
    beehive/trunk/wsm/test/webapp/build.xml

Modified: beehive/trunk/system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/JdbcControl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/JdbcControl.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/JdbcControl.java (original)
+++ beehive/trunk/system-controls/src/jdbc/org/apache/beehive/controls/system/jdbc/JdbcControl.java Fri Oct 21 09:11:46 2005
@@ -486,7 +486,7 @@
 // ********************************************************************************************************************
 
     /**
-     * Nested class used for specifing parameters for a callable statement.  If a method in a .jcx takes an array of
+     * Nested class used for specifing parameters for a callable statement.  If a method in a control extension takes an array of
      * SQLParameter, the JdbcControl treats the SQL as a CallableStatement and inserts values into the statement from
      * the SQLParameter array.  After the CallableStatement executes, results are mapped into OUT type parameters found
      * int the SQLParameter array.

Modified: beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/server-config.wsdd
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/server-config.wsdd?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/server-config.wsdd (original)
+++ beehive/trunk/system-controls/test/src/webservice/servers/webapp/WEB-INF/server-config.wsdd Fri Oct 21 09:11:46 2005
@@ -1,68 +1,58 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
- <globalConfiguration>
-  <parameter name="adminPassword" value="admin"/>
-  <parameter name="disablePrettyXML" value="true"/>
-  <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
-  <parameter name="sendXsiTypes" value="true"/>
-  <parameter name="sendXMLDeclaration" value="true"/>
-  <requestFlow>
-   <handler type="java:org.apache.beehive.wsm.axis.util.DebugPrintMessageHandler">
-   </handler>
-   <handler name="soapmonitor" 
-      type="java:org.apache.axis.handlers.SOAPMonitorHandler">
-    <parameter name="wsdlURL" 
-      value="/testws/SOAPMonitorService-impl.wsdl"/>
-    <parameter name="namespace" 
-      value="http://tempuri.org/wsdl/2001/12/SOAPMonitorService-impl.wsdl"/>
-    <parameter name="serviceName" value="SOAPMonitorService"/>
-    <parameter name="portName" value="Demo"/>
-  </handler>
-   <service name="SOAPMonitorService" provider="java:RPC">
-    <parameter name="allowedMethods" value="publishMessage"/>
-    <parameter name="className" 
-      value="org.apache.axis.monitor.SOAPMonitorService"/>
-    <parameter name="scope" value="Application"/>
-  </service>
-  
-  
-  <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
-    <parameter name="scope" value="session"/>
-   </handler>
-  <handler type="java:org.apache.axis.handlers.JWSHandler">
-    <parameter name="scope" value="session"/>
-   </handler>
-  </requestFlow>
- </globalConfiguration>
- <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
- <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
- <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
- <service name="AdminService" provider="java:MSG">
-  <parameter name="allowedMethods" value="AdminService"/>
-  <parameter name="enableRemoteAdmin" value="false"/>
-  <parameter name="className" value="org.apache.axis.utils.Admin"/>
-  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
- </service>
-
-
- 
- <service name="Version" provider="java:RPC">
-  <parameter name="allowedMethods" value="getVersion"/>
-  <parameter name="className" value="org.apache.axis.Version"/>
- </service>
- <transport name="http">
-  <requestFlow>
-   <handler type="URLMapper"/>
-   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
-  </requestFlow>
-  <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
-  <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
-  <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
- </transport>
- <transport name="local">
-  <responseFlow>
-   <handler type="LocalResponder"/>
-  </responseFlow>
- </transport>
+    <globalConfiguration>
+        <parameter name="adminPassword" value="admin"/>
+        <parameter name="disablePrettyXML" value="true"/>
+        <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
+        <parameter name="sendXsiTypes" value="true"/>
+        <parameter name="sendXMLDeclaration" value="true"/>
+        <requestFlow>
+            <handler type="java:org.apache.beehive.test.util.DebugPrintMessageHandler"/>
+            <handler name="soapmonitor" type="java:org.apache.axis.handlers.SOAPMonitorHandler">
+                <parameter name="wsdlURL" value="/testws/SOAPMonitorService-impl.wsdl"/>
+                <parameter name="namespace" value="http://tempuri.org/wsdl/2001/12/SOAPMonitorService-impl.wsdl"/>
+                <parameter name="serviceName" value="SOAPMonitorService"/>
+                <parameter name="portName" value="Demo"/>
+            </handler>
+            <service name="SOAPMonitorService" provider="java:RPC">
+                <parameter name="allowedMethods" value="publishMessage"/>
+                <parameter name="className" value="org.apache.axis.monitor.SOAPMonitorService"/>
+                <parameter name="scope" value="Application"/>
+            </service>
+            <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
+                <parameter name="scope" value="session"/>
+            </handler>
+            <handler type="java:org.apache.axis.handlers.JWSHandler">
+                <parameter name="scope" value="session"/>
+            </handler>
+        </requestFlow>
+    </globalConfiguration>
+    <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+    <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+    <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+    <service name="AdminService" provider="java:MSG">
+       <parameter name="allowedMethods" value="AdminService"/>
+       <parameter name="enableRemoteAdmin" value="false"/>
+       <parameter name="className" value="org.apache.axis.utils.Admin"/>
+       <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+    </service>
+    <service name="Version" provider="java:RPC">
+        <parameter name="allowedMethods" value="getVersion"/>
+        <parameter name="className" value="org.apache.axis.Version"/>
+    </service>
+    <transport name="http">
+        <requestFlow>
+            <handler type="URLMapper"/>
+            <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+        </requestFlow>
+        <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+        <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+        <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+    </transport>
+    <transport name="local">
+        <responseFlow>
+            <handler type="LocalResponder"/>
+        </responseFlow>
+    </transport>
 </deployment>
 

Modified: beehive/trunk/wsm/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/build.xml?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/build.xml (original)
+++ beehive/trunk/wsm/build.xml Fri Oct 21 09:11:46 2005
@@ -58,6 +58,7 @@
         <pathelement location="${jsr181.jar}"/>
         <pathelement location="${core.classes}"/>
         <pathelement location="external/axis-1.2/jaxrpc.jar"/>
+        <pathelement location="external/axis-1.2/wsdl4j.jar"/>
     </path>
  
     <path id="axis.classpath">
@@ -236,8 +237,8 @@
     <target name="docs" description="Generate the WSM API documentation">
         <javadoc destdir="${docs.dir}/apidocs/classref_wsm" 
                  maxmemory="256M" 
-                 windowtitle="Apache Beehive Controls API Documentation (Version ${beehive.version})" 
-                 doctitle="Apache Beehive Controls API Documentation (Version ${beehive.version})" 
+                 windowtitle="Apache Beehive Web Service Metadata API Documentation (Version ${beehive.version})" 
+                 doctitle="Apache Beehive Web Service Metadata API Documentation (Version ${beehive.version})" 
                  version="true" 
                  author="false" 
                  use="true" 

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisFaultAdaptor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisFaultAdaptor.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisFaultAdaptor.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisFaultAdaptor.java Fri Oct 21 09:11:46 2005
@@ -1,9 +1,6 @@
-package org.apache.beehive.wsm.axis;
 /*
- * 
  * Copyright 2001-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
@@ -15,9 +12,9 @@
  * 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.apache.beehive.wsm.axis;
+
 import java.util.ArrayList;
 import javax.xml.namespace.QName;
 
@@ -41,15 +38,14 @@
  */
 public class AxisFaultAdaptor extends AxisFault {
 
-    private transient MessageContext msgContext;
+    private transient MessageContext _msgContext;
 
-    private transient Throwable origExp;
+    private transient Throwable _origExp;
 
     public AxisFaultAdaptor(MessageContext msgContext, Throwable origExp) {
-        this.msgContext = msgContext;
-
         /* todo: why is the origExp set twice as this.origExp and detail? */
-        this.origExp = origExp;
+        _msgContext = msgContext;
+        _origExp = origExp;
         detail = origExp;
 
         removeFaultDetail(Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME);
@@ -67,8 +63,8 @@
         FaultDesc fd = null;
         QName faultQname = null;
 
-        assert msgContext != null : "Found null MessageContext";
-        fd = msgContext.getOperation().getFaultByClass(origExp.getClass());
+        assert _msgContext != null : "Found null MessageContext";
+        fd = _msgContext.getOperation().getFaultByClass(_origExp.getClass());
         assert fd != null : "Received null FaultDesc";
 
         ArrayList parameters = fd.getParameters();
@@ -77,9 +73,10 @@
             if(parameter != null)
                 faultQname = parameter.getQName();
         }
-        if( faultQname == null)
+
+        if(faultQname == null)
             faultQname = fd.getQName();
 
-        context.serialize(faultQname, null, origExp);
+        context.serialize(faultQname, null, _origExp);
     }
 }

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ant/AxisTypeGeneratorTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ant/AxisTypeGeneratorTask.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ant/AxisTypeGeneratorTask.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ant/AxisTypeGeneratorTask.java Fri Oct 21 09:11:46 2005
@@ -1,9 +1,6 @@
 /*
- * AxisTypeGeneratorTask.java
- * 
  * Copyright 2001-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
@@ -15,9 +12,6 @@
  * 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
  */
 package org.apache.beehive.wsm.axis.ant;
 
@@ -37,7 +31,6 @@
 
     private File _wsdlDir;
     private File _outDir;
-    private boolean _generateJWS = false;
 
     public void setWSDLDir(File wsdl) {
         _wsdlDir = wsdl;

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisTypeLookup.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisTypeLookup.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisTypeLookup.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/databinding/AxisTypeLookup.java Fri Oct 21 09:11:46 2005
@@ -1,8 +1,6 @@
 /*
- * 
  * Copyright 2001-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
@@ -14,21 +12,20 @@
  * 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.apache.beehive.wsm.axis.databinding;
 
 import javax.xml.namespace.QName;
 import javax.xml.rpc.encoding.TypeMappingRegistry;
 
+import org.apache.axis.Constants;
 import org.apache.axis.description.TypeDesc;
+import org.apache.axis.encoding.TypeMappingRegistryImpl;
+import org.apache.axis.encoding.TypeMapping;
 import org.apache.axis.utils.ClassUtils;
 import org.apache.axis.wsdl.fromJava.Namespaces;
 import org.apache.axis.wsdl.fromJava.Types;
 import org.apache.axis.wsdl.toJava.Utils;
-import org.apache.axis.Constants;
-import org.apache.axis.encoding.TypeMappingRegistryImpl;
 import org.apache.beehive.wsm.axis.registration.AxisTypeMappingMetaData;
 import org.apache.beehive.wsm.databinding.BindingLookupService;
 
@@ -37,40 +34,27 @@
 
     private static final char[] PACKAGE_SEPARATORS = {'.', ':'};
 
-    public AxisTypeLookup() {
-        super();
-    }
-
-    /*
-     * @see TypeLookUpServices#getClassQName(java.lang.Class)
-     */
     public QName class2qname(Class cls) {
         if(cls.isArray())
             cls = cls.getComponentType();
 
         TypeDesc td = TypeDesc.getTypeDescForClass(cls);
 
-        if(null != td) {
+        if(null != td)
             return td.getXmlType();
-        }
         else {
             String namespace = Namespaces.makeNamespace(cls.getName());
-            if(namespace == null || namespace.endsWith("DefaultNamespace")) {
+            if(namespace == null || namespace.endsWith("DefaultNamespace"))
                 namespace = "http://no.namespace.specified";
-            }
+
             return class2qname(cls, namespace);
         }
     }
 
-    /**
-     * @param cls
-     * @param namespace
-     * @return QName
-     */
     public QName class2qname(Class cls, String namespace) {
         if(AxisTypeMappingMetaData.isBuiltInType(cls))
             return AxisTypeMappingMetaData.getBuiltInTypeQname(cls);
-        return new QName(namespace, Types.getLocalNameFromFullName(cls.getName()));
+        else return new QName(namespace, Types.getLocalNameFromFullName(cls.getName()));
     }
 
     public Class qname2class(QName qType) {
@@ -81,50 +65,43 @@
 
         if (Constants.URI_SOAP11_ENC.equals(qType.getNamespaceURI())) {
             TypeMappingRegistry tmr = new TypeMappingRegistryImpl(true);
-            org.apache.axis.encoding.TypeMapping tm =
-                    (org.apache.axis.encoding.TypeMapping)tmr.getTypeMapping(Constants.URI_SOAP11_ENC);
+            TypeMapping tm = (TypeMapping)tmr.getTypeMapping(Constants.URI_SOAP11_ENC);
             return tm.getClassForQName(qType);
         }
 
         String packageName = getPackageNameFromQName(qType);
         String className;
-        if(packageName != null && packageName.length() > 0) {
+        if(packageName != null && packageName.length() > 0)
             className = packageName + "." + Utils.xmlNameToJavaClass(qType.getLocalPart());
-        }
-        else {
+        else
             className = Utils.xmlNameToJavaClass(qType.getLocalPart());
-        }
 
         Class javaType = null;
         try {
             javaType = ClassUtils.forName(className);
         }
         catch(ClassNotFoundException e) {
-            System.out.println("Failed to find the class: " + className
-                + " No Axis generated classes was found for qname: " + qType);
+            System.out.println("Unable to find the class \"" + className + "\".  No Axis generated classes were found for qname \"" + qType + "\"");
         }
 
         if(null != javaType)
-            System.out.println("Found an Axis generated type for qname: "
-                + qType + " class: " + javaType.getCanonicalName());
+            System.out.println("Found an Axis generated type for qname \"" + qType + "\" class \"" + javaType.getCanonicalName() + "\"");
 
         return javaType;
     }
 
     private String getPackageNameFromQName(QName qType) {
-
-        // TODO: Later keep a cache of previous conversions, and return the
-        // result from cache if there is any.
+        /*
+        todo: keep a cache of previous conversions
+        */
         String packageName = Utils.makePackageName(qType.getNamespaceURI());
-        packageName = normalizePackageName(packageName, '.');
-        return packageName;
+        return normalizePackageName(packageName, '.');
     }
 
     private static String normalizePackageName(String pkg, char separator) {
 
-        for(int i = 0; i < PACKAGE_SEPARATORS.length; i++) {
+        for(int i = 0; i < PACKAGE_SEPARATORS.length; i++)
             pkg = pkg.replace(PACKAGE_SEPARATORS[i], separator);
-        }
 
         return pkg;
     }

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeMappingMetaData.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeMappingMetaData.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeMappingMetaData.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeMappingMetaData.java Fri Oct 21 09:11:46 2005
@@ -1,8 +1,17 @@
 /*
- * Created on Mar 24, 2005
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
+ * 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.apache.beehive.wsm.axis.registration;
 
@@ -27,21 +36,21 @@
      * @param cls
      * @return boolean
      */
-    static public boolean isBuiltInType(Class cls) {
+    public static boolean isBuiltInType(Class cls) {
         return (builtInTypes.containsKey(cls));
     }
 
    /*
     * @see org.apache.beehive.wsm.registration.TypeRegistrar#getBuiltInTypeQname(java.lang.Class)
     */
-    static public QName getBuiltInTypeQname(Class cls) {
+    public static QName getBuiltInTypeQname(Class cls) {
         return builtInTypes.get(cls);
     }
 
     /**
      *
      */
-    static private void initBuildInTypes() {
+    private static void initBuildInTypes() {
         // HexBinary binary data needs to use the hex binary
         // serializer/deserializer
         addBuiltInType(Constants.XSD_HEXBIN, HexBinary.class);
@@ -154,7 +163,7 @@
         addBuiltInType(Constants.SOAP_ARRAY, java.util.ArrayList.class);
     }
 
-    static private void addBuiltInType(QName q, Class c) {
+    private static void addBuiltInType(QName q, Class c) {
         builtInTypes.put(c, q);
     }
 }

Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeRegistrar.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeRegistrar.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeRegistrar.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/registration/AxisTypeRegistrar.java Fri Oct 21 09:11:46 2005
@@ -1,8 +1,6 @@
 /*
- * 
  * Copyright 2001-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
@@ -14,8 +12,6 @@
  * 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.apache.beehive.wsm.axis.registration;
 

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java Fri Oct 21 09:11:46 2005
@@ -68,8 +68,10 @@
             }
         }
 
-        /* process service implementations to validate according to specification
-and to verify serviceEndpoint interface contract (as needed) */
+        /*
+        Process service implementations to validate according to specification
+        and to verify serviceEndpoint interface contract (as needed)
+         */
         if(_serviceImplementations != null) {
             for(ClassDeclaration serviceImplementation : _serviceImplementations) {
                 checker.check(serviceImplementation);
@@ -100,20 +102,4 @@
 
         return _serviceInterfaces;
     }
-/*
-    public void check(Declaration decl) {
-
-        if(!(decl instanceof TypeDeclaration) || decl instanceof EnumDeclaration)
-            return;
-
-        AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment();
-        TypeDeclaration typeDecl = (TypeDeclaration)decl;
-
-        env.getMessager().printNotice("Processing type: " + decl.getSimpleName());
-
-        Jsr181AnnotationChecker checker = Jsr181AnnotationChecker.getInstance();
-        checker.setMessager(env.getMessager());
-        checker.check(typeDecl);
-    }
-*/
 }

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessorFactory.java Fri Oct 21 09:11:46 2005
@@ -33,6 +33,16 @@
     private static final Collection<String> SUPPORTED_ANNOTATIONS =
         Collections.unmodifiableCollection(Arrays.asList(new String[]{
             JWS_PACKAGE_PREFIX + "." + WEB_SERVICE,
+            JWS_PACKAGE_PREFIX + "." + WEB_METHOD,
+            JWS_PACKAGE_PREFIX + "." + WEB_PARAM,
+            JWS_PACKAGE_PREFIX + "." + WEB_RESULT,
+            JWS_PACKAGE_PREFIX + "." + HANDLER_CHAIN,
+            JWS_PACKAGE_PREFIX + "." + ONE_WAY,
+            JWS_PACKAGE_PREFIX + "." + INIT_PARAM,
+            JWS_PACKAGE_PREFIX + ".soap." + SOAP_BINDING,
+            JWS_PACKAGE_PREFIX + ".soap." + SOAP_MESSAGE_HANDLER,
+            JWS_PACKAGE_PREFIX + ".soap." + SOAP_MESSAGE_HANDLERS,
+            JWS_PACKAGE_PREFIX + ".soap." + SOAP_PACKAGE_PREFIX,
         }));
 
     private static final Collection<String> supportedOptions = Collections.emptySet();

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/checker/Jsr181AnnotationChecker.java Fri Oct 21 09:11:46 2005
@@ -18,8 +18,13 @@
 package org.apache.beehive.wsm.processor.checker;
 
 import java.util.Collection;
+import java.util.List;
+import java.util.Iterator;
+import java.util.HashMap;
 import java.net.URL;
 import java.net.MalformedURLException;
+import java.io.InputStream;
+import java.io.IOException;
 import javax.jws.WebService;
 import javax.jws.Oneway;
 import javax.jws.WebMethod;
@@ -27,6 +32,12 @@
 import javax.jws.WebParam;
 import javax.jws.WebResult;
 import javax.jws.soap.SOAPMessageHandlers;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
 
 import com.sun.mirror.declaration.TypeDeclaration;
 import com.sun.mirror.declaration.ClassDeclaration;
@@ -38,6 +49,7 @@
 import com.sun.mirror.apt.Messager;
 import com.sun.mirror.type.VoidType;
 import com.sun.mirror.type.ReferenceType;
+import org.xml.sax.InputSource;
 
 /**
  * This class implements the logic used to "check" a web service authored using the annotations defined
@@ -211,14 +223,6 @@
         if(!intfDecl.getModifiers().contains(Modifier.PUBLIC))
             _messager.printError("Service endpoint interface must be public");
 
-        /* ensure that WebService.endpointInterface isn't set on an interface */
-/* not sure why this check was put here...
-        WebService wsAnnotation = intfDecl.getAnnotation(WebService.class);
-        if(wsAnnotation.endpointInterface() != null) {
-            _messager.printError("The endpointInterface attribute is not allowed on an interface");
-        }
-*/
-
         /* todo: handle @WebMethod annotations for customizing the mapping to a WSDL */
     }
 
@@ -268,5 +272,76 @@
      */
     private void validateWsdlContract(TypeDeclaration typeDeclaration, URL wsdlLocation) {
 
+        /* contract is defined in a WSDL and the service must be checked to ensure that it
+           adheres to that WSDL.  this includes doing checks to ensure that the methods
+           on the implementation bean map correctly to methods on the WSDL */
+        InputStream inputStream = null;
+        try {
+            WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+            WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+            inputStream = wsdlLocation.openStream();
+            InputSource inputSource = new InputSource(inputStream);
+
+            WebService wsAnnot = typeDeclaration.getAnnotation(WebService.class);
+/*
+            String serviceName = wsAnnot.serviceName();
+            if(serviceName == null)
+                serviceName = typeDeclaration.getSimpleName() + "Service";
+*/
+
+            String name = wsAnnot.name();
+            if(name == null)
+                name = typeDeclaration.getSimpleName();
+
+            Definition definition = wsdlReader.readWSDL(null, inputSource);
+            PortType portType = definition.getPortType(new QName("", name));
+
+            if(portType == null)
+                _messager.printError("Unable to find portType named \"" + name + "\" in WSDL");
+            else {
+                /*
+                Load the methods from the TypeDeclaration that are annotated with @WebMethod.
+                This makes mapping web methods to WSDL operations simpler below
+                 */
+                Collection<? extends MethodDeclaration> methods = typeDeclaration.getMethods();
+                HashMap wmMap = new HashMap();
+                Iterator iterator = methods.iterator();
+                while(iterator.hasNext()) {
+                    MethodDeclaration md = (MethodDeclaration)iterator.next();
+                    WebMethod wmAnnot = md.getAnnotation(WebMethod.class);
+                    if(wmAnnot != null)
+                        wmMap.put(wmAnnot.operationName() != null ? wmAnnot.operationName() : md.getSimpleName(), md);
+                }
+
+                /*
+                Validate the contract between the service implementation and WSDL operations
+                */
+                List operations = portType.getOperations();
+                for(int i = 0; i < operations.size(); i++) {
+                    Operation operation = (Operation)operations.get(i);
+                    MethodDeclaration md = (MethodDeclaration)wmMap.get(operation.getName());
+
+                    /* validate operation contract */
+                    if(md == null) {
+                        _messager.printError("Unable to find @WebMethod corresponding to WSDL operation named \"" + operation.getName() + "\"");
+                        continue;
+                    }
+
+                    /* check @Oneway */
+                    if(md.getAnnotation(Oneway.class) != null && operation.getOutput() != null)
+                        _messager.printError("Web service method is specified as @Oneway but the WSDL specifies outputs");
+
+                    /* todo: JAX-RPC 1.1 section 5.5.5 mapping rules */
+                }
+            }
+        }
+        catch(Exception e) {
+            _messager.printError("Caught exception validating WSDL contract on implementation bean.  Cause: " + e);
+        }
+        finally {
+            if(inputStream != null)
+                try {inputStream.close();}catch(IOException ignore) {}
+        }
     }
 }

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/WSDL2AJavaTask.java Fri Oct 21 09:11:46 2005
@@ -1,7 +1,6 @@
 /*
  * Copyright 2001-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
@@ -39,15 +38,10 @@
 
     public void execute()
         throws BuildException {
-
-        /* todo: checks to ensure that the given Files are a file and directory respectively */
-
         try {
             setClassname(WSDL2JAVA_CLASS);
-
-            /* todo: use the nested arg element here; the setArgs(...) method is deprecated */
-            setArgs(_wsdlFile.getCanonicalPath());
-            setArgs(_outputDir.getCanonicalPath());
+            createArg().setLine(_wsdlFile.getCanonicalPath());
+            createArg().setLine(_outputDir.getCanonicalPath());
             super.execute();
         }
         catch(Exception e) {

Modified: beehive/trunk/wsm/test/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/build.xml?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/build.xml (original)
+++ beehive/trunk/wsm/test/build.xml Fri Oct 21 09:11:46 2005
@@ -37,7 +37,7 @@
 
     <property name="build.gen-tests" location="${build.classes}/gen-tests"/>
 
-    <property name="webapp.dir" location="webapp"/>
+    <property name="webapp.dir" location="webapp/build"/>
 
     <property name="axis.lib.dir" location="../external/axis-1.2"/>
     <property name="drt.wsdl.file" location="${junit.src}/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl"/>
@@ -146,7 +146,7 @@
 
     <target name="run.wsdl2java" description="Generates a Java class from a wsdl.">
         <taskdef name="wsdl2AJava" 
-                 classname="org.apache.beehive.wsm.tools.wsdl2ajava.WSDL2AJavaTask" 
+                 classname="org.apache.beehive.wsm.tools.wsdl2ajava.WSDL2AJavaTask"
                  classpathref="drt.classpath"/>
 
         <wsdl2AJava outputdir="${build.gen-src-wsdl}" wsdlfile="${drt.wsdl.file}">

Copied: beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.java (from r326145, beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.jws)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.java?p2=beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.java&p1=beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.jws&r1=326145&r2=327215&rev=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.jws (original)
+++ beehive/trunk/wsm/test/src/junit-services/org/apache/beehive/wsm/jsr181/wsdl/StarWars.java Fri Oct 21 09:11:46 2005
@@ -20,21 +20,16 @@
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 
-@WebService(name="starwars",
- serviceName="starwarsService",
- targetNamespace="http://starwars")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
-             use = SOAPBinding.Use.LITERAL,
+@WebService(name = "starwars", serviceName = "starwarsService", targetNamespace = "http://starwars")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
              parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 public class StarWars {
 
     public static net.superflaco.Character stashed;
 
     @WebMethod
-    public net.superflaco.Character getChewie()
-    {
-        net.superflaco.Character chewie = net.superflaco.Character.Factory
-            .newInstance();
+    public net.superflaco.Character getChewie() {
+        net.superflaco.Character chewie = net.superflaco.Character.Factory.newInstance();
         chewie.setName("Chewbacca");
         net.superflaco.System sys = net.superflaco.System.Factory.newInstance();
         sys.addPlanet("WookieWorld");
@@ -49,47 +44,28 @@
         return chewie;
     }
 
-    @WebMethod     
-    public String viewCharName()
-    {
+    @WebMethod
+    public String viewCharName() {
         return viewChar().getName();
     }
 
     @WebMethod
-    public net.superflaco.System viewCharSystem()
-    {
+    public net.superflaco.System viewCharSystem() {
         return viewChar().getHome();
     }
 
     @WebMethod
-    public net.superflaco.Character viewChar()
-    {
-        if (stashed == null) {
+    public net.superflaco.Character viewChar() {
+        if (stashed == null)
             stashed = getChewie();
-        }
+        
         return stashed;
     }
-    /*
-    @WebMethod
-    public boolean stashCadet(net.superflaco.SpacecadetDocument cadet)
-    {
-        if (cadet != null) {
-            net.superflaco.Character ch = cadet.getSpacecadet();
-            if (ch != null && ch.getName() != null && ch.getPlanet() != null) {
-                stashChar(ch);
-                return true;
-            }
-        }
-        return false;
-        }*/
 
     @WebMethod
-    public net.superflaco.Character stashChar(@WebParam(name="character")
-                                              net.superflaco.Character ch)
-    {
-        if (stashed == null) {
+    public net.superflaco.Character stashChar(@WebParam(name = "character") net.superflaco.Character ch) {
+        if (stashed == null)
             stashed = getChewie();
-        }
 
         if (ch != null) {
             System.out.println("Chewie: " + getChewie().xmlText());
@@ -102,8 +78,7 @@
 
 
     @WebMethod
-    public net.superflaco.Character changeName(@WebParam(name="newname")
-                                               String name) {
+    public net.superflaco.Character changeName(@WebParam(name = "newname") String name) {
         net.superflaco.Character ch = viewChar();
         ch.setName(name);
         return ch;

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/WSDL2AnnotatedJavaTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/WSDL2AnnotatedJavaTest.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/WSDL2AnnotatedJavaTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/WSDL2AnnotatedJavaTest.java Fri Oct 21 09:11:46 2005
@@ -1,9 +1,6 @@
 /*
- * XmlBeanWSDLProcessorTest.java
- * 
  * Copyright 2001-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
@@ -15,9 +12,6 @@
  * 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.apache.beehive.wsm.test.jsr181.wsdl;
 

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/XmlBeanWSDLProcessorTest.java Fri Oct 21 09:11:46 2005
@@ -57,7 +57,8 @@
         }
     }
 
-    public void testServiceWideSettings() throws Exception {
+    public void testServiceWideSettings()
+        throws Exception {
 
         assertEquals(serverModel.getName(), clientModel.getName());
         assertEquals(serverModel.getServiceName(), clientModel.getServiceName());

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/wsdl/web/wsdl2javatest.wsdl Fri Oct 21 09:11:46 2005
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions targetNamespace="http://beehive.apache.org/AddressBook"
-    xmlns:apachesoap="http://xml.apache.org/xml-soap"
+<definitions
+    defaultNamespace="http://schemas.xmlsoap.org/wsdl/"
+    targetNamespace="http://beehive.apache.org/AddressBook"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:impl="http://beehive.apache.org/AddressBook"
-    xmlns:intf="http://beehive.apache.org/AddressBook"
-    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.2RC2Built on Nov 16, 2004 (12:19:44 EST)-->
-    <wsdl:types>
+    <types>
         <schema elementFormDefault="qualified" targetNamespace="http://beehive.apache.org/AddressBook" xmlns="http://www.w3.org/2001/XMLSchema">
 
             <element name="oneWayWithParam">
@@ -97,115 +97,115 @@
                 </complexType>
             </element>
         </schema>
-    </wsdl:types>
-    <wsdl:message name="getAddressFromNamesResponse">
-        <wsdl:part element="impl:getAddressFromNamesResponse" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="addEntryRequest">
-        <wsdl:part element="impl:addEntry" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="simpleNoParamMethodResponse">
-        <wsdl:part element="impl:simpleNoParamMethodResponse" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="getAddressFromNamesRequest">
-        <wsdl:part element="impl:getAddressFromNames" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="addEntryResponse">
-        <wsdl:part element="impl:addEntryResponse" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="oneWayWithNoParameterRequest">
-        <wsdl:part element="impl:oneWayWithNoParameter" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="getAddressFromNameResponse">
-        <wsdl:part element="impl:getAddressFromNameResponse" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="oneWayWithParamRequest">
-        <wsdl:part element="impl:oneWayWithParam" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="getAddressFromNameRequest">
-        <wsdl:part element="impl:getAddressFromName" name="parameters"/>
-    </wsdl:message>
-    <wsdl:message name="simpleNoParamMethodRequest">
-        <wsdl:part element="impl:simpleNoParamMethod" name="parameters"/>
-    </wsdl:message>
-    <wsdl:portType name="Service">
-        <wsdl:operation name="oneWayWithParam">
-            <wsdl:input message="impl:oneWayWithParamRequest" name="oneWayWithParamRequest"/>
-        </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="oneWayWithNoParameter">
-            <wsdl:input message="impl:oneWayWithNoParameterRequest" name="oneWayWithNoParameterRequest"/>
-        </wsdl:operation>
-        <wsdl:operation name="addEntry">
-            <wsdl:input message="impl:addEntryRequest" name="addEntryRequest"/>
-            <wsdl:output message="impl:addEntryResponse" name="addEntryResponse"/>
-        </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="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">
+    </types>
+    <message name="getAddressFromNamesResponse">
+        <part element="impl:getAddressFromNamesResponse" name="parameters"/>
+    </message>
+    <message name="addEntryRequest">
+        <part element="impl:addEntry" name="parameters"/>
+    </message>
+    <message name="simpleNoParamMethodResponse">
+        <part element="impl:simpleNoParamMethodResponse" name="parameters"/>
+    </message>
+    <message name="getAddressFromNamesRequest">
+        <part element="impl:getAddressFromNames" name="parameters"/>
+    </message>
+    <message name="addEntryResponse">
+        <part element="impl:addEntryResponse" name="parameters"/>
+    </message>
+    <message name="oneWayWithNoParameterRequest">
+        <part element="impl:oneWayWithNoParameter" name="parameters"/>
+    </message>
+    <message name="getAddressFromNameResponse">
+        <part element="impl:getAddressFromNameResponse" name="parameters"/>
+    </message>
+    <message name="oneWayWithParamRequest">
+        <part element="impl:oneWayWithParam" name="parameters"/>
+    </message>
+    <message name="getAddressFromNameRequest">
+        <part element="impl:getAddressFromName" name="parameters"/>
+    </message>
+    <message name="simpleNoParamMethodRequest">
+        <part element="impl:simpleNoParamMethod" name="parameters"/>
+    </message>
+    <portType name="Service">
+        <operation name="oneWayWithParam">
+            <input message="impl:oneWayWithParamRequest" name="oneWayWithParamRequest"/>
+        </operation>
+        <operation name="getAddressFromName">
+            <input message="impl:getAddressFromNameRequest" name="getAddressFromNameRequest"/>
+            <output message="impl:getAddressFromNameResponse" name="getAddressFromNameResponse"/>
+        </operation>
+        <operation name="oneWayWithNoParameter">
+            <input message="impl:oneWayWithNoParameterRequest" name="oneWayWithNoParameterRequest"/>
+        </operation>
+        <operation name="addEntry">
+            <input message="impl:addEntryRequest" name="addEntryRequest"/>
+            <output message="impl:addEntryResponse" name="addEntryResponse"/>
+        </operation>
+        <operation name="getAddressFromNames">
+            <input message="impl:getAddressFromNamesRequest" name="getAddressFromNamesRequest"/>
+            <output message="impl:getAddressFromNamesResponse" name="getAddressFromNamesResponse"/>
+        </operation>
+        <operation name="simpleNoParamMethod">
+            <input message="impl:simpleNoParamMethodRequest" name="simpleNoParamMethodRequest"/>
+            <output message="impl:simpleNoParamMethodResponse" name="simpleNoParamMethodResponse"/>
+        </operation>
+    </portType>
+    <binding name="ServiceSoapBinding" type="impl:Service">
         <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-        <wsdl:operation name="oneWayWithParam">
+        <operation name="oneWayWithParam">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="oneWayWithParamRequest">
+            <input name="oneWayWithParamRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-        </wsdl:operation>
-        <wsdl:operation name="getAddressFromName">
+            </input>
+        </operation>
+        <operation name="getAddressFromName">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="getAddressFromNameRequest">
+            <input name="getAddressFromNameRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="getAddressFromNameResponse">
+            </input>
+            <output name="getAddressFromNameResponse">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="oneWayWithNoParameter">
+            </output>
+        </operation>
+        <operation name="oneWayWithNoParameter">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="oneWayWithNoParameterRequest">
+            <input name="oneWayWithNoParameterRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-        </wsdl:operation>
-        <wsdl:operation name="addEntry">
+            </input>
+        </operation>
+        <operation name="addEntry">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="addEntryRequest">
+            <input name="addEntryRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="addEntryResponse">
+            </input>
+            <output name="addEntryResponse">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="getAddressFromNames">
+            </output>
+        </operation>
+        <operation name="getAddressFromNames">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="getAddressFromNamesRequest">
+            <input name="getAddressFromNamesRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="getAddressFromNamesResponse">
+            </input>
+            <output name="getAddressFromNamesResponse">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-        <wsdl:operation name="simpleNoParamMethod">
+            </output>
+        </operation>
+        <operation name="simpleNoParamMethod">
             <wsdlsoap:operation soapAction=""/>
-            <wsdl:input name="simpleNoParamMethodRequest">
+            <input name="simpleNoParamMethodRequest">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output name="simpleNoParamMethodResponse">
+            </input>
+            <output name="simpleNoParamMethodResponse">
                 <wsdlsoap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
-    </wsdl:binding>
-    <wsdl:service name="ServiceService">
-        <wsdl:port binding="impl:ServiceSoapBinding" name="Service">
+            </output>
+        </operation>
+    </binding>
+    <service name="ServiceService">
+        <port binding="impl:ServiceSoapBinding" name="Service">
             <wsdlsoap:address location="http://localhost:8080/AddressBook/web/Service.jws"/>
-        </wsdl:port>
-    </wsdl:service>
-</wsdl:definitions>
+        </port>
+    </service>
+</definitions>

Added: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java?rev=327215&view=auto
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java (added)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java Fri Oct 21 09:11:46 2005
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2001-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.apache.beehive.wsm.test.util;
+
+import java.io.InputStream;
+import java.util.Map;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.Definition;
+import javax.wsdl.xml.WSDLReader;
+
+import org.xml.sax.InputSource;
+
+/**
+ */
+public class WSDLUtil {
+
+    public static void main(String[] args)
+        throws Exception {
+
+        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+        WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+        InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("org.apache.beehive.wsm.test.jsr181.wsdl.web");
+        InputSource inputSource = new InputSource(inputStream);
+
+        Definition definition = wsdlReader.readWSDL("", inputSource);
+
+        Map bindings = definition.getBindings();
+        for(Object object : bindings.keySet()) {
+            System.out.println("binding key: " + object);
+            System.out.println("binding value: " + bindings.get(object));
+        }
+
+        inputStream.close();
+    }
+}

Propchange: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/util/WSDLUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/wsm/test/webapp/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/build.xml?rev=327215&r1=327214&r2=327215&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/build.xml (original)
+++ beehive/trunk/wsm/test/webapp/build.xml Fri Oct 21 09:11:46 2005
@@ -20,38 +20,45 @@
     <import file="../../../beehive-imports.xml"/>
     <import file="../../../ant/beehive-tools.xml"/>
 
+    <property name="schemas.dir" location="schemas"/>
+    <property name="src.dir" location="src"/>
+    <property name="src-ws.dir" location="src-ws"/>
+    <property name="web.dir" location="web"/>
+    <property name="build.dir" location="build"/>
+    <property name="classes.dir" location="${build.dir}/WEB-INF/classes"/>
+
     <target name="build">
-        <mkdir dir="${basedir}/WEB-INF/classes"/>
-        <mkdir dir="${basedir}/WEB-INF/lib"/>
+        <mkdir dir="${build.dir}/WEB-INF/classes"/>
+        <mkdir dir="${build.dir}/WEB-INF/lib"/>
+
+        <copy todir="${build.dir}">
+            <fileset dir="${web.dir}"/>
+        </copy>
 
-        <deploy-controls destDir="${basedir}/WEB-INF/lib"/>
-        <deploy-wsm webappDir="${basedir}"/>
+        <deploy-controls destDir="${build.dir}/WEB-INF/lib"/>
+        <deploy-wsm webappDir="${build.dir}"/>
 
         <path id="drt.classpath">
-            <fileset dir="${basedir}/WEB-INF/lib">
-                <include name="*.jar"/>
-            </fileset>
-            <pathelement location="${basedir}/WEB-INF/classes"/>
+            <pathelement location="${build.dir}/WEB-INF/classes"/>
+            <fileset dir="${build.dir}/WEB-INF/lib" includes="*.jar"/>
         </path>
 
-        <build-xbean classgenDir="${basedir}/WEB-INF/classes"
-                     schemaDir="${basedir}/WEB-INF/schemas"/>
+        <build-xbean classgenDir="${classes.dir}"
+                     schemaDir="${schemas.dir}"/>
 
-        <build-controls srcdir="${basedir}/WEB-INF/src"
-                        destdir="${basedir}/WEB-INF/classes"
+        <build-controls srcdir="${src.dir}"
+                        destdir="${classes.dir}"
                         classpathref="drt.classpath"
-                        tempdir="${basedir}/WEB-INF/.tmpbeansrc"/>
+                        tempdir="${build.dir}/WEB-INF/.tmpbeansrc"/>
 
-        <build-webservices srcdir="${basedir}/WEB-INF/src-ws"
-                           destdir="${basedir}/WEB-INF/classes"
-                           tempdir="${basedir}/WEB-INF/.tmpbeansrc"
+        <build-webservices srcdir="${src-ws.dir}"
+                           destdir="${classes.dir}"
+                           tempdir="${build.dir}/WEB-INF/.tmpbeansrc"
                            classpathref="drt.classpath"/>
     </target>
 
     <target name="clean">
-        <delete dir="${basedir}/WEB-INF/.tmpbeansrc"/>
-        <delete dir="${basedir}/WEB-INF/classes"/>
-        <delete dir="${basedir}/WEB-INF/lib"/>
+        <delete dir="${build.dir}"/>
     </target>
 
 </project>