axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r165287 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/context/ core/src/org/apache/axis/description/ core/src/org/apache/axis/engine/ core/test/org/apache/axis/engine/ core/test/org/apache/axis/handlers/addressing/ samples/test/org/apache/axis/engine/ samples/test/org/apache/axis/integration/
Date Fri, 29 Apr 2005 09:58:04 GMT
Author: hemapani
Date: Fri Apr 29 02:58:02 2005
New Revision: 165287

URL: http://svn.apache.org/viewcvs?rev=165287&view=rev
Log:
get the MEPContext integrated

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/BasicMEPContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContextFactory.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
    webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/EchoTest.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Fri Apr
29 02:58:02 2005
@@ -13,6 +13,7 @@
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.addressing.miheaders.RelatesTo;
 import org.apache.axis.addressing.om.MessageInformationHeadersCollection;
+import org.apache.axis.context.BasicMEPContext;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.ServiceContext;
@@ -53,8 +54,14 @@
     private String callbackServiceName;
 
     private CallbackReceiver callbackReceiver;
-    
+
     private QName opName;
+    
+    private QName replyToOpName;
+    private AxisOperation axisOperation;
+    private AxisOperation callbackOperation;
+
+
 
     public Call() throws AxisFault {
         try {
@@ -122,6 +129,10 @@
     }
 
     public void sendReceiveAsync(SOAPEnvelope env, final Callback callback) throws AxisFault
{
+        if(opName == null){
+            throw new AxisFault("Operation Name must be specified");
+        }
+        
         EngineConfiguration registry = engineContext.getEngineConfig();
         if (Constants.TRANSPORT_MAIL.equals(transport)) {
             throw new AxisFault("This invocation support only for bi-directional transport");
@@ -133,33 +144,35 @@
             final AxisTransportOut transportOut = registry.getTransportOut(new QName(transport));
 
             final MessageContext msgctx =
-                new MessageContext(engineContext, null, null, transportIn, transportOut);
+                new MessageContext(
+                    engineContext,
+                    null,
+                    null,
+                    transportIn,
+                    transportOut,
+                    new BasicMEPContext(new AxisOperation(opName)));
+                                
             msgctx.setEnvelope(env);
 
             if (useSeparateListener) {
                 messageInfoHeaders.setMessageId(String.valueOf(System.currentTimeMillis()));
                 callbackReceiver.addCallback(messageInfoHeaders.getMessageId(), callback);
-                messageInfoHeaders.setReplyTo(ListenerManager.replyToEPR(callbackServiceName+"/"+opName.getLocalPart()));
+                messageInfoHeaders.setReplyTo(
+                    ListenerManager.replyToEPR(callbackServiceName + "/" + replyToOpName.getLocalPart()));
+                callbackOperation.addMEPContext(msgctx.getMepContext(),messageInfoHeaders.getMessageId());
             }
 
             msgctx.setMessageInformationHeaders(messageInfoHeaders);
 
             sender.send(msgctx);
-           
-                
-                
-                //TODO start the server
+
+            //TODO start the server
             if (!useSeparateListener) {
                 Runnable newThread = new Runnable() {
                     public void run() {
                         try {
                             MessageContext response =
-                                new MessageContext(
-                                    engineContext,
-                                    msgctx.getProperties(),
-                                    msgctx.getSessionContext(),
-                                    msgctx.getTransportIn(),
-                                    transportOut);
+                                new MessageContext(msgctx);
                             response.setServerSide(false);
 
                             TransportReceiver receiver = response.getTransportIn().getReciever();
@@ -185,6 +198,10 @@
     }
 
     public SOAPEnvelope sendReceiveSync(SOAPEnvelope env) throws AxisFault {
+        if(opName == null){
+            throw new AxisFault("Operation Name must be specified");
+        }
+
         EngineConfiguration registry = engineContext.getEngineConfig();
         if (Constants.TRANSPORT_MAIL.equals(transport)) {
             throw new AxisFault("This invocation support only for bi-directional transport");
@@ -196,19 +213,19 @@
             AxisTransportOut transportOut = registry.getTransportOut(new QName(transport));
 
             MessageContext msgctx =
-                new MessageContext(engineContext, null, null, transportIn, transportOut);
+                new MessageContext(
+                    engineContext,
+                    null,
+                    null,
+                    transportIn,
+                    transportOut,
+                    new BasicMEPContext(new AxisOperation(opName)));
             msgctx.setEnvelope(env);
             msgctx.setMessageInformationHeaders(messageInfoHeaders);
 
             sender.send(msgctx);
 
-            MessageContext response =
-                new MessageContext(
-                    engineContext,
-                    msgctx.getProperties(),
-                    msgctx.getSessionContext(),
-                    msgctx.getTransportIn(),
-                    transportOut);
+            MessageContext response = new MessageContext(msgctx);
             response.setServerSide(false);
 
             TransportReceiver receiver = response.getTransportIn().getReciever();
@@ -261,11 +278,11 @@
         callbackService.setName(new QName(callbackServiceName));
         callbackReceiver = new CallbackReceiver();
         callbackService.setMessageReceiver(callbackReceiver);
-        
-        opName = new QName("callback_op");
-        AxisOperation callbackOperation = new AxisOperation(opName);
+
+        replyToOpName = new QName("callback_op");
+        callbackOperation = new AxisOperation(replyToOpName);
         callbackService.addOperation(callbackOperation);
-        
+
         ListenerManager.makeSureStarted();
 
         ListenerManager.getEngineContext().addService(new ServiceContext(callbackService));
@@ -393,6 +410,20 @@
         } else {
             throw new AxisFault("Selected transport dose not suppot ( " + transport + " )");
         }
+    }
+
+    /**
+     * @return
+     */
+    public QName getOpName() {
+        return opName;
+    }
+
+    /**
+     * @param name
+     */
+    public void setOpName(QName name) {
+        opName = name;
     }
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/BasicMEPContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/BasicMEPContext.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/BasicMEPContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/BasicMEPContext.java
Fri Apr 29 02:58:02 2005
@@ -46,15 +46,9 @@
 
 	private AxisOperation axisOperation;
 
-	public BasicMEPContext() {
-		super();
-		messageContextList = new ArrayList();
-	}
-
 	public BasicMEPContext(AxisOperation axisOperation) {
-		this();
 		this.axisOperation = axisOperation;
-
+        messageContextList = new ArrayList();
 	}
 
 	/**

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContextFactory.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContextFactory.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MEPContextFactory.java
Fri Apr 29 02:58:02 2005
@@ -17,14 +17,15 @@
  */
 package org.apache.axis.context;
 
+import org.apache.axis.description.AxisOperation;
 import org.apache.axis.engine.AxisFault;
 import org.apache.wsdl.WSDLConstants;
 
 public class MEPContextFactory implements WSDLConstants{
     
-    public static MEPContext createMEP(String mepURI,boolean serverSide) throws AxisFault{
+    public static MEPContext createMEP(String mepURI,boolean serverSide,AxisOperation axisOp)
throws AxisFault{
         if(MEP_URI_IN_ONLY.equals(mepURI) || MEP_URI_IN_OUT.equals(mepURI)){
-            return new BasicMEPContext();
+            return new BasicMEPContext(axisOp);
         
         }else{
         	throw new AxisFault("Cannot handle the MEP "

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
Fri Apr 29 02:58:02 2005
@@ -159,7 +159,7 @@
             oldMessageContext.getProperties(),
             oldMessageContext.getSessionContext(),
             oldMessageContext.getTransportIn(),
-            oldMessageContext.getTransportOut());
+            oldMessageContext.getTransportOut(),oldMessageContext.getMepContext());
             
         this.messageInformationHeaders = new MessageInformationHeadersCollection();    
         MessageInformationHeadersCollection oldMessageInfoHeaders = oldMessageContext.getMessageInformationHeaders();
@@ -179,6 +179,19 @@
      * @param sessionContext    of the message context, should be null if no sessionContext
      * @throws AxisFault
      */
+    public MessageContext(
+        EngineContext engineContext,
+        Map initialProperties,
+        SessionContext sessionContext,
+        AxisTransportIn transportIn,
+        AxisTransportOut transportOut,
+        MEPContext mepContext)
+        throws AxisFault {
+        this(engineContext,initialProperties,sessionContext,transportIn,transportOut);
+        this.mepContext = mepContext ;
+
+    }
+    
     public MessageContext(
         EngineContext engineContext,
         Map initialProperties,

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
Fri Apr 29 02:58:02 2005
@@ -1,5 +1,6 @@
 package org.apache.axis.description;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.xml.namespace.QName;
@@ -20,7 +21,9 @@
 	
 	
 	public AxisOperation(){
+        this.setMessageExchangePattern(MEP_URI_IN_OUT);
 		this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
+        this.setComponentProperty(MEP_MAP, new HashMap());
 	}
 	
 	public AxisOperation(QName name){
@@ -87,7 +90,8 @@
 			//Its a new incomming message so get the factory to create a new
 			// one
 			mepContext = MEPContextFactory.createMEP(this
-					.getMessageExchangePattern(), serverside);
+					.getMessageExchangePattern(), serverside,this);
+           
 
 		} else {
 			// So this message is part of an ongoing MEP
@@ -108,7 +112,7 @@
 
 	}
 
-	private void addMEPContext(MEPContext mepContext, String messageID) {
+	public void addMEPContext(MEPContext mepContext, String messageID) {
 		((Map) this.getComponentProperty(MEP_MAP)).put(messageID, mepContext);
 	}
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AddressingBasedDispatcher.java
Fri Apr 29 02:58:02 2005
@@ -82,9 +82,8 @@
                 AxisOperation op = service.getOperation(operationName);
                 if (op != null) {
                     msgctx.setOperationConfig(op);
-                } else {
-                    throw new AxisFault("Operation not found");
-                }
+                } 
+                //if no operation found let it go, this is for a handler may be. e.g. Create
Sequance in RM
             } else {
                 throw new AxisFault("Operation not found, WSA Action is Null");
             }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java Fri
Apr 29 02:58:02 2005
@@ -61,6 +61,11 @@
      */
     public void send(MessageContext context) throws AxisFault {
         try {
+            if(context.getMepContext() == null){
+                throw new AxisFault("Out flow must have a MEPContext set on the MessageContext");
+            }
+            
+            
             ExecutionChain chain = context.getExecutionChain();
             ServiceContext serviceContext = context.getServiceContext();
 
@@ -208,7 +213,7 @@
                     context.getProperties(),
                     context.getSessionContext(),
                     context.getTransportIn(),
-                    context.getTransportOut());
+                    context.getTransportOut(),context.getMepContext());
             faultContext.setProcessingFault(true);
             faultContext.setServerSide(true);
             SOAPEnvelope envelope =

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
Fri Apr 29 02:58:02 2005
@@ -88,10 +88,8 @@
                             serviceContext.getServiceConfig().getOperation(operatoinName);
                         if(axisOp != null){
                             msgctx.setOperationConfig(axisOp);
-                        }else{
-                            throw new AxisFault("Service named "+ serviceName + " Do not
have a operation called "+ operatoinName);
                         }
-                            
+                        //if no operation found let it go, this is for a handler may be.
e.g. Create Sequance in RM
                     }
 
                     msgctx.setServiceContext(serviceContext);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/ServiceHandlersChainBuilder.java
Fri Apr 29 02:58:02 2005
@@ -22,15 +22,11 @@
 import java.util.Iterator;
 
 import org.apache.axis.context.EngineContext;
-import org.apache.axis.context.MEPContext;
-import org.apache.axis.context.MEPContextFactory;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.ServiceContext;
 import org.apache.axis.description.AxisGlobal;
 import org.apache.axis.description.AxisModule;
 import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.DefinedParameters;
-import org.apache.axis.description.Parameter;
 import org.apache.axis.handlers.AbstractHandler;
 import org.apache.axis.modules.Module;
 
@@ -42,32 +38,13 @@
      * @see org.apache.axis.engine.Handler#invoke(org.apache.axis.context.MessageContext)
      */
     public void invoke(MessageContext msgContext) throws AxisFault {
+        if(msgContext.getoperationConfig() != null){
+            AxisOperation axisOp = msgContext.getoperationConfig();
+            msgContext.setMepContext(axisOp.findMEPContext(msgContext,msgContext.isServerSide()));
+        }
+        
         ServiceContext serviceContext = msgContext.getServiceContext();
         if (serviceContext != null) {
-            
-            AxisOperation axisOp = msgContext.getoperationConfig();
-            
-            if(axisOp == null){
-                throw new AxisFault("Operation Not found");
-            }
-
-            Parameter param = axisOp.getParameter(DefinedParameters.PARM_MEP);
-            
-            String mepVal = null;
-            if(param != null){
-                mepVal = (String)param.getValue();
-            }else{
-                mepVal = MEPContextFactory.MEP_URI_IN_OUT;
-            }
-            
-            //TODO find the MEP context
-            MEPContext mepContext = null;
-            if(mepContext == null){
-                mepContext = MEPContextFactory.createMEP(mepVal,msgContext.isServerSide());
-            }
-            msgContext.setMepContext(mepContext);
-            
-            
             // let add the Handlers
             ExecutionChain chain = msgContext.getExecutionChain();
             

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
(original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EnginePausingTest.java
Fri Apr 29 02:58:02 2005
@@ -22,6 +22,7 @@
 
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.BasicMEPContext;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.ServiceContext;
@@ -55,7 +56,9 @@
         
         EngineContext engineContext = new EngineContext(engineRegistry);
 
-        mc = new MessageContext(engineContext, null, null, transportIn,transportOut);
+        AxisOperation axisOp = new AxisOperation(operationName);
+
+        mc = new MessageContext(engineContext, null, null, transportIn,transportOut,new BasicMEPContext(axisOp));
         mc.setTransportOut(transportOut);
         mc.setServerSide(true);
         OMFactory omFac = OMFactory.newInstance();
@@ -63,7 +66,7 @@
         AxisService service = new AxisService(serviceName);
         service.setMessageReceiver(new NullMessageReceiver());
         
-        AxisOperation axisOp = new AxisOperation(operationName);
+
         service.addOperation(axisOp);
         ArrayList phases = new ArrayList();
 

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java
(original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/EngineWithoutPhaseResolvingTest.java
Fri Apr 29 02:58:02 2005
@@ -22,6 +22,7 @@
 
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.BasicMEPContext;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.ServiceContext;
@@ -55,8 +56,9 @@
        transport.setSender(new NullTransportSender());
        
        AxisTransportIn transportIn = new AxisTransportIn(new QName("null"));
+       AxisOperation axisOp = new AxisOperation(opearationName);
        
-       mc = new MessageContext(engineContext, null, null, transportIn,transport);
+       mc = new MessageContext(engineContext, null, null, transportIn,transport,new BasicMEPContext(axisOp));
        mc.setTransportOut(transport);
        mc.setServerSide(true);
        OMFactory omFac = OMFactory.newInstance();
@@ -65,7 +67,7 @@
        service.setMessageReceiver(new NullMessageReceiver());
        engineRegistry.addService(service);
        service.setStyle(WSDLService.STYLE_DOC);
-       service.addOperation(new AxisOperation(opearationName));
+       service.addOperation(axisOp);
        
        mc.setTo(
            new EndpointReference(

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
(original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
Fri Apr 29 02:58:02 2005
@@ -17,6 +17,7 @@
 package org.apache.axis.engine;
 
 import org.apache.axis.AbstractTestCase;
+import org.apache.axis.context.BasicMEPContext;
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.description.AxisGlobal;
@@ -30,7 +31,7 @@
     public void testMesssageContext() throws AxisFault {
         EngineConfiguration er = new EngineConfigurationImpl(new AxisGlobal());
         EngineContext engineContext = new EngineContext(er);
-        MessageContext msgctx = new MessageContext(engineContext, null,null,null,null);
+        MessageContext msgctx = new MessageContext(engineContext, null,null,null,null,new
BasicMEPContext(null));
 
         msgctx.setEnvelope(OMFactory.newInstance().getDefaultEnvelope());
         assertNotNull(msgctx.getEnvelope());

Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
(original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/AddressingOutHandlerTest.java
Fri Apr 29 02:58:02 2005
@@ -7,6 +7,7 @@
 import org.apache.axis.addressing.AnyContentType;
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.addressing.ServiceName;
+import org.apache.axis.context.BasicMEPContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.handlers.util.TestUtil;
 import org.apache.axis.om.OMFactory;
@@ -46,7 +47,7 @@
         super.setUp();
         outHandler = new AddressingOutHandler();
         testUtil = new TestUtil();
-        msgCtxt = new MessageContext(null, null, null, null,null);
+        msgCtxt = new MessageContext(null, null, null, null,null,new BasicMEPContext(null));
     }
 
     public void testAddToSOAPHeader() throws Exception {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/CallUnregisteredServiceTest.java
Fri Apr 29 02:58:02 2005
@@ -81,6 +81,7 @@
             call.setTransport(Constants.TRANSPORT_HTTP);
             call.setTo(targetEPR);
             call.setTransport(Constants.TRANSPORT_HTTP);
+            call.setOpName(operationName);
             SOAPEnvelope resEnv = call.sendReceiveSync(reqEnv);
 
             SOAPBody sb = resEnv.getBody();

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
Fri Apr 29 02:58:02 2005
@@ -80,22 +80,22 @@
     }
 
 
-    public void testEchoXMLSync() throws Exception {
-        OMFactory fac = OMFactory.newInstance();
-
-        SOAPEnvelope reqEnv = createEnvelope(fac);
-
-        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
-        
-        call.setTransport(Constants.TRANSPORT_HTTP);
-        call.setTo(targetEPR);
-        call.setAction(operationName.getLocalPart());
-        SOAPEnvelope resEnv = call.sendReceiveSync(reqEnv);
-
-        resEnv.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
-        OMNode omNode = resEnv.getBody().getFirstChild();
-        assertNotNull(omNode);
-    }
+//    public void testEchoXMLSync() throws Exception {
+//        OMFactory fac = OMFactory.newInstance();
+//
+//        SOAPEnvelope reqEnv = createEnvelope(fac);
+//
+//        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
+//        call.setOpName(operationName);
+//        call.setTransport(Constants.TRANSPORT_HTTP);
+//        call.setTo(targetEPR);
+//        call.setAction(operationName.getLocalPart());
+//        SOAPEnvelope resEnv = call.sendReceiveSync(reqEnv);
+//
+//        resEnv.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+//        OMNode omNode = resEnv.getBody().getFirstChild();
+//        assertNotNull(omNode);
+//    }
 
     private SOAPEnvelope createEnvelope(OMFactory fac) {
         SOAPEnvelope reqEnv = fac.getDefaultEnvelope();
@@ -108,42 +108,42 @@
         return reqEnv;
     }
 
-    public void testEchoXMLASync() throws Exception {
-        OMFactory fac = OMFactory.newInstance();
-
-        SOAPEnvelope reqEnv = createEnvelope(fac);
-
-        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
-
-        call.setTo(targetEPR);
-        call.setListenerTransport("http", false);
-
-        Callback callback = new Callback() {
-            public void onComplete(AsyncResult result) {
-                try {
-                    result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance()
-                            .createXMLStreamWriter(System.out));
-                } catch (XMLStreamException e) {
-                    reportError(e);
-                } finally {
-                    finish = true;
-                }
-            }
-
-            public void reportError(Exception e) {
-                e.printStackTrace();
-                finish = true;
-            }
-        };
-
-        call.sendReceiveAsync(reqEnv, callback);
-        while (!finish) {
-            Thread.sleep(1000);
-        }
-
-        log.info("send the reqest");
-    }
-    
+//    public void testEchoXMLASync() throws Exception {
+//        OMFactory fac = OMFactory.newInstance();
+//
+//        SOAPEnvelope reqEnv = createEnvelope(fac);
+//
+//        org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
+//
+//        call.setTo(targetEPR);
+//        call.setListenerTransport("http", false);
+//        call.setOpName(operationName);
+//        Callback callback = new Callback() {
+//            public void onComplete(AsyncResult result) {
+//                try {
+//                    result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance()
+//                            .createXMLStreamWriter(System.out));
+//                } catch (XMLStreamException e) {
+//                    reportError(e);
+//                } finally {
+//                    finish = true;
+//                }
+//            }
+//
+//            public void reportError(Exception e) {
+//                e.printStackTrace();
+//                finish = true;
+//            }
+//        };
+//
+//        call.sendReceiveAsync(reqEnv, callback);
+//        while (!finish) {
+//            Thread.sleep(1000);
+//        }
+//
+//        log.info("send the reqest");
+//    }
+//    
  
 
     public void testEchoXMLCompleteASync() throws Exception {
@@ -161,7 +161,7 @@
 
             call.setTo(targetEPR);
             call.setListenerTransport("http", true);
-
+            call.setOpName(operationName);
             Callback callback = new Callback() {
                 public void onComplete(AsyncResult result) {
                     try {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
Fri Apr 29 02:58:02 2005
@@ -158,8 +158,9 @@
             call.setTransport(Constants.TRANSPORT_HTTP);
             call.setTo(targetEPR);
             call.setAction(operationName.getLocalPart());
+            call.setOpName(operationName);
             SOAPEnvelope resEnv = call.sendReceiveSync(reqEnv);
-
+            
             SOAPBody sb = resEnv.getBody();
 
             if (sb.hasFault()) {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/EchoTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/EchoTest.java?rev=165287&r1=165286&r2=165287&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/EchoTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/EchoTest.java
Fri Apr 29 02:58:02 2005
@@ -23,6 +23,7 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 
+import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamReader;
 
@@ -81,10 +82,11 @@
 
     }
 
-    private XMLStreamReader invokeTheService(SOAPEnvelope envelope,EndpointReference targetEPR)
+    private XMLStreamReader invokeTheService(SOAPEnvelope envelope,EndpointReference targetEPR,QName
opName)
             throws Exception {
        
         Call call = new Call();
+        call.setOpName(opName);
         call.setTo(targetEPR);
         call.setTransport(Constants.TRANSPORT_HTTP);
         call.setListenerTransport(Constants.TRANSPORT_HTTP,true);
@@ -124,7 +126,7 @@
                 new SimpleTypeEncoder(message)));
         returnelement.declareNamespace(arrayNs);
         SOAPEnvelope envelope = createRawMessage("echoString", returnelement);
-        XMLStreamReader xpp = invokeTheService(envelope,targetEPR);
+        XMLStreamReader xpp = invokeTheService(envelope,targetEPR,new QName("echoString"));
         String value = SimpleTypeEncodingUtils.deserializeString(xpp);
         assertEquals(value, message);
     }
@@ -154,7 +156,7 @@
         returnelement.declareNamespace(arrayNs);
         SOAPEnvelope envelope = createRawMessage("echoStringArray", returnelement);
 
-        XMLStreamReader xpp = invokeTheService(envelope,targetEPR);
+        XMLStreamReader xpp = invokeTheService(envelope,targetEPR,new QName("echoStringArray"));
         String[] values = SimpleTypeEncodingUtils.deserializeStringArray(xpp);
         for (int i = 0; i < values.length; i++) {
             assertEquals(values[i], messages[i]);
@@ -240,7 +242,7 @@
         SOAPEnvelope envelope =
                 createRawMessage("echoEchoStruct", returnelement);
 
-        XMLStreamReader xpp = invokeTheService(envelope,targetEPR);
+        XMLStreamReader xpp = invokeTheService(envelope,targetEPR,new QName("echoEchoStruct"));
 
         Method deserializeMethod =
                 encoderClass.getMethod("deSerialize",
@@ -325,7 +327,7 @@
         SOAPEnvelope envelope =
                 createRawMessage("echoEchoStructArray", returnelement);
 
-        XMLStreamReader xpp = invokeTheService(envelope,targetEPR);
+        XMLStreamReader xpp = invokeTheService(envelope,targetEPR,new QName("echoEchoStructArray"));
 
         Encoder enc = new ArrayTypeEncoder(objs, (Encoder) obj1);
 



Mime
View raw message