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 2006/01/03 17:09:11 UTC

svn commit: r365670 [2/2] - in /beehive/trunk/wsm: src/axis/org/apache/beehive/wsm/axis/ src/axis/org/apache/beehive/wsm/axis/handlers/ src/core/org/apache/beehive/wsm/model/ src/core/org/apache/beehive/wsm/model/impl/ src/core/org/apache/beehive/wsm/m...

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/wsdl2ajava.vm
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/wsdl2ajava.vm?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/wsdl2ajava.vm (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/tools/wsdl2ajava/wsdl2ajava.vm Tue Jan  3 08:08:33 2006
@@ -83,8 +83,8 @@
 ##
 #macro( webMethod $method)
      @WebMethod(
-          operationName = "$method.wmOperationName"#if($method.wmAction),
-          action =" $method.wmAction"
+          operationName = "$method.operationName"#if($method.action),
+          action =" $method.action"
 #end
      )
 
@@ -97,8 +97,8 @@
      @Oneway
 #else 
      @WebResult(
-          name = "$method.wrName",
-          targetNamespace = "$method.wrTargetNamespace" 
+          name = "$method.name",
+          targetNamespace = "$method.targetNamespace"
      )
 #end
 #end
@@ -108,18 +108,18 @@
 ##
 ##
 #macro(params $method)
-#set($size=$method.params.size())
+#set($size=$method.parameters.size())
 #set($ctr=0)
-#foreach( $param in $method.params)
+#foreach( $param in $method.parameters)
 #set($ctr=$ctr + 1)
                @WebParam(
-                    name = "$param.wpName",
-                    targetNamespace = "$param.wpTargetNamespace",
-                    mode = WebParam.Mode.$param.wpMode,
-                    header = $param.wpHeader
+                    name = "$param.name",
+                    targetNamespace = "$param.targetNamespace",
+                    mode = WebParam.Mode.$param.mode,
+                    header = $param.header
 ## For now use the hack to get the correct name. later change this to use element  -- Daryoush
-##              )$param.javaType.name $param.wpName#if($ctr < $size), 
-               )$param.javaTypeFullName $param.wpName#if($ctr < $size), 
+##              )$param.javaType.name $param.name#if($ctr < $size),
+               )$param.javaTypeName $param.name#if($ctr < $size),
 #end
 #end
 #end
@@ -128,7 +128,7 @@
 ##	
 /* 
 This file is an Annotated java file that that is automatically generated 
-from wsdl: $webService.wsWsdlLocation
+from wsdl: $webService.wsdlLocation
 
 */
 #set($packageName="")
