You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2005/05/19 12:09:11 UTC

svn commit: r170903 - /webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java

Author: hemapani
Date: Thu May 19 03:09:09 2005
New Revision: 170903

URL: http://svn.apache.org/viewcvs?rev=170903&view=rev
Log:
add oneway message Sender

Added:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java?rev=170903&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java Thu May 19 03:09:09 2005
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *  Runtime state of the engine
+ */
+package org.apache.axis.clientapi;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.context.ServiceContext;
+import org.apache.axis.description.OperationDescription;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMElement;
+
+/**
+ * @author hemapani
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class MessageSender extends InOnlyMEPClient {
+    public MessageSender(ServiceContext service) {
+        super(service);
+    }
+    public void send(String opName, OMElement toSend, Callback callback) throws AxisFault {
+        OperationDescription axisOp = new OperationDescription(new QName(opName));
+        serviceContext.getServiceConfig().addOperation(axisOp);
+        super.send(axisOp,prepareTheSystem(toSend));
+    }
+}