axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r357939 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/databinding/utils/ codegen/src/org/apache/axis2/rpc/client/ codegen/src/org/apache/axis2/rpc/receivers/ core/src/org/apache/axis2/context/ core/src/org/apache/...
Date Tue, 20 Dec 2005 09:15:22 GMT
Author: deepal
Date: Tue Dec 20 01:14:50 2005
New Revision: 357939

URL: http://svn.apache.org/viewcvs?rev=357939&view=rev
Log:
fixed the problem with msgContext resume
removed unused methods
moved execution chain invoking logic into AxisEngine since having logic in msgConetxt not
so nice
Added two method to axisEngine to support execution pauseing and resume in addition to that
added a varaiable to msgConetxt to have a idea of which flow it is in
fixed compile errors in JSPs
Rename BeanSerializerUtil to BeanUtil since that does both serializing and de-serializing


Added:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanUtil.java
      - copied, changed from r357920, webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanSerializerUtil.java
Removed:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanSerializerUtil.java
Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/MultirefHelper.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/client/RPCCall.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/core/webapp/LeftFrame.jsp
    webservices/axis2/trunk/java/modules/core/webapp/listGroupService.jsp
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/ADBPullParser.java
Tue Dec 20 01:14:50 2005
@@ -330,7 +330,7 @@
         } else if (object instanceof OMElement) {
             childPullParser = ((OMElement) object).getXMLStreamReader();
         } else {
-            childPullParser = BeanSerializerUtil.getPullParser(object, qname);
+            childPullParser = BeanUtil.getPullParser(object, qname);
         }
         return childPullParser;
     }

Copied: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanUtil.java
(from r357920, webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanSerializerUtil.java)
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanUtil.java?p2=webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanUtil.java&p1=webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanSerializerUtil.java&r1=357920&r2=357939&rev=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanSerializerUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/BeanUtil.java
Tue Dec 20 01:14:50 2005
@@ -38,7 +38,7 @@
 import java.util.Iterator;
 
 
