You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by th...@apache.org on 2005/09/01 07:13:41 UTC

svn commit: r265653 - /webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/

Author: thilina
Date: Wed Aug 31 22:13:16 2005
New Revision: 265653

URL: http://svn.apache.org/viewcvs?rev=265653&view=rev
Log:
Switching to RAW XML stuff ,without data Binding... Life is bit more easy with OM than data Binding :D

Added:
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLCallback.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLMessageReceiver.java
    webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,171 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.kandula.wscoor;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.addressing.AnyContentType;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.clientapi.MessageSender;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.description.ParameterImpl;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.om.impl.MIMEOutputUtils;
+import org.apache.axis2.receivers.AbstractMessageReceiver;
+import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.util.Utils;
+import org.apache.kandula.Constants;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+
+public class ActivationCoordinatorPortTypeRawXMLStub extends
+        org.apache.axis2.clientapi.Stub {
+    
+    private ConfigurationContext responseConfigurationContext ;
+    public static final String AXIS2_HOME = ".";
+
+    protected static org.apache.axis2.description.OperationDescription[] operations;
+
+    static {
+
+        //creating the Service
+        _service = new org.apache.axis2.description.ServiceDescription(
+                new javax.xml.namespace.QName(
+                        "http://schemas.xmlsoap.org/ws/2003/09/wscoor",
+                        "ActivationCoordinatorPortType"));
+
+        //creating the operations
+        org.apache.axis2.description.OperationDescription operationDesc;
+        operations = new org.apache.axis2.description.OperationDescription[1];
+
+        operationDesc = new org.apache.axis2.description.OperationDescription();
+        operationDesc.setName(new javax.xml.namespace.QName(
+                "http://schemas.xmlsoap.org/ws/2003/09/wscoor",
+                "CreateCoordinationContextOperation"));
+        operations[0] = operationDesc;
+        _service.addOperation(operationDesc);
+
+    }
+
+    /**
+     * Constructor
+     */
+    public ActivationCoordinatorPortTypeRawXMLStub(String axis2Home,
+            EndpointReference targetEndpoint) throws java.lang.Exception {
+        this.toEPR = targetEndpoint;
+        //creating the configuration
+        _configurationContext = new org.apache.axis2.context.ConfigurationContextFactory()
+                .buildClientConfigurationContext(axis2Home);
+        responseConfigurationContext = new org.apache.axis2.context.ConfigurationContextFactory()
+        .buildClientConfigurationContext(axis2Home);
+        _configurationContext.getAxisConfiguration().addService(_service);
+        _serviceContext = _configurationContext.createServiceContext(_service
+                .getName());
+
+    }
+
+   
+    private org.apache.axis2.soap.SOAPEnvelope createSOAPEnvelope(
+            String coordinationType) {
+        org.apache.axis2.soap.SOAPEnvelope env = super.createEnvelope();
+        org.apache.axis2.soap.SOAPFactory factory = OMAbstractFactory
+                .getSOAP12Factory();
+        OMNamespace wsCoor = factory.createOMNamespace(Constants.WS_COOR,
+                "wscoor");
+        OMElement request = factory.createOMElement(
+                "CreateCoordinationContext", wsCoor);
+        OMElement coorType = factory
+                .createOMElement("CoordinationType", wsCoor);
+        coorType.setText(coordinationType);
+        request.addChild(coorType);
+        env.getBody().addChild(request);
+        return env;
+    }
+
+    public void createCoordinationContextOperation(
+            String coordinationType, String id)
+            throws java.rmi.RemoteException {
+
+        QName serviceName = new QName("ActivationRequesterPortType");
+        QName operationName = new QName(Constants.WS_COOR,"CreateCoordinationContextOperation");
+
+        ServiceDescription service = new ServiceDescription(serviceName);
+        service.addParameter(new ParameterImpl(
+                AbstractMessageReceiver.SERVICE_CLASS,
+                ActivationRequesterPortTypeRawXMLSkeleton.class.getName()));
+        service.setFileName(ActivationRequesterPortTypeRawXMLSkeleton.class.getName());
+        org.apache.axis2.description.OperationDescription responseOperationDesc;
+        operations = new org.apache.axis2.description.OperationDescription[1];
+
+        responseOperationDesc = new org.apache.axis2.description.OperationDescription();
+        responseOperationDesc.setName(new javax.xml.namespace.QName(
+                "http://schemas.xmlsoap.org/ws/2003/09/wscoor",
+                "CreateCoordinationContextOperation"));
+        responseOperationDesc.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
+        operations[0] = responseOperationDesc;
+        service.addOperation(responseOperationDesc);
+         service.setClassLoader(Thread.currentThread().getContextClassLoader());
+       
+        try {
+            SimpleHTTPServer receiver=null;
+         
+            responseConfigurationContext.getAxisConfiguration().addService(service);
+            responseConfigurationContext.createServiceContext(serviceName);
+            
+            receiver = new SimpleHTTPServer(responseConfigurationContext, 6060);
+
+            receiver.start();
+            System.out.print("Server started on port " + 5050 + ".....");
+            
+            
+            Utils.resolvePhases(receiver.getSystemContext()
+                    .getAxisConfiguration(), service);
+            MessageSender messageSender = new MessageSender(_serviceContext);
+            org.apache.axis2.context.MessageContext messageContext = getMessageContext();
+            EndpointReference replyToEpr = new EndpointReference(
+                    "http://127.0.0.1:6061" + "/axis2/services/" + serviceName.getLocalPart());
+            AnyContentType refProperties = new AnyContentType();
+            refProperties.addReferenceValue(new QName("http://ws.apache.org/kandula",id),id);
+            replyToEpr.setReferenceProperties(refProperties);
+          //  messageSender.
+            messageSender.setReplyTo(replyToEpr);
+            messageSender.setTo(this.toEPR);
+            messageSender.setSoapAction("CreateCoordinationContextOperation");
+            //_call.setWsaAction("CreateCoordinationContextOperation");
+            org.apache.axis2.soap.SOAPEnvelope env = createSOAPEnvelope(coordinationType);
+            messageContext.setEnvelope(env);
+            messageSender
+                    .setSenderTransport(org.apache.axis2.Constants.TRANSPORT_HTTP);
+            messageSender.send(operations[0], messageContext);
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } finally {
+
+        }
+    }
+}
\ No newline at end of file

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLAsyncMessageReceiver.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,73 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.kandula.wscoor;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public class ActivationPortTypeRawXMLAsyncMessageReceiver extends
+        org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver {
+
+    public void invokeBusinessLogic(
+            org.apache.axis2.context.MessageContext msgContext,
+            org.apache.axis2.context.MessageContext newMsgContext/*,
+            ServerCallback callback*/) throws org.apache.axis2.AxisFault {
+
+        try {
+
+            // get the implementation class for the Web Service
+            Object obj = getTheImplementationObject(msgContext);
+
+            ActivationPortTypeRawXMLSkeleton skel = (ActivationPortTypeRawXMLSkeleton) obj;
+            //Out Envelop
+            org.apache.axis2.soap.SOAPEnvelope envelope = null;
+            //Find the operation that has been set by the Dispatch phase.
+            org.apache.axis2.description.OperationDescription op = msgContext
+                    .getOperationContext().getAxisOperation();
+
+            String methodName;
+            if (op.getName() != null
+                    & (methodName = op.getName().getLocalPart()) != null) {
+                if (methodName.equals("CreateCoordinationContextOperation")) {
+                    OMElement response = null;
+
+                    //doc style
+                    response = skel
+                            .CreateCoordinationContextOperation((org.apache.axis2.om.OMElement) msgContext
+                                    .getEnvelope().getBody().getFirstChild()
+                                    .detach());
+
+                    //Create a default envelop
+                    envelope = getSOAPFactory().getDefaultEnvelope();
+                    //Create a Omelement of the result if a result exist
+
+                    envelope.getBody().setFirstChild(response);
+                }
+                newMsgContext.setEnvelope(envelope);
+                newMsgContext.setSoapAction("CreateCoordinationContextOperation");
+               // callback.handleResult(newMsgContext);
+            }
+        } catch (Exception e) {
+            throw AxisFault.makeFault(e);
+        }
+
+    }
+
+}
\ No newline at end of file

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLCallback.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLCallback.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLCallback.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLCallback.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,63 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.kandula.wscoor;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.clientapi.AsyncResult;
+import org.apache.axis2.clientapi.Callback;
+import org.apache.axis2.om.OMElement;
+import org.apache.kandula.typemapping.CoordinationContext;
+import org.apache.kandula.typemapping.SimpleCoordinationContext;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public class ActivationPortTypeRawXMLCallback extends Callback {
+    
+    SimpleCoordinationContext  coordinationContext;
+    Exception e;
+    
+    public void onComplete(AsyncResult result) {
+        OMElement response = (OMElement)result.getResponseEnvelope().getFirstChildWithName(new QName("CreateCoordinationContextResponse"));
+        OMElement coordinationContextElement = response.getFirstElement();
+        coordinationContextElement.build();
+        coordinationContextElement.detach();
+        coordinationContext = new SimpleCoordinationContext(coordinationContextElement);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis2.clientapi.Callback#reportError(java.lang.Exception)
+     */
+    public void reportError(Exception e) {
+        this.e = e;
+        this.setComplete(true);
+    }
+    public CoordinationContext getCoordinationContext() throws Exception
+    {
+        if (e!=null)
+        {
+            throw e;
+        }
+        else if (coordinationContext!=null)
+        {
+            return coordinationContext;
+        }
+        return null;
+    }
+
+}

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,84 @@
+package org.apache.kandula.wscoor;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.kandula.KandulaException;
+import org.apache.kandula.coordinator.Coordinator;
+import org.apache.kandula.coordinator.CoordinatorImpl;
+import org.apache.kandula.coordinator.context.ActivityContext;
+
+/**
+ *  Auto generated java skeleton for the service by the Axis code generator
+ */
+
+public class ActivationPortTypeRawXMLSkeleton {
+
+    /**
+     * Auto generated method signature
+     *@param requestDoc
+     * @throws KandulaException
+     */
+    public OMElement CreateCoordinationContextOperation(
+            OMElement requestElement)
+            throws KandulaException {
+        ActivityContext context;
+        Coordinator coordinator = new CoordinatorImpl();
+        
+//          ActivityContext context;
+//        Coordinator coordinator = new CoordinatorImpl();
+//        if (requestDoc.getCreateCoordinationContext().getCurrentContext() != null) {
+//            CoordinationContext coorContext = CoordinationContext.Factory.newInstance(requestDoc
+//                    .getCreateCoordinationContext().getCurrentContext());
+//            context = coordinator.createCoordinationContext(coorContext);
+//        }else
+//        {
+        String coordinationType = requestElement.getFirstChildWithName(new QName("CoordinationType")).getText();
+        OMElement expiresElement = requestElement.getFirstChildWithName(new QName("Expires"));
+        String expires=null;
+        long expiresL = 0;
+        if (expiresElement!=null)
+        {
+            expires = expiresElement.getText();
+            if ((expires!=null)&&(expires.equals("")))
+            {
+                expiresL = Long.parseLong(expires);
+            }  
+        }      
+        context  = coordinator.createCoordinationContext(coordinationType,expiresL);
+        return context.getCoordinationContext().toOM();
+            
+        // context(coordinationType, expiresL);
+       // }
+//        CreateCoordinationContextResponseDocument responseDoc = CreateCoordinationContextResponseDocument.Factory
+//                .newInstance();
+//        CreateCoordinationContextResponseType responseType = CreateCoordinationContextResponseType.Factory
+//                .newInstance();
+//        responseType.setCoordinationContext((CoordinationContextType)context.getCoordinationContext().getCoordinationContextType());
+//        responseDoc.setCreateCoordinationContextResponse(responseType);
+           // return new OMElementImpl("Thilina",new OMNamespaceImpl("pre","http://www.thilina.org"));
+        
+         
+//        if (requestDoc.getCreateCoordinationContext().getCurrentContext() != null) {
+//            CoordinationContext coorContext = CoordinationContext.Factory.newInstance(requestDoc
+//                    .getCreateCoordinationContext().getCurrentContext());
+//            context = coordinator.createCoordinationContext(coorContext);
+//        }else
+//        {
+//            context = coordinator.createCoordinationContext(requestDoc
+//                    .getCreateCoordinationContext().getCoordinationType(), Long
+//                    .parseLong(requestDoc.getCreateCoordinationContext()
+//                            .getExpires().getId()));
+//        }
+//        CreateCoordinationContextResponseDocument responseDoc = CreateCoordinationContextResponseDocument.Factory
+//                .newInstance();
+//        CreateCoordinationContextResponseType responseType = CreateCoordinationContextResponseType.Factory
+//                .newInstance();
+//        responseType.setCoordinationContext((CoordinationContextType)context.getCoordinationContext().getCoordinationContextType());
+//        responseDoc.setCreateCoordinationContextResponse(responseType);
+//        return responseDoc;
+
+
+    }
+
+}
\ No newline at end of file

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,53 @@
+package org.apache.kandula.wscoor;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.om.OMElement;
+import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.participant.standalone.TransactionManager;
+import org.apache.kandula.storage.StorageFactory;
+import org.apache.kandula.typemapping.CoordinationContext;
+
+/*
+ * 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.
+ *
+ *
+ */
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+
+public class ActivationRequesterPortTypeRawXMLSkeleton {
+    MessageContext msgContext;
+
+    public void init(MessageContext context) {
+        this.msgContext = context;
+    }
+
+    public OMElement CreateCoordinationContextOperation(OMElement requestElement) {
+//        OMElement coordinationContextElement = requestElement
+//                .getFirstChildWithName(new QName("CoordinationContext"));
+        if ("CoordinationContext".equals(requestElement.getLocalName()))
+        {
+        msgContext.getMessageInformationHeaders().getReferenceParameters();
+        CoordinationContext  coordinationContext  =CoordinationContext.Factory.newInstance(requestElement);
+        ActivityContext context = StorageFactory.getInstance().getStore().getContext(TransactionManager.tempID);
+        context.setCoordinationContext(coordinationContext);
+        }
+        return null;
+    }
+}
\ No newline at end of file

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLMessageReceiver.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLMessageReceiver.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLMessageReceiver.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,82 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.kandula.wscoor;
+/**
+ * @author <a href="mailto:thilina@apache.org"> Thilina Gunarathne </a>
+ */
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.receivers.ServerCallback;
+
+/**
+ * Auto generated message receiver
+ */
+
+public class RegistrationPortTypeRawXMLMessageReceiver extends
+        org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver {
+
+    public void invokeBusinessLogic(
+            org.apache.axis2.context.MessageContext msgContext,
+            org.apache.axis2.context.MessageContext newMsgContext,
+            ServerCallback callback) throws org.apache.axis2.AxisFault {
+
+        try {
+            Object obj = getTheImplementationObject(msgContext);
+
+            RegistrationPortTypeRawXMLSkeleton skel = (RegistrationPortTypeRawXMLSkeleton) obj;
+            //Out Envelop
+            org.apache.axis2.soap.SOAPEnvelope envelope = null;
+            //Find the operation that has been set by the Dispatch phase.
+            org.apache.axis2.description.OperationDescription op = msgContext
+                    .getOperationContext().getAxisOperation();
+            if (op == null) {
+                throw new org.apache.axis2.AxisFault(
+                        "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider");
+            }
+
+            String methodName;
+            if (op.getName() != null
+                    & (methodName = op.getName().getLocalPart()) != null) {
+
+                if (methodName.equals("RegisterOperation")) {
+
+                    OMElement response = null;
+
+                    //doc style
+                    response = skel
+                            .RegisterOperation((org.apache.axis2.om.OMElement) msgContext
+                                    .getEnvelope().getBody().getFirstChild()
+                                    .detach());
+
+                    //Create a default envelop
+                    envelope = getSOAPFactory().getDefaultEnvelope();
+                    //Create a Omelement of the result if a result exist
+
+                    envelope.getBody().setFirstChild(response);
+
+                }
+
+                newMsgContext.setEnvelope(envelope);
+                callback.handleResult(newMsgContext);
+            }
+
+        } catch (Exception e) {
+            callback.handleFault(org.apache.axis2.AxisFault.makeFault(e));
+        }
+
+    }
+
+}
\ No newline at end of file

Added: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java?rev=265653&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java Wed Aug 31 22:13:16 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright  2004 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.kandula.wscoor;
+
+import org.apache.axis2.om.OMElement;
+
+/**
+ * @author <a href="mailto:thilina@apache.org"> Thilina Gunarathne </a>
+ */
+
+public class RegistrationPortTypeRawXMLSkeleton {
+
+    public OMElement RegisterOperation(OMElement request) {
+        //Todo fill this with the necessary business logic
+        return null;
+    }
+}
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org