Return-Path: Delivered-To: apmail-ws-kandula-dev-archive@www.apache.org Received: (qmail 23882 invoked from network); 14 May 2006 03:10:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 May 2006 03:10:28 -0000 Received: (qmail 53231 invoked by uid 500); 14 May 2006 03:10:24 -0000 Delivered-To: apmail-ws-kandula-dev-archive@ws.apache.org Received: (qmail 52444 invoked by uid 500); 14 May 2006 03:10:16 -0000 Mailing-List: contact kandula-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list kandula-dev@ws.apache.org Received: (qmail 51988 invoked by uid 500); 14 May 2006 03:10:12 -0000 Delivered-To: apmail-ws-kandula-cvs@ws.apache.org Received: (qmail 51937 invoked by uid 99); 14 May 2006 03:10:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 May 2006 20:10:10 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 13 May 2006 20:10:03 -0700 Received: (qmail 23040 invoked by uid 65534); 14 May 2006 03:09:43 -0000 Message-ID: <20060514030943.23039.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r406210 [15/15] - in /webservices/kandula/site/2: ./ images/ images/logos/ style/ xref-test/ xref-test/org/ xref-test/org/apache/ xref-test/org/apache/kandula/ xref-test/org/apache/kandula/context/ xref-test/org/apache/kandula/coordinator/ ... Date: Sun, 14 May 2006 03:09:15 -0000 To: kandula-cvs@ws.apache.org From: thilina@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.html Sat May 13 20:09:04 2006 @@ -0,0 +1,118 @@ + + + +RegistrationPortTypeRawXMLSkeleton xref + + + +
+
+1   /*
+2    * Copyright  2004 The Apache Software Foundation.
+3    *
+4    *  Licensed under the Apache License, Version 2.0 (the "License");
+5    *  you may not use this file except in compliance with the License.
+6    *  You may obtain a copy of the License at
+7    *
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   *  Unless required by applicable law or agreed to in writing, software
+11   *  distributed under the License is distributed on an "AS IS" BASIS,
+12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   *  See the License for the specific language governing permissions and
+14   *  limitations under the License.
+15   *
+16   */
+17  package org.apache.kandula.wscoor;
+18  
+19  import javax.xml.namespace.QName;
+20  
+21  import org.apache.axiom.om.OMAbstractFactory;
+22  import org.apache.axiom.om.OMElement;
+23  import org.apache.axiom.om.OMNamespace;
+24  import org.apache.axiom.soap.SOAPFactory;
+25  import org.apache.axis2.AxisFault;
+26  import org.apache.axis2.addressing.EndpointReference;
+27  import org.apache.axis2.context.OperationContext;
+28  import org.apache.axis2.wsdl.WSDLConstants;
+29  import org.apache.kandula.Constants;
+30  import org.apache.kandula.coordinator.Coordinator;
+31  import org.apache.kandula.faults.AbstractKandulaException;
+32  import org.apache.kandula.storage.StorageFactory;
+33  import org.apache.kandula.utility.EndpointReferenceFactory;
+34  
+35  /***
+36   * @author <a href="mailto:thilina@apache.org"> Thilina Gunarathne </a>
+37   */
+38  
+39  public class RegistrationPortTypeRawXMLSkeleton {
+40  	private OperationContext opContext;
+41  
+42  	public void setOperationContext(OperationContext opContext) {
+43  		this.opContext = opContext;
+44  	}
+45  
+46  	public OMElement registerOperation(OMElement request) throws AxisFault {
+47  
+48  		String protocolIdentifier;
+49  		EndpointReference participantEPR;
+50  		String activityId;
+51  		StorageFactory.getInstance().setConfigurationContext(
+52  				opContext.getServiceContext().getConfigurationContext());
+53  		/*
+54  		 * Extracting data from the received message
+55  		 */
+56  		protocolIdentifier = request.getFirstChildWithName(
+57  				new QName("ProtocolIdentifier")).getText();
+58  		OMElement participantEPRElement = request
+59  				.getFirstChildWithName(new QName("ParticipantProtocolService"));
+60  		// Extracting the participant EPR
+61  		participantEPR = EndpointReferenceFactory
+62  				.endpointFromOM(participantEPRElement);
+63  
+64  		OMElement header = opContext.getMessageContext(
+65  				WSDLConstants.MESSAGE_LABEL_IN_VALUE).getEnvelope().getHeader();
+66  		activityId = header.getFirstChildWithName(
+67  				Constants.TRANSACTION_ID_PARAMETER).getText();
+68  		/*
+69  		 * Registering the participant for the activity for the given protocol
+70  		 */
+71  		try {
+72  			Coordinator coordinator = new Coordinator();
+73  			EndpointReference epr = coordinator.registerParticipant(activityId,
+74  					protocolIdentifier, participantEPR);
+75  			SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
+76  			OMNamespace wsCoor = factory.createOMNamespace(Constants.WS_COOR,
+77  					"wscoor");
+78  			OMElement responseEle = factory.createOMElement("RegisterResponse",
+79  					wsCoor);
+80  			responseEle.addChild(toOM(epr));
+81  			return responseEle;
+82  		} catch (AbstractKandulaException e) {
+83  			AxisFault fault = new AxisFault(e);
+84  			fault.setFaultCode(e.getFaultCode());
+85  			throw fault;
+86  		}
+87  	}
+88  
+89  	/***
+90  	 * Serializes an EndpointRefrence to OM Nodes
+91  	 */
+92  	private OMElement toOM(EndpointReference epr) {
+93  		SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
+94  		OMNamespace wsCoor = factory.createOMNamespace(
+95  				org.apache.kandula.Constants.WS_COOR, "wscoor");
+96  		OMElement protocolService = factory.createOMElement(
+97  				"CoordinatorProtocolService", wsCoor);
+98  		OMElement coordinatorProtocolService = factory.createOMElement(
+99  				"CoordinatorProtocolService", wsCoor);
+100 		EndpointReferenceFactory.endpointToOM(epr, coordinatorProtocolService,
+101 				factory);
+102 		protocolService.addChild(coordinatorProtocolService);
+103 		return protocolService;
+104 	}
+105 }
+
+
+ + Added: webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSyncMessageReceiver.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSyncMessageReceiver.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSyncMessageReceiver.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSyncMessageReceiver.html Sat May 13 20:09:04 2006 @@ -0,0 +1,94 @@ + + + +RegistrationPortTypeRawXMLSyncMessageReceiver xref + + + +
+
+1   /*
+2    * Copyright  2004 The Apache Software Foundation.
+3    *
+4    *  Licensed under the Apache License, Version 2.0 (the "License");
+5    *  you may not use this file except in compliance with the License.
+6    *  You may obtain a copy of the License at
+7    *
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   *  Unless required by applicable law or agreed to in writing, software
+11   *  distributed under the License is distributed on an "AS IS" BASIS,
+12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   *  See the License for the specific language governing permissions and
+14   *  limitations under the License.
+15   *
+16   */
+17  package org.apache.kandula.wscoor;
+18  
+19  import org.apache.axiom.om.OMElement;
+20  import org.apache.axiom.soap.SOAPEnvelope;
+21  import org.apache.axis2.AxisFault;
+22  import org.apache.axis2.description.AxisOperation;
+23  import org.apache.axis2.engine.DependencyManager;
+24  import org.apache.kandula.Constants;
+25  
+26  /***
+27   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+28   */
+29  public class RegistrationPortTypeRawXMLSyncMessageReceiver extends
+30  		org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver {
+31  
+32  	public void invokeBusinessLogic(
+33  			org.apache.axis2.context.MessageContext msgContext,
+34  			org.apache.axis2.context.MessageContext newMsgContext)
+35  			throws org.apache.axis2.AxisFault {
+36  
+37  		try {
+38  
+39  			// get the implementation class for the Web Service
+40  			Object obj = getTheImplementationObject(msgContext);
+41  
+42  			// Inject the Message Context if it is asked for
+43  			DependencyManager.configureBusinessLogicProvider(obj, msgContext
+44  					.getOperationContext());
+45  
+46  			RegistrationPortTypeRawXMLSkeleton skel = (RegistrationPortTypeRawXMLSkeleton) obj;
+47  			// Out Envelop
+48  			SOAPEnvelope envelope = null;
+49  			// Find the operation that has been set by the Dispatch phase.
+50  			AxisOperation op = msgContext.getOperationContext()
+51  					.getAxisOperation();
+52  
+53  			String methodName;
+54  			if (op.getName() != null
+55  					& (methodName = op.getName().getLocalPart()) != null) {
+56  				if (("registerOperation").equals(methodName)) {
+57  					OMElement response = null;
+58  
+59  					// doc style
+60  					response = skel
+61  							.registerOperation((OMElement) msgContext
+62  									.getEnvelope().getBody().getFirstElement()
+63  									.detach());
+64  
+65  					// Create a default envelop
+66  					envelope = getSOAPFactory(msgContext).getDefaultEnvelope();
+67  					// Create a Omelement of the result if a result exist
+68  
+69  					envelope.getBody().setFirstChild(response);
+70  				}
+71  				newMsgContext.setEnvelope(envelope);
+72  				newMsgContext.setWSAAction(Constants.WS_COOR_REGISTER_RESPONSE);
+73  				newMsgContext.setRelationships(null);
+74  			}
+75  		} catch (Exception e) {
+76  			throw AxisFault.makeFault(e);
+77  		}
+78  
+79  	}
+80  
+81  }
+
+
+ + Added: webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.html Sat May 13 20:09:04 2006 @@ -0,0 +1,80 @@ + + + +RegistrationRequesterPortTypeRawXMLSkeleton xref + + + +
+
+1   /*
+2    * Copyright  2004 The Apache Software Foundation.
+3    *
+4    *  Licensed under the Apache License, Version 2.0 (the "License");
+5    *  you may not use this file except in compliance with the License.
+6    *  You may obtain a copy of the License at
+7    *
+8    *      http://www.apache.org/licenses/LICENSE-2.0
+9    *
+10   *  Unless required by applicable law or agreed to in writing, software
+11   *  distributed under the License is distributed on an "AS IS" BASIS,
+12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13   *  See the License for the specific language governing permissions and
+14   *  limitations under the License.
+15   *
+16   */
+17  package org.apache.kandula.wscoor;
+18  
+19  import org.apache.axiom.om.OMElement;
+20  import org.apache.axiom.om.OMException;
+21  import org.apache.axis2.AxisFault;
+22  import org.apache.axis2.addressing.EndpointReference;
+23  import org.apache.axis2.context.MessageContext;
+24  import org.apache.axis2.context.OperationContext;
+25  import org.apache.axis2.wsdl.WSDLConstants;
+26  import org.apache.kandula.Constants;
+27  import org.apache.kandula.context.AbstractContext;
+28  import org.apache.kandula.context.impl.ATActivityContext;
+29  import org.apache.kandula.storage.StorageFactory;
+30  import org.apache.kandula.utility.EndpointReferenceFactory;
+31  
+32  /***
+33   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+34   */
+35  
+36  public class RegistrationRequesterPortTypeRawXMLSkeleton {
+37  	private OperationContext opContext;
+38  
+39  	public void setOperationContext(OperationContext opContext) {
+40  		this.opContext = opContext;
+41  	}
+42  
+43  	public OMElement registerResponseOperation(OMElement responseElement) throws AxisFault{
+44  
+45  		OMElement response = responseElement.getFirstElement();
+46  		if ("CoordinatorProtocolService".equals(response.getLocalName())) {
+47  			OMElement header = opContext.getMessageContext(
+48  					WSDLConstants.MESSAGE_LABEL_IN_VALUE).getEnvelope().getHeader();
+49  			String requesterID = header.getFirstChildWithName(
+50  					Constants.REQUESTER_ID_PARAMETER).getText();
+51  			EndpointReference coordinatorService = EndpointReferenceFactory
+52  					.endpointFromOM(response.getFirstElement());
+53  			AbstractContext context;
+54  
+55  			context = (AbstractContext) StorageFactory.getInstance()
+56  					.getInitiatorStore().get(requesterID);
+57  			if (context == null) {
+58  				context = (AbstractContext) StorageFactory.getInstance()
+59  						.getStore().get(requesterID);
+60  			}
+61  
+62  			context.setProperty(ATActivityContext.COORDINATION_EPR,
+63  					coordinatorService);
+64  		}
+65  		return null;
+66  	}
+67  }
+
+
+ + Added: webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-frame.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,55 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference Package org.apache.kandula.wscoor + + + + +