-public class BeanSerializerUtil {
+public class BeanUtil {
 
     /**
      * To Serilize Bean object this method is used, this will create an object array using
given
@@ -312,7 +312,7 @@
                     } else if (SimpleTypeMapper.isArrayList(classType)) {
                         retObjs[count] = SimpleTypeMapper.getArrayList(omElement);
                     } else {
-                        retObjs[count] = BeanSerializerUtil.deserialize(classType, omElement);
+                        retObjs[count] = BeanUtil.deserialize(classType, omElement);
                     }
                 }
             }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/MultirefHelper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/MultirefHelper.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/MultirefHelper.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/utils/MultirefHelper.java
Tue Dec 20 01:14:50 2005
@@ -18,7 +18,7 @@
 package org.apache.axis2.databinding.utils;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.databinding.typemapping.SimpleTypeMapper;
 import org.apache.axis2.om.OMAttribute;
 import org.apache.axis2.om.OMElement;
@@ -124,7 +124,7 @@
                 return  valobj;
             }
             else {
-                Object obj = BeanSerializerUtil.deserialize(javatype,val,this);
+                Object obj = BeanUtil.deserialize(javatype,val,this);
                 objectmap.put(id,obj);
                 return obj;
             }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/client/RPCCall.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/client/RPCCall.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/client/RPCCall.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/client/RPCCall.java
Tue Dec 20 01:14:50 2005
@@ -25,7 +25,7 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.soap.SOAPEnvelope;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.wsdl.WSDLConstants;
 
 import javax.xml.namespace.QName;
@@ -77,7 +77,7 @@
         opDesc = createOpDescAndFillInFlowInformation(opDesc, opName.getLocalPart(),
                 WSDLConstants.MEP_CONSTANT_IN_OUT);
         opDesc.setParent(getServiceContext().getAxisService());
-        MessageContext msgctx = prepareTheSOAPEnvelope(BeanSerializerUtil.getOMElement(opName,
args));
+        MessageContext msgctx = prepareTheSOAPEnvelope(BeanUtil.getOMElement(opName, args));
 
         this.lastResponseMsgCtx = super.invokeBlocking(opDesc, msgctx);
         SOAPEnvelope resEnvelope = lastResponseMsgCtx.getEnvelope();
@@ -106,10 +106,10 @@
         opDesc = createOpDescAndFillInFlowInformation(opDesc, opName.getLocalPart(),
                 WSDLConstants.MEP_CONSTANT_IN_OUT);
         opDesc.setParent(getServiceContext().getAxisService());
-        MessageContext msgctx = prepareTheSOAPEnvelope(BeanSerializerUtil.getOMElement(opName,
args));
+        MessageContext msgctx = prepareTheSOAPEnvelope(BeanUtil.getOMElement(opName, args));
         this.lastResponseMsgCtx = super.invokeBlocking(opDesc, msgctx);
         SOAPEnvelope resEnvelope = lastResponseMsgCtx.getEnvelope();
-        return BeanSerializerUtil.deserialize(resEnvelope.getBody().getFirstElement(), returnTypes);
+        return BeanUtil.deserialize(resEnvelope.getBody().getFirstElement(), returnTypes);
     }
 
     /**
@@ -130,7 +130,7 @@
         AxisOperation opDesc =
                 getServiceContext().getAxisService().getOperation(opName);
         opDesc = createOpDescAndFillInFlowInformation(opDesc, opName.getLocalPart(), WSDLConstants.MEP_CONSTANT_IN_OUT);
-        MessageContext msgctx = prepareTheSOAPEnvelope(BeanSerializerUtil.getOMElement(opName,
args));
+        MessageContext msgctx = prepareTheSOAPEnvelope(BeanUtil.getOMElement(opName, args));
         //call the underline implementation
         super.invokeNonBlocking(opDesc, msgctx, callback);
     }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
Tue Dec 20 01:14:50 2005
@@ -22,7 +22,7 @@
 package org.apache.axis2.rpc.receivers;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.databinding.typemapping.SimpleTypeMapper;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
@@ -119,11 +119,11 @@
 
     private Object[] processRequest(OMElement methodElement) throws AxisFault {
         Class[] parameters = method.getParameterTypes();
-        return   BeanSerializerUtil.deserialize(methodElement,parameters);
+        return   BeanUtil.deserialize(methodElement,parameters);
     }
 
     private OMElement getResponseElement(QName resname, Object [] objs){
-        return BeanSerializerUtil.getOMElement(resname,objs);
+        return BeanUtil.getOMElement(resname,objs);
     }
 
     private void processResponse(Object resObject, OMElement bodyContent, OMNamespace ns,
SOAPEnvelope envelope) {
@@ -142,7 +142,7 @@
                 bodyContent = getSOAPFactory().createOMElement(
                         method.getName() + "Response", ns);
                 // Java Beans
-                XMLStreamReader xr = BeanSerializerUtil.getPullParser(resObject,
+                XMLStreamReader xr = BeanUtil.getPullParser(resObject,
                         new QName(RETURN_WRAPPER));
                 StAXOMBuilder stAXOMBuilder =
                         OMXMLBuilderFactory.createStAXOMBuilder(

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
Tue Dec 20 01:14:50 2005
@@ -21,17 +21,8 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.MessageInformationHeaders;
 import org.apache.axis2.addressing.RelatesTo;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.engine.Handler;
 import org.apache.axis2.soap.SOAP11Constants;
 import org.apache.axis2.soap.SOAP12Constants;
 import org.apache.axis2.soap.SOAPEnvelope;
@@ -43,6 +34,11 @@
  * MessageContext holds service specific state information.
  */
 public class MessageContext extends AbstractContext {
+
+    public final static int IN_FLOW = 1;
+
+    public final static int OUT_FLOW = 2;
+
     public static final String TRANSPORT_HEADERS = "TRANSPORT_HEADERS";
 
     /**
@@ -83,6 +79,9 @@
      */
     public static final String DEFAULT_CHAR_SET_ENCODING = UTF_8;
 
+    //to keep a ref to figure out which path your are in the execution (send or receive)
+    public int FLOW = IN_FLOW;
+
     /**
      * Field processingFault
      */
@@ -221,24 +220,6 @@
         }
     }
 
-    public void invoke() throws AxisFault {
-        if (currentHandlerIndex == -1) {
-            currentHandlerIndex = 0;
-        }
-
-        while (currentHandlerIndex < executionChain.size()) {
-            Handler currentHandler = (Handler) executionChain.get(currentHandlerIndex);
-
-            currentHandler.invoke(this);
-
-            if (paused) {
-                break;
-            }
-
-            currentHandlerIndex++;
-        }
-    }
-
     /**
      * Pause the execution of the current handler chain
      */
@@ -246,11 +227,6 @@
         paused = true;
     }
 