@@ -158,11 +158,11 @@
 #soapMsgHandlers($webService.soapHandlers)
 public class $webService.name {
 
-#foreach( $method in $webService.methods)
+#foreach( $method in $webService.operations)
       /**********************************************
        *
-#foreach( $param in $method.params)      
-       * @param $param.wpName
+#foreach( $param in $method.parameters)      
+       * @param $param.name
        *
 #end
        * @throws java.rmi.RemoteException
@@ -170,11 +170,9 @@
        ***********************************************/
 #webMethod($method)
 #results($method)
-## For now use the hack to get the correct name. later change this to use element  -- Daryoush
-##     public $method.javaReturnType.name $method.javaMethodName (#if($method.params.size() == 0)) 
-     public $method.javaReturnTypeFullName $method.javaMethodName (#if($method.params.size() == 0)) 
+     public $method.javaReturnTypeFullName $method.javaMethodName (#if($method.parameters.size() == 0))
           #if(!$method.oneWay)throws RemoteException#end {#end
-#if($method.params.size() > 0)
+#if($method.parameters.size() > 0)
 
 #params($method)
 )  

Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/util/HandlerChainParser.java Tue Jan  3 08:08:33 2006
@@ -18,15 +18,12 @@
 package org.apache.beehive.wsm.util;
 
 import java.io.InputStream;
-import java.util.HashMap;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.LinkedList;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.DocumentBuilder;
 
-import org.apache.beehive.wsm.model.BeehiveWsSOAPMessageHandlerInfo;
-import org.apache.beehive.wsm.model.impl.DefaultSOAPMessageHandlerInfoImpl;
+import org.apache.beehive.wsm.model.WsmSoapMessageHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.Element;
@@ -54,12 +51,12 @@
 
     private HandlerChainParser() {}
 
-    public List /*BeehiveWsSOAPMessageHandlerInfo*/ parse(final InputStream xmlInputStream,
+    public List /*WsmSoapMessageHandler*/ parse(final InputStream xmlInputStream,
                                                           final String xmlResourcePath) {
 
         LinkedList handlerInfoList = new LinkedList();
         Document document = null;
-        final String xsdResourcePath = "/org/apache/beehive/wsm/schemas/jsr181-handler-config.xsd";
+        final String xsdResourcePath = "org/apache/beehive/wsm/schemas/jsr181-handler-config.xsd";
         final InputStream xsdInputStream = getClass().getResourceAsStream(xsdResourcePath);
         try {
             DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
@@ -106,23 +103,26 @@
         NodeList handlerChainArray = root.getElementsByTagName("handler-chain");
         for(int j = 0; j < handlerChainArray.getLength(); j++) {
             Element handlerChain = (Element)handlerChainArray.item(j);
+
+            /* todo: who uses this? */
             String handlerChainName = DomUtils.getChildElementText(handlerChain,  "handler-chain-name");
 
             NodeList portComponentArray = handlerChain.getElementsByTagName("handler");
             for(int k = 0; k < portComponentArray.getLength(); k++) {
+                WsmSoapMessageHandler soapMessageHandler = new WsmSoapMessageHandler();
+
                 Element parent = (Element)portComponentArray.item(k);
                 String handlerName = DomUtils.getChildElementText(parent, NAMESPACE_J2EE, "handler-name");
                 String handlerClassName = DomUtils.getChildElementText(parent, NAMESPACE_J2EE, "handler-class");
 
-                HashMap<String, String> initParams = new HashMap<String, String>();
-                ArrayList<String> roles = new ArrayList<String>();
-                ArrayList<String> headers = new ArrayList<String>();
+                soapMessageHandler.setName(handlerName);
+                soapMessageHandler.setClassName(handlerClassName);
 
                 NodeList initParamList = parent.getElementsByTagNameNS(NAMESPACE_J2EE, "init-param");
                 if(initParamList != null) {
                     for(int i = 0; i < initParamList.getLength(); i++) {
                         Element initParam = (Element)initParamList.item(i);
-                        initParams.put(
+                        soapMessageHandler.addInitParam(
                             DomUtils.getChildElementText(initParam, NAMESPACE_J2EE, "param-name"),
                             DomUtils.getChildElementText(initParam, NAMESPACE_J2EE, "param-value")
                         );
@@ -132,28 +132,16 @@
                 NodeList soapHeaderList = parent.getElementsByTagNameNS(NAMESPACE_J2EE, "soap-header");
                 if(soapHeaderList != null) {
                     for(int i = 0; i < soapHeaderList.getLength(); i++)
-                        headers.add(
-                            DomUtils.getElementText((Element)soapHeaderList.item(i))
-                        );
+                        soapMessageHandler.addHeader(DomUtils.getElementText((Element)soapHeaderList.item(i)));
                 }
 
                 NodeList soapRoleList = parent.getElementsByTagNameNS(NAMESPACE_J2EE, "soap-role");
                 if(soapRoleList != null) {
                     for(int i = 0; i < soapRoleList.getLength(); i++)
-                        headers.add(
-                            DomUtils.getElementText((Element)soapRoleList.item(i))
-                        );
+                        soapMessageHandler.addRole(DomUtils.getElementText((Element)soapRoleList.item(i)));
                 }
 
-                BeehiveWsSOAPMessageHandlerInfo soapHandler =
-                    new DefaultSOAPMessageHandlerInfoImpl(handlerClassName,
-                                                          handlerName,
-                                                          initParams,
-                                                          roles,
-                                                          headers);
-
-                /* todo: doesn't seem right to have this here... */
-                handlerInfoList.add(soapHandler);
+                handlerInfoList.add(soapMessageHandler);
             }
         }
 

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/axis/AxisHookTest.java Tue Jan  3 08:08:33 2006
@@ -31,14 +31,10 @@
 import org.apache.axis.description.ParameterDesc;
 import org.apache.axis.description.ServiceDesc;
 import org.apache.beehive.wsm.axis.ServiceDescriptionFactory;
-import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsSOAPBindingInfo;
-import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
-import org.apache.beehive.wsm.model.impl.DefaultMethodMetadataImpl;
-import org.apache.beehive.wsm.model.impl.DefaultSOAPBindingInfoImpl;
-import org.apache.beehive.wsm.model.impl.DefaultTypeMetadataImpl;
-import org.apache.beehive.wsm.model.impl.DefaultParameterMetadataImpl;
+import org.apache.beehive.wsm.model.WsmOperation;
+import org.apache.beehive.wsm.model.WsmParameter;
+import org.apache.beehive.wsm.model.WsmSoapBinding;
+import org.apache.beehive.wsm.model.WsmService;
 
 /**
  *
@@ -63,7 +59,7 @@
     private ServiceDesc _serviceDescription;
 
     public void setUp() throws Exception {
-        BeehiveWsTypeMetadata wsm = configureMockService();
+        WsmService wsm = configureMockService();
         _serviceDescription = ServiceDescriptionFactory.getInstance().createServiceDescription(wsm, null);
     }
 
@@ -139,9 +135,9 @@
         }
     }
 
-    private BeehiveWsTypeMetadata configureMockService()
+    private WsmService configureMockService()
         throws Exception {
-        BeehiveWsTypeMetadata wstm = new DefaultTypeMetadataImpl();
+        WsmService wstm = new WsmService();
         wstm.setServiceClassName(WS_CLASS.getName());
         wstm.setName(WS_NAME);
         /*
@@ -151,61 +147,61 @@
         //wstm.setServiceName(WS_SERVICENAME);
         wstm.setTargetNamespace(WS_NAMESPACE);
         wstm.setSoapBinding(configureMockSoapBinding());
-        wstm.addMethod(configureMockMethod());
-        wstm.addMethod(configureMockOnewayMethod());
-        wstm.addMethod(configureMockMethodWithException());
+        wstm.addOperation(configureMockMethod());
+        wstm.addOperation(configureMockOnewayMethod());
+        wstm.addOperation(configureMockMethodWithException());
         return wstm;
     }
 
-    private BeehiveWsMethodMetadata configureMockOnewayMethod() {
-        BeehiveWsMethodMetadata wsmm = new DefaultMethodMetadataImpl();
+    private WsmOperation configureMockOnewayMethod() {
+        WsmOperation wsmm = new WsmOperation();
         wsmm.setJavaMethodName(WM_JAVAONEWAYMETHODNAME);
-        wsmm.setReturnType(void.class.getName());
-        wsmm.setWmOperationName(WM_ONEWAY + WM_OPERATION);
-        wsmm.setWmAction(WM_ONEWAY + WM_ACTION);
+        wsmm.setJavaReturnType(void.class.getName());
+        wsmm.setOperationName(WM_ONEWAY + WM_OPERATION);
+        wsmm.setAction(WM_ONEWAY + WM_ACTION);
         wsmm.setOneWay(true);
-        BeehiveWsParameterMetadata wspm = new DefaultParameterMetadataImpl();
-        wspm.setWpName(WM_ONEWAYPARAM);
-        wspm.setWpMode(WebParam.Mode.IN);
+        WsmParameter wspm = new WsmParameter();
+        wspm.setName(WM_ONEWAYPARAM);
+        wspm.setMode(WebParam.Mode.IN);
         wspm.setJavaType(Boolean.class.getName());
-        wsmm.addParam(wspm);
+        wsmm.addParameter(wspm);
         return wsmm;
     }
 
-    private BeehiveWsMethodMetadata configureMockMethod() {
-        BeehiveWsMethodMetadata wsmm = new DefaultMethodMetadataImpl();
+    private WsmOperation configureMockMethod() {
+        WsmOperation wsmm = new WsmOperation();
         wsmm.setJavaMethodName(WM_JAVAMETHODNAME);
-        wsmm.setReturnType(String.class.getName());
-        wsmm.setWmOperationName(WM_OPERATION);
-        wsmm.setWmAction(WM_ACTION);
-        wsmm.setWrName(WM_RESULT);
+        wsmm.setJavaReturnType(String.class.getName());
+        wsmm.setOperationName(WM_OPERATION);
+        wsmm.setAction(WM_ACTION);
+        wsmm.setName(WM_RESULT);
         wsmm.setOneWay(false);
-        BeehiveWsParameterMetadata wspm = new DefaultParameterMetadataImpl();
-        wspm.setWpName(WM_TWOWAYPARAM);
-        wspm.setWpMode(WebParam.Mode.INOUT);
+        WsmParameter wspm = new WsmParameter();
+        wspm.setName(WM_TWOWAYPARAM);
+        wspm.setMode(WebParam.Mode.INOUT);
         wspm.setJavaType(javax.xml.rpc.holders.IntHolder.class.getName());
-        wsmm.addParam(wspm);
+        wsmm.addParameter(wspm);
         return wsmm;
     }
 
-    private BeehiveWsMethodMetadata configureMockMethodWithException() {
-        BeehiveWsMethodMetadata wsmm = new DefaultMethodMetadataImpl();
+    private WsmOperation configureMockMethodWithException() {
+        WsmOperation wsmm = new WsmOperation();
         wsmm.setJavaMethodName(WM_JAVAMETHODWITHEXCEPIONNAME);
-        wsmm.setReturnType(String.class.getName());
-        wsmm.setWmOperationName(WM_EXCEPTION + WM_OPERATION);
-        wsmm.setWmAction(WM_EXCEPTION + WM_ACTION);
-        wsmm.setWrName(WM_RESULT);
+        wsmm.setJavaReturnType(String.class.getName());
+        wsmm.setOperationName(WM_EXCEPTION + WM_OPERATION);
+        wsmm.setAction(WM_EXCEPTION + WM_ACTION);
+        wsmm.setName(WM_RESULT);
         wsmm.setOneWay(false);
-        BeehiveWsParameterMetadata wspm = new DefaultParameterMetadataImpl();
-        wspm.setWpName(WM_TWOWAYPARAM);
-        wspm.setWpMode(WebParam.Mode.INOUT);
+        WsmParameter wspm = new WsmParameter();
+        wspm.setName(WM_TWOWAYPARAM);
+        wspm.setMode(WebParam.Mode.INOUT);
         wspm.setJavaType(javax.xml.rpc.holders.IntHolder.class.getName());
-        wsmm.addParam(wspm);
+        wsmm.addParameter(wspm);
         return wsmm;
     }
 
-    private BeehiveWsSOAPBindingInfo configureMockSoapBinding() {
-        BeehiveWsSOAPBindingInfo sbi = new DefaultSOAPBindingInfoImpl();
+    private WsmSoapBinding configureMockSoapBinding() {
+        WsmSoapBinding sbi = new WsmSoapBinding();
         sbi.setStyle(SOAPBinding.Style.DOCUMENT);
         sbi.setUse(SOAPBinding.Use.LITERAL);
         sbi.setParameterStyle(SOAPBinding.ParameterStyle.WRAPPED);

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/AbstractModelTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/AbstractModelTest.java?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/AbstractModelTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/AbstractModelTest.java Tue Jan  3 08:08:33 2006
@@ -18,11 +18,12 @@
 package org.apache.beehive.wsm.test.jsr181.model;
 
 import java.util.Collection;
+import java.util.List;
 
 import junit.framework.TestCase;
-import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
+import org.apache.beehive.wsm.model.WsmOperation;
+import org.apache.beehive.wsm.model.WsmParameter;
+import org.apache.beehive.wsm.model.WsmService;
 
 /**
  *
@@ -30,24 +31,27 @@
 abstract class AbstractModelTest
     extends TestCase {
 
-    protected abstract BeehiveWsTypeMetadata getWebServiceMetadata();
+    protected abstract WsmService getWebServiceMetadata();
 
-    protected BeehiveWsMethodMetadata getMethod(String methodName) {
-        BeehiveWsTypeMetadata wsMetadata = getWebServiceMetadata();
-        for (BeehiveWsMethodMetadata method : wsMetadata.getMethods())
-            if (methodName.equals(method.getWmOperationName()))
+    protected WsmOperation getMethod(String methodName) {
+        WsmService wsMetadata = getWebServiceMetadata();
+        List operations = wsMetadata.getOperations();
+        for(int i = 0; i < operations.size(); i++) {
+            WsmOperation method = (WsmOperation)operations.get(i);
+            if (methodName.equals(method.getOperationName()))
                 return method;
+        }
         return null;
     }
 
-    protected BeehiveWsParameterMetadata getParam(String methodName, int pos) {
+    protected WsmParameter getParam(String methodName, int pos) {
         assert pos >= 0;
-        BeehiveWsTypeMetadata wsMetadata = getWebServiceMetadata();
+        WsmService wsMetadata = getWebServiceMetadata();
 
-        Collection<? extends BeehiveWsMethodMetadata> webMethods = wsMetadata.getMethods();
-        for (BeehiveWsMethodMetadata method : webMethods)
-            if (methodName.equals(method.getWmOperationName()))
-                return method.getParams().get(pos);
+        Collection<? extends WsmOperation> webMethods = wsMetadata.getOperations();
+        for (WsmOperation method : webMethods)
+            if (methodName.equals(method.getOperationName()))
+                return (WsmParameter)method.getParameters().get(pos);
         return null;
     }
 }

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/EndpointInterfaceServiceTest.java Tue Jan  3 08:08:33 2006
@@ -17,11 +17,9 @@
  */
 package org.apache.beehive.wsm.test.jsr181.model;
 
-import java.util.Collection;
-import junit.framework.TestCase;
-import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
+import org.apache.beehive.wsm.model.WsmService;
+import org.apache.beehive.wsm.model.WsmOperation;
+import org.apache.beehive.wsm.model.WsmParameter;
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 
 /**
@@ -32,7 +30,7 @@
 
     private static final String CLASSNAME = "web.EndpointInterfaceService";
 
-    private BeehiveWsTypeMetadata _objectModel;
+    private WsmService _objectModel;
 
     public void setUp()
         throws Exception {
@@ -55,13 +53,13 @@
 
     public void testWebMethodGoLoco()
         throws Exception {
-        BeehiveWsMethodMetadata method = getMethod("GoLoco");
+        WsmOperation method = getMethod("GoLoco");
         assertNull("WebMethod GoLoco() must be null", method);
         method = getMethod("GoLocoCheetorama");
         assertNotNull("Cannot find WebMethod GoLocoCheetorama();", method);
-        assertEquals("Invalid wmAction;", "LocoActionCheetorama", method.getWmAction());
+        assertEquals("Invalid wmAction;", "LocoActionCheetorama", method.getAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Invalid wrName;", "return", method.getWrName());
+        assertEquals("Invalid wrName;", "return", method.getName());
         assertEquals("Invalid return type;",
                      boolean.class.getName(),
                      method.getJavaReturnType());
@@ -69,11 +67,11 @@
 
     public void testWebMethodGoHome()
         throws Exception {
-        BeehiveWsMethodMetadata method = getMethod("goHome");
+        WsmOperation method = getMethod("goHome");
         assertNotNull("Cannot find WebMethod goHome();", method);
-        assertEquals("Invalid wmAction;", "", method.getWmAction());
+        assertEquals("Invalid wmAction;", "", method.getAction());
         assertTrue("Cannot find @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getName());
         assertEquals("Unexpected return type;",
                      void.class.getName(),
                      method.getJavaReturnType());
@@ -86,11 +84,11 @@
      */
     public void testWebMethodDropMoney()
         throws Exception {
-        BeehiveWsMethodMetadata method = getMethod("dropMoney");
+        WsmOperation method = getMethod("dropMoney");
         assertNotNull("Cannot find WebMethod dropMoney();", method);
-        assertEquals("Invalid wmAction;", "", method.getWmAction());
+        assertEquals("Invalid wmAction;", "", method.getAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getName());
         assertEquals("Unexpected return type;",
                      int.class.getName(),
                      method.getJavaReturnType());
@@ -98,9 +96,9 @@
 
     public void testWebParamGoLocoFirst()
         throws Exception {
-        BeehiveWsParameterMetadata param = getParam("GoLocoCheetorama", 0);
+        WsmParameter param = getParam("GoLocoCheetorama", 0);
         assertNotNull("Cannot find first param for WebMethod GoLoco();", param);
-        assertEquals("Invalid wpName;", "level", param.getWpName());
+        assertEquals("Invalid wpName;", "level", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      int.class.getName(),
                      param.getJavaType());
@@ -108,9 +106,9 @@
 
     public void testWebParamGoLocoSecond()
         throws Exception {
-        BeehiveWsParameterMetadata param = getParam("GoLocoCheetorama", 1);
+        WsmParameter param = getParam("GoLocoCheetorama", 1);
         assertNotNull("Cannot find second param for WebMethod GoLoco();", param);
-        assertEquals("Invalid wpName;", "detailCheetorama", param.getWpName());
+        assertEquals("Invalid wpName;", "detailCheetorama", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      String.class.getName(),
                      param.getJavaType());
@@ -118,9 +116,9 @@
 
     public void testWebParamGoHomeFirst()
         throws Exception {
-        BeehiveWsParameterMetadata param = getParam("goHome", 0);
+        WsmParameter param = getParam("goHome", 0);
         assertNotNull("Cannot find first param for method goHome();", param);
-        assertEquals("Invalid wpName;", "whenCheetorama", param.getWpName());
+        assertEquals("Invalid wpName;", "whenCheetorama", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      long.class.getName(),
                      param.getJavaType());
@@ -128,15 +126,15 @@
 
     public void testWebParamDropMoneyFirst()
         throws Exception {
-        BeehiveWsParameterMetadata param = getParam("dropMoney", 0);
+        WsmParameter param = getParam("dropMoney", 0);
         assertNotNull("Cannot find first param for method dropMoney();", param);
-        assertEquals("Invalid wpName;", "amount", param.getWpName());
+        assertEquals("Invalid wpName;", "amount", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      int.class.getName(),
                      param.getJavaType());
     }
 
-    protected BeehiveWsTypeMetadata getWebServiceMetadata() {
+    protected WsmService getWebServiceMetadata() {
         return _objectModel;
     }
 }

Modified: beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java?rev=365670&r1=365669&r2=365670&view=diff
==============================================================================
--- beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java (original)
+++ beehive/trunk/wsm/test/src/junit/org/apache/beehive/wsm/test/jsr181/model/ImplementationBeanServiceTest.java Tue Jan  3 08:08:33 2006
@@ -17,9 +17,9 @@
  */
 package org.apache.beehive.wsm.test.jsr181.model;
 
-import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
+import org.apache.beehive.wsm.model.WsmService;
+import org.apache.beehive.wsm.model.WsmOperation;
+import org.apache.beehive.wsm.model.WsmParameter;
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 
 /**
@@ -34,7 +34,7 @@
 
     private static final String CLASSNAME = "web.ImplementationBeanService";
 
-    private BeehiveWsTypeMetadata _objectModel;
+    private WsmService _objectModel;
 
     public void setUp()
         throws Exception {
@@ -59,11 +59,11 @@
     }
 
     public void testWebMethodGoLoco() {
-        BeehiveWsMethodMetadata method = getMethod("GoLoco");
+        WsmOperation method = getMethod("GoLoco");
         assertNotNull("Cannot find WebMethod GoLoco();", method);
-        assertEquals("Invalid wmAction;", "LocoAction", method.getWmAction());
+        assertEquals("Invalid wmAction;", "LocoAction", method.getAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Invalid wrName;", "return", method.getWrName());
+        assertEquals("Invalid wrName;", "return", method.getName());
         assertEquals("Invalid return type;",
                      boolean.class.getName(),
                      method.getJavaReturnType());
@@ -71,11 +71,11 @@
 
     public void testWebMethodGoHome()
         throws Exception {
-        BeehiveWsMethodMetadata method = getMethod("goHome");
+        WsmOperation method = getMethod("goHome");
         assertNotNull("Cannot find WebMethod goHome();", method);
-        assertEquals("Invalid wmAction;", "", method.getWmAction());
+        assertEquals("Invalid wmAction;", "", method.getAction());
         assertTrue("Cannot find @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getName());
         assertEquals("Unexpected return type;",
                      void.class.getName(),
                      method.getJavaReturnType());
@@ -84,9 +84,9 @@
     public void testWebParamGoLocoFirst()
         throws Exception {
         final int paramNo = 0;
-        BeehiveWsParameterMetadata param = getParam("GoLoco", paramNo);
+        WsmParameter param = getParam("GoLoco", paramNo);
         assertNotNull("Cannot find first param for WebMethod GoLoco();", param);
-        assertEquals("Invalid wpName;", "level", param.getWpName());
+        assertEquals("Invalid wpName;", "level", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      int.class.getName(),
                      param.getJavaType());
@@ -95,9 +95,9 @@
     public void testWebParamGoLocoSecond()
         throws Exception {
         final int paramNo = 1;
-        BeehiveWsParameterMetadata param = getParam("GoLoco", paramNo);
+        WsmParameter param = getParam("GoLoco", paramNo);
         assertNotNull("Cannot find second param for WebMethod GoLoco();", param);
-        assertEquals("Invalid wpName;", "detail", param.getWpName());
+        assertEquals("Invalid wpName;", "detail", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      String.class.getName(),
                      param.getJavaType());
@@ -106,15 +106,15 @@
     public void testWebParamGoHomeFirst()
         throws Exception {
         final int paramNo = 0;
-        BeehiveWsParameterMetadata param = getParam("goHome", paramNo);
+        WsmParameter param = getParam("goHome", paramNo);
         assertNotNull("Cannot find first param for method goHome();", param);
-        assertEquals("Invalid wpName;", "when", param.getWpName());
+        assertEquals("Invalid wpName;", "when", param.getName());
         assertEquals("Invalid return type: " + param.getJavaType(),
                      long.class.getName(),
                      param.getJavaType());
     }
 
-    protected BeehiveWsTypeMetadata getWebServiceMetadata() {
+    protected WsmService getWebServiceMetadata() {
         return _objectModel;
     }
 }

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=365670&r1=365669&r2=365670&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 Tue Jan  3 08:08:33 2006
@@ -21,9 +21,9 @@
 import java.util.Iterator;
 
 import junit.framework.TestCase;
-import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
+import org.apache.beehive.wsm.model.WsmOperation;
+import org.apache.beehive.wsm.model.WsmParameter;
+import org.apache.beehive.wsm.model.WsmService;
 import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 import org.apache.beehive.wsm.wsdl.Utilities;
@@ -37,8 +37,8 @@
 
     private static final String CLASSNAME = "org.apache.beehive.wsm.jsr181.wsdl.StarWars";
 
-    private BeehiveWsTypeMetadata _serverModel;
-    private BeehiveWsTypeMetadata _clientModel;
+    private WsmService _serverModel;
+    private WsmService _clientModel;
 
     public void setUp()
         throws Exception {
@@ -76,59 +76,59 @@
     public void testMethodLevelSettings()
         throws Exception {
 
-        Collection<? extends BeehiveWsMethodMetadata> serverMethods = _serverModel.getMethods();
-        Collection<? extends BeehiveWsMethodMetadata> clientMethods = _clientModel.getMethods();
+        Collection<? extends WsmOperation> serverMethods = _serverModel.getOperations();
+        Collection<? extends WsmOperation> clientMethods = _clientModel.getOperations();
         assertEquals(serverMethods.size(), clientMethods.size());
-        for (BeehiveWsMethodMetadata wmm : serverMethods) {
+        for (WsmOperation wmm : serverMethods) {
 
-            List<BeehiveWsParameterMetadata> params = wmm.getParams();
+            List<WsmParameter> params = wmm.getParameters();
             String[] paramClasses = new String[params.size()];
             int pcIndex = 0;
-            for (BeehiveWsParameterMetadata param : params)
+            for (WsmParameter param : params)
                 paramClasses[pcIndex] = param.getJavaType();
 
-            BeehiveWsMethodMetadata clientMethod = _clientModel.getMethod(wmm.getWmOperationName(), paramClasses);
+            WsmOperation clientMethod = _clientModel.getOperation(wmm.getOperationName(), paramClasses);
             boolean paramStylesMatch =
                 (_clientModel.getSoapBinding().getParameterStyle() == _serverModel.getSoapBinding().getParameterStyle());
 
             if (clientMethod != null && paramStylesMatch) {
                 compareMethodMetadata(wmm, clientMethod);
-                compareParameterMetadata(params, clientMethod.getParams());
+                compareParameterMetadata(params, clientMethod.getParameters());
             }
             else {
-                assertFalse("a matching client method for " + wmm.getWmOperationName()
+                assertFalse("a matching client method for " + wmm.getOperationName()
                             + " could not be found and the Soap bindings match.",
                             paramStylesMatch);
             }
         }
     }
 
-    private void compareMethodMetadata(BeehiveWsMethodMetadata server,
-                                       BeehiveWsMethodMetadata client)
+    private void compareMethodMetadata(WsmOperation server,
+                                       WsmOperation client)
         throws Exception {
 
-        assertEquals(server.getWmOperationName(), client.getWmOperationName());
+        assertEquals(server.getOperationName(), client.getOperationName());
         assertEquals(server.isOneWay(), client.isOneWay());
         assertEquals(server.getJavaReturnType(), client.getJavaReturnType());
-        assertEquals(server.getWrTargetNamespace(), client.getWrTargetNamespace());
-        assertEquals(server.getWrName(), client.getWrName());
+        assertEquals(server.getTargetNamespace(), client.getTargetNamespace());
+        assertEquals(server.getName(), client.getName());
     }
 
-    private void compareParameterMetadata(List<BeehiveWsParameterMetadata> serverParams,
-                                          List<BeehiveWsParameterMetadata> clientParams) {
+    private void compareParameterMetadata(List<WsmParameter> serverParams,
+                                          List<WsmParameter> clientParams) {
 
         assertEquals(serverParams.size(), clientParams.size());
-        Iterator<BeehiveWsParameterMetadata> servIt = serverParams.iterator();
-        Iterator<BeehiveWsParameterMetadata> clientIt = clientParams.iterator();
+        Iterator<WsmParameter> servIt = serverParams.iterator();
+        Iterator<WsmParameter> clientIt = clientParams.iterator();
         while (servIt.hasNext() && clientIt.hasNext()) {
-            BeehiveWsParameterMetadata srvParam = servIt.next();
-            BeehiveWsParameterMetadata clParam = clientIt.next();
+            WsmParameter srvParam = servIt.next();
+            WsmParameter clParam = clientIt.next();
             assertEquals(srvParam.getJavaType(), clParam.getJavaType());
-            assertEquals(srvParam.getWpMode(), clParam.getWpMode());
-            assertEquals(srvParam.getWpName(), clParam.getWpName());
-            assertEquals(srvParam.getWpTargetNamespace(), clParam.getWpTargetNamespace());
-            assertEquals(srvParam.isWpHeader(),
-                         clParam.isWpHeader());
+            assertEquals(srvParam.getMode(), clParam.getMode());
+            assertEquals(srvParam.getName(), clParam.getName());
+            assertEquals(srvParam.getTargetNamespace(), clParam.getTargetNamespace());
+            assertEquals(srvParam.isHeader(),
+                         clParam.isHeader());
         }
     }
 }