+ org.apache.kandula.wscoor +

+ +

Classes

+ + + + + Added: webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-summary.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-summary.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-summary.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/wscoor/package-summary.html Sat May 13 20:09:04 2006 @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference Package + + + + + + + + +
+ +
+
+ +
+ + + + + +

Package org.apache.kandula.wscoor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ ActivationCoordinatorPortTypeRawXMLStub +
+ ActivationPortTypeRawXMLSkeleton +
+ ActivationPortTypeRawXMLSyncMessageReceiver +
+ ActivationRequesterPortTypeRawXMLSkeleton +
+ RegistrationCoordinatorPortTypeRawXMLStub +
+ RegistrationPortTypeRawXMLSkeleton +
+ RegistrationPortTypeRawXMLSyncMessageReceiver +
+ RegistrationRequesterPortTypeRawXMLSkeleton +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref/overview-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/overview-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/overview-frame.html (added) +++ webservices/kandula/site/2/xref/overview-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,83 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference + + + + +

+ All Classes +

+ +

Packages

+ + + + + Added: webservices/kandula/site/2/xref/overview-summary.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/overview-summary.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/overview-summary.html (added) +++ webservices/kandula/site/2/xref/overview-summary.html Sat May 13 20:09:04 2006 @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference + + + + + + + + +
+
    +
  • Overview
  • +
  • Package
  • +