-    public void resume() throws AxisFault {
-        paused = false;
-        invoke();
-    }
-
     public AxisOperation getAxisOperation() {
         return axisOperation;
     }
@@ -660,6 +636,10 @@
         return paused;
     }
 
+    public void setPaused(boolean paused) {
+        this.paused = paused;
+    }
+
     /**
      * @return Returns boolean.
      */
@@ -936,5 +916,14 @@
 
     public void setWSAMessageId(String messageID) {
         messageInformationHeaders.setMessageId(messageID);
+    }
+
+    //to get the flow inwhich the execution chain below
+    public int getFLOW() {
+        return FLOW;
+    }
+
+    public void setFLOW(int FLOW) {
+        this.FLOW = FLOW;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
Tue Dec 20 01:14:50 2005
@@ -26,15 +26,7 @@
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.soap.SOAP11Constants;
-import org.apache.axis2.soap.SOAP12Constants;
-import org.apache.axis2.soap.SOAPEnvelope;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultCode;
-import org.apache.axis2.soap.SOAPFaultDetail;
-import org.apache.axis2.soap.SOAPFaultReason;
-import org.apache.axis2.soap.SOAPHeaderBlock;
-import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.*;
 import org.apache.axis2.transport.TransportSender;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -317,7 +309,8 @@
         // we got above.  This allows individual message processing to change the chain without
         // affecting later messages.
         msgContext.setExecutionChain((ArrayList) preCalculatedPhases.clone());
-        msgContext.invoke();
+        msgContext.setFLOW(MessageContext.IN_FLOW);
+        invoke(msgContext);
 
         if (msgContext.isServerSide() && !msgContext.isPaused()) {
 
@@ -331,6 +324,70 @@
     }
 
     /**
+     * Take the execution chain from the msgContext , and then take the current Index
+     * and invoke all the phases in the arraylist
+     * if the msgContext is pauesd then the execution will be breaked
+     *
+     * @param msgContext
+     * @throws AxisFault
+     */
+    public void invoke(MessageContext msgContext) throws AxisFault {
+        if (msgContext.getCurrentHandlerIndex() == -1) {
+            msgContext.setCurrentHandlerIndex(0);
+        }
+        int currentHandlerIndex;
+        while (msgContext.getCurrentHandlerIndex() < msgContext.getExecutionChain().size())
{
+            //todo : This might cause for performance drawback
+            Handler currentHandler = (Handler) msgContext.getExecutionChain().
+                    get(msgContext.getCurrentHandlerIndex());
+            currentHandler.invoke(msgContext);
+
+            if (msgContext.isPaused()) {
+                break;
+            }
+            msgContext.setCurrentHandlerIndex(msgContext.getCurrentHandlerIndex() + 1);
+        }
+    }
+
+    /**
+     * If the msgConetext is puased and try to invoke then
+     * first invoke the phase list and after the message receiver
+     *
+     * @param msgContext
+     * @throws AxisFault
+     */
+    public void resumeReceive(MessageContext msgContext) throws AxisFault {
+        //invoke the phases
+        invoke(msgContext);
+        //invoking the MR
+        if (msgContext.isServerSide() && !msgContext.isPaused()) {
+            // invoke the Message Receivers
+            checkMustUnderstand(msgContext);
+            MessageReceiver receiver = msgContext.getAxisOperation().getMessageReceiver();
+            receiver.receive(msgContext);
+        }
+    }
+
+    /**
+     * To resume the invocation at the send path , this is neened since it is require to
call
+     * TranportSender at the end
+     *
+     * @param msgContext
+     */
+    public void resumeSend(MessageContext msgContext) throws AxisFault {
+        //invoke the phases
+        invoke(msgContext);
+        //Invoking Tarnsport Sender
+        if (!msgContext.isPaused()) {
+            // write the Message to the Wire
+            TransportOutDescription transportOut = msgContext.getTransportOut();
+            TransportSender sender = transportOut.getSender();
+            sender.invoke(msgContext);
+        }
+    }
+
+
+    /**
      * This is invoked when a SOAP Fault is received from a Other SOAP Node
      * Receives a SOAP fault from another SOAP node.
      *
@@ -342,7 +399,12 @@
     }
 
     public void resume(MessageContext msgctx) throws AxisFault {
-        msgctx.resume();
+        msgctx.setPaused(false);
+        if (msgctx.getFLOW() == MessageContext.IN_FLOW) {
+            resumeReceive(msgctx);
+        } else {
+            resumeSend(msgctx);
+        }
     }
 
     /**
@@ -361,13 +423,14 @@
         // find and invoke the Phases
         OperationContext operationContext = msgContext.getOperationContext();
         ArrayList executionChain = operationContext.getAxisOperation().getPhasesOutFlow();
-
-        msgContext.setExecutionChain((ArrayList) executionChain.clone());
-        msgContext.invoke();
-        msgContext
-                .setExecutionChain((ArrayList) msgContext.getConfigurationContext()
-                        .getAxisConfiguration().getGlobalOutPhases().clone());
-        msgContext.invoke();
+        //rather than having two steps added both oparation and global chain together
+        ArrayList outPhases = new ArrayList();
+        outPhases.addAll((ArrayList) executionChain.clone());
+        outPhases.addAll((ArrayList) msgContext.getConfigurationContext()
+                .getAxisConfiguration().getGlobalOutPhases().clone());
+        msgContext.setExecutionChain(outPhases);
+        msgContext.setFLOW(MessageContext.OUT_FLOW);
+        invoke(msgContext);
 
         if (!msgContext.isPaused()) {
 
@@ -394,7 +457,8 @@
             ArrayList faultExecutionChain = axisOperation.getPhasesOutFaultFlow();
 
             msgContext.setExecutionChain((ArrayList) faultExecutionChain.clone());
-            msgContext.invoke();
+            msgContext.setFLOW(MessageContext.OUT_FLOW);
+            invoke(msgContext);
         }
 
         // TODO: Make this clearer - should we have transport senders and messagereceivers
as Handlers?
@@ -405,12 +469,6 @@
 
             sender.invoke(msgContext);
         }
-    }
-
-    private String getReceiverFaultCode(String soapNamespace) {
-        return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapNamespace)
-                ? SOAP12Constants.FAULT_CODE_RECEIVER
-                : SOAP11Constants.FAULT_CODE_RECEIVER;
     }
 
     private String getSenderFaultCode(String soapNamespace) {

Modified: webservices/axis2/trunk/java/modules/core/webapp/LeftFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/LeftFrame.jsp?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/LeftFrame.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/LeftFrame.jsp Tue Dec 20 01:14:50 2005
@@ -55,7 +55,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="listServciceGroups">Available ServiceGroups</a>
+      <a href="listServciceGroups">Available Service Groups</a>
     </td>
  </tr>
  <tr>

Modified: webservices/axis2/trunk/java/modules/core/webapp/listGroupService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/listGroupService.jsp?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/listGroupService.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/listGroupService.jsp Tue Dec 20 01:14:50
2005
@@ -1,35 +1,39 @@
-<%@ page import="org.apache.axis2.Constants"%>
-<%@ page import="org.apache.axis2.description.AxisOperation"%>
-<%@ page import="org.apache.axis2.description.AxisService"%>
-<%@ page import="org.apache.axis2.description.ModuleDescription"%>
-<%@ page import="java.util.Collection"%>
-<%@ page import="java.util.HashMap"%>
-<%@ page import="java.util.Iterator"%>
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.ModuleDescription" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.util.HashMap" %>
+<%@ page import="java.util.Iterator" %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<jsp:include page="include/adminheader.jsp"></jsp:include>
+<jsp:include page="include/adminheader.jsp">
+</jsp:include>
 <h1>Available services</h1>
-<%String IP=request.getRequestURL().toString();
-        int lastindex = IP.lastIndexOf('/');
-        IP = IP.substring(0,lastindex);
-        String prifix = IP + "/services/";
-    %>
+<%String IP = request.getRequestURL().toString();
+    int lastindex = IP.lastIndexOf('/');
+    IP = IP.substring(0, lastindex);
+    String prifix = IP + "/services/";
+%>
 <%
-         HashMap serviceMap = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
-          String servicName = request.getParameter("serviceName");
-          AxisService axisService = (AxisService)serviceMap.get(servicName);
-         if (axisService!=null){
-             HashMap operations;
-             String serviceName = "";
-             Collection operationsList;
-                 operations = axisService.getOperations();
-                 operationsList = operations.values();
-                 serviceName = axisService.getName().getLocalPart();
-     %><hr><h2><font color="blue"><a href="<%=prifix + axisService.getName().getLocalPart()%>?wsdl"><%=serviceName%></a></font></h2>
-<font color="blue">Service EPR : <font color="black"><%=prifix + axisService.getName().getLocalPart()%></font>
+    HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP);
+    String servicName = request.getParameter("serviceName");
+    AxisService axisService = (AxisService) serviceMap.get(servicName);
+    if (axisService != null) {
+        HashMap operations;
+        String serviceName ;
+        Collection operationsList;
+        operations = axisService.getOperations();
+        operationsList = operations.values();
+        serviceName = axisService.getName();
+%><hr>
+
+<h2><font color="blue"><a href="<%=prifix + axisService.getName()%>?wsdl"><%=serviceName%></a>
+</font></h2>
+<font color="blue">Service EPR : <font color="black"><%=prifix + axisService.getName()%></font>
     <h4>Service Description : <font color="black"><%=axisService.getServiceDescription()%></h4>
     <%
         Collection engagdeModules = axisService.getEngagedModules();
-        String moduleName = "";
+        String moduleName ;
         if(engagdeModules.size() >0){
     %>
     <i>Engaged Modules for the axisService</i><ul>
@@ -39,9 +43,9 @@
             moduleName = axisOperation.getName().getLocalPart();
     %><li><%=moduleName%></li>
     <%
-            }%>
-	</ul>
-        <%}
+        }%>
+</ul>
+    <%}
         if (operationsList.size() > 0) {
     %><br><i>Available operations</i><%
 } else {
@@ -53,10 +57,8 @@
 %><li><%=axisOperation.getName().getLocalPart()%></li>
     <%--                 <br>Operation EPR : <%=prifix + axisService.getName().getLocalPart()
+ "/"+ axisOperation.getName().getLocalPart()%>--%>
     <%
-        engagdeModules = null;
         engagdeModules = axisOperation.getEngagedModules();
-        moduleName = "";
-        if(engagdeModules.size() >0){
+        if (engagdeModules.size() > 0) {
     %>
     <br><i>Engaged Modules for the Operation</i><ul>
     <%
@@ -73,4 +75,4 @@
     <%
         }
     %>
-<jsp:include page="include/adminfooter.jsp"></jsp:include>
+    <jsp:include page="include/adminfooter.jsp"></jsp:include>

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
Tue Dec 20 01:14:50 2005
@@ -19,7 +19,7 @@
 import junit.framework.TestCase;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
@@ -298,7 +298,7 @@
         options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
         SOAPEnvelope env = call.invokeBlocking("editBean", envelope);
         OMElement response = env.getBody().getFirstElement();
-        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
+        MyBean resBean = (MyBean) BeanUtil.deserialize(MyBean.class, response.getFirstElement());
         assertNotNull(resBean);
         assertEquals(resBean.getAge(), 159);
         call.close();
@@ -347,7 +347,7 @@
 
         SOAPEnvelope env = call.invokeBlocking("beanOM", envelope);
         OMElement response = env.getBody().getFirstElement();
-        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
+        MyBean resBean = (MyBean) BeanUtil.deserialize(MyBean.class, response.getFirstElement());
         assertNotNull(resBean);
         assertEquals(resBean.getAge(), 159);
         call.close();
@@ -401,7 +401,7 @@
         ArrayList args = new ArrayList();
         args.add(boolean.class);
 
-        Object [] resBean = BeanSerializerUtil.deserialize(response, args.toArray());
+        Object [] resBean = BeanUtil.deserialize(response, args.toArray());
         assertNotNull(resBean);
         assertEquals(((Boolean) resBean[0]).booleanValue(), true);
         call.close();
@@ -459,7 +459,7 @@
         options.setTo(targetEPR);
         options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
         SOAPEnvelope env = call.invokeBlocking("echoEmployee", envelope);
-        Employee emp = (Employee) BeanSerializerUtil.deserialize(Employee.class, env.getBody().getFirstElement().getFirstElement());
+        Employee emp = (Employee) BeanUtil.deserialize(Employee.class, env.getBody().getFirstElement().getFirstElement());
         assertNotNull(emp);
     }
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
Tue Dec 20 01:14:50 2005
@@ -19,7 +19,7 @@
 import junit.framework.TestCase;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
@@ -121,7 +121,7 @@
 
         OMElement response = call.invokeBlocking(operationName, args.toArray());
 //        MyBean resBean =(MyBean) new  BeanSerializer(MyBean.class,response).deserilze();
-        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
+        MyBean resBean = (MyBean) BeanUtil.deserialize(MyBean.class, response.getFirstElement());
         assertNotNull(resBean);
         assertEquals(resBean.getAge(), 159);
         call.close();
@@ -171,7 +171,7 @@
 
 
         OMElement response = call.invokeBlocking(operationName, args.toArray());
-        MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
+        MyBean resBean = (MyBean) BeanUtil.deserialize(MyBean.class, response.getFirstElement());
 //        MyBean resBean =(MyBean) new  BeanSerializer(MyBean.class,response).deserilze();
         assertNotNull(resBean);
         assertEquals(resBean.getAge(), 100);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java?rev=357939&r1=357938&r2=357939&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
Tue Dec 20 01:14:50 2005
@@ -18,7 +18,7 @@
 package org.apache.axis2.rpc;
 
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.databinding.utils.BeanSerializerUtil;
+import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMNamespace;
@@ -119,14 +119,14 @@
     }
 
     public MyBean beanOM(OMElement element, int val) throws AxisFault {
-        MyBean bean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, element);
+        MyBean bean = (MyBean) BeanUtil.deserialize(MyBean.class, element);
         bean.setAge(val);
         return bean;
     }
 
     public boolean omrefs(OMElement element, OMElement element2) throws AxisFault {
-        MyBean bean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, element);
-        MyBean bean2 = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, element2);
+        MyBean bean = (MyBean) BeanUtil.deserialize(MyBean.class, element);
+        MyBean bean2 = (MyBean) BeanUtil.deserialize(MyBean.class, element2);
         return bean2 != null && bean != null;
     }
 
@@ -153,7 +153,7 @@
         ArrayList tems= new ArrayList();
         for (int i = 0; i < pss.size(); i++) {
             OMElement omElement = (OMElement) pss.get(i);
-            Person  p =(Person) BeanSerializerUtil.deserialize(Person.class,omElement);
+            Person  p =(Person) BeanUtil.deserialize(Person.class,omElement);
             tems.add(p);
         }
         com.setPersons(tems);



Mime
View raw message