+
+
+ +
+ + + + + +

Apache Kandula2 0.1-SNAPSHOT Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages
+ org.apache.kandula +
+ org.apache.kandula.context +
+ org.apache.kandula.context.impl +
+ org.apache.kandula.coordinator +
+ org.apache.kandula.coordinator.at +
+ org.apache.kandula.coordinator.ba +
+ org.apache.kandula.faults +
+ org.apache.kandula.initiator +
+ org.apache.kandula.participant +
+ org.apache.kandula.storage +
+ org.apache.kandula.utility +
+ org.apache.kandula.wsat +
+ org.apache.kandula.wsat.completion +
+ org.apache.kandula.wsat.twopc +
+ org.apache.kandula.wscoor +
+ + + + + +
+
    +
  • Overview
  • +
  • Package
  • +
+
+
+ +
+ + + + +
+ Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref/stylesheet.css URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/stylesheet.css?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/stylesheet.css (added) +++ webservices/kandula/site/2/xref/stylesheet.css Sat May 13 20:09:04 2006 @@ -0,0 +1,96 @@ +/* Javadoc style sheet */ +/* Define colors, fonts and other style attributes here to override the defaults */ +body { + background-color: #fff; + font-family: Arial, Helvetica, sans-serif; +} + +a:link { + color: #00f; +} +a:visited { + color: #00a; +} + +a:active, a:hover { + color: #f30 !important; +} + +ul, li { + list-style-type:none ; + margin:0; + padding:0; +} + +table td{ + padding: 3px; + border: 1px solid #000; +} +table{ + width:100%; + border: 1px solid #000; + border-collapse: collapse; +} + +div.overview { + background-color:#ddd; + padding: 4px 4px 4px 0; +} +div.overview li, div.framenoframe li { + display: inline; +} +div.framenoframe { + text-align: center; + font-size: x-small; +} +div.framenoframe li { + margin: 0 3px 0 3px; +} +div.overview li { + margin:3px 3px 0 3px; + padding: 4px; +} +li.selected { + background-color:#888; + color: #fff; + font-weight: bold; +} + +table.summary { + margin-bottom: 20px; +} +table.summary td, table.summary th { + font-weight: bold; + text-align: left; + padding: 3px; +} +table.summary th{ + background-color:#036; + color: #fff; +} +table.summary td{ + background-color:#eee; + border: 1px solid black; +} + +em { + color: #A00; +} +em.comment { + color: #390; +} +.string { + color: #009; +} +div#footer { + text-align:center; +} +#overview { + padding:2px; +} + + +hr { + height: 1px; + color: #000; +} \ 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