Return-Path: Delivered-To: apmail-ws-kandula-dev-archive@www.apache.org Received: (qmail 24638 invoked from network); 14 May 2006 03:10:54 -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:54 -0000 Received: (qmail 54952 invoked by uid 500); 14 May 2006 03:10:45 -0000 Delivered-To: apmail-ws-kandula-dev-archive@ws.apache.org Received: (qmail 53644 invoked by uid 500); 14 May 2006 03:10:31 -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 53417 invoked by uid 500); 14 May 2006 03:10:27 -0000 Delivered-To: apmail-ws-kandula-cvs@ws.apache.org Received: (qmail 53189 invoked by uid 99); 14 May 2006 03:10:22 -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:22 -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:02 -0700 Received: (qmail 23016 invoked by uid 65534); 14 May 2006 03:09:41 -0000 Message-ID: <20060514030941.23015.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r406210 [7/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/ x... 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-test/org/apache/kandula/coordinator/CoordinatorImplTest.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/CoordinatorImplTest.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/CoordinatorImplTest.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/CoordinatorImplTest.html Sat May 13 20:09:04 2006 @@ -0,0 +1,102 @@ + + + +CoordinatorImplTest 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.coordinator;
+18  
+19  import junit.framework.TestCase;
+20  
+21  import org.apache.axis2.addressing.EndpointReference;
+22  import org.apache.kandula.Constants;
+23  import org.apache.kandula.Status;
+24  import org.apache.kandula.context.AbstractContext;
+25  import org.apache.kandula.context.CoordinationContext;
+26  import org.apache.kandula.context.impl.ATActivityContext;
+27  import org.apache.kandula.faults.AbstractKandulaException;
+28  
+29  /***
+30   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+31   */
+32  public class CoordinatorImplTest extends TestCase {
+33  
+34  	/*
+35  	 * @see TestCase#setUp()
+36  	 */
+37  	protected void setUp() throws Exception {
+38  		super.setUp();
+39  	}
+40  
+41  	/*
+42  	 * @see TestCase#tearDown()
+43  	 */
+44  	protected void tearDown() throws Exception {
+45  		super.tearDown();
+46  	}
+47  
+48  	/*
+49  	 * Class under test for ActivityContext createCoordinationContext(String,
+50  	 * long)
+51  	 */
+52  	public void testCreateCoordinationContextStringlong()
+53  			throws AbstractKandulaException {
+54  		Coordinator coordinator = new Coordinator();
+55  		AbstractContext context = coordinator.createCoordinationContext(
+56  				Constants.WS_AT, 3000);
+57  		assertTrue(ATActivityContext.class.isInstance(context));
+58  		assertNotNull(context.getCoordinationContext());
+59  		assertTrue(context.getStatus() == Status.CoordinatorStatus.STATUS_ACTIVE);
+60  	}
+61  
+62  	/*
+63  	 * Class under test for ActivityContext
+64  	 * createCoordinationContext(CoordinationContext)
+65  	 */
+66  	public void testCreateCoordinationContextCoordinationContext()
+67  			throws AbstractKandulaException {
+68  		Coordinator coordinator = new Coordinator();
+69  		CoordinationContext coorContext = CoordinationContext.Factory
+70  				.newContext("uuid:29919219jdk02102021", Constants.WS_AT,
+71  						new EndpointReference(""));
+72  		coorContext.setExpires(3000);
+73  		// coorContext.setRegistrationService()
+74  		AbstractContext context = coordinator
+75  				.createCoordinationContext(coorContext);
+76  		assertTrue(ATActivityContext.class.isInstance(context));
+77  		assertNotNull(context.getCoordinationContext());
+78  		assertTrue(context.getStatus() == Status.CoordinatorStatus.STATUS_ACTIVE);
+79  		assertEquals(context.getCoordinationContext().getCoordinationType(),
+80  				coorContext.getCoordinationType());
+81  		assertEquals(context.getCoordinationContext().getActivityID(),
+82  				coorContext.getActivityID());
+83  	}
+84  
+85  	public void testRegisterParticipant() {
+86  		// TODO Implement registerParticipant().
+87  	}
+88  
+89  }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/ATCoordinatorTest.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/ATCoordinatorTest.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/ATCoordinatorTest.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/ATCoordinatorTest.html Sat May 13 20:09:04 2006 @@ -0,0 +1,63 @@ + + + +ATCoordinatorTest 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.coordinator.at;
+18  
+19  import junit.framework.TestCase;
+20  
+21  /***
+22   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+23   */
+24  public class ATCoordinatorTest extends TestCase {
+25  
+26  	/*
+27  	 * @see TestCase#setUp()
+28  	 */
+29  	protected void setUp() throws Exception {
+30  		super.setUp();
+31  	}
+32  
+33  	/***
+34  	 * Constructor for ATCoordinatorTest.
+35  	 * 
+36  	 * @param arg0
+37  	 */
+38  	public ATCoordinatorTest(String arg0) {
+39  		super(arg0);
+40  	}
+41  
+42  	public void testCommitOperation() {
+43  		// TODO Implement commitOperation().
+44  	}
+45  
+46  	public void testRollbackOperation() {
+47  		// TODO Implement rollbackOperation().
+48  	}
+49  
+50  }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/package-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/package-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/package-frame.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/at/package-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,27 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference Package org.apache.kandula.coordinator.at + + + + +

+ org.apache.kandula.coordinator.at +

+ +

Classes

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

Package org.apache.kandula.coordinator.at

+ + + + + + + + + + + + + + + +
Class Summary
+ ATCoordinatorTest +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/package-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/package-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/package-frame.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/coordinator/package-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,27 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference Package org.apache.kandula.coordinator + + + + +

+ org.apache.kandula.coordinator +

+ +

Classes

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

Package org.apache.kandula.coordinator

+ + + + + + + + + + + + + + + +
Class Summary
+ CoordinatorImplTest +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/integration/CreateCoordinationContextTest.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/integration/CreateCoordinationContextTest.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/integration/CreateCoordinationContextTest.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/integration/CreateCoordinationContextTest.html Sat May 13 20:09:04 2006 @@ -0,0 +1,125 @@ + + + +CreateCoordinationContextTest xref + + + +
+
+1   /*
+2    * Copyright 2004,2005 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.integration;
+18  
+19  /***
+20   * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
+21   */
+22  
+23  import java.io.File;
+24  
+25  import junit.framework.TestCase;
+26  
+27  import org.apache.axis2.addressing.EndpointReference;
+28  import org.apache.axis2.context.ConfigurationContext;
+29  import org.apache.axis2.context.ConfigurationContextFactory;
+30  import org.apache.axis2.transport.http.SimpleHTTPServer;
+31  import org.apache.kandula.Constants;
+32  import org.apache.kandula.initiator.TransactionManager;
+33  
+34  public class CreateCoordinationContextTest extends TestCase {
+35  
+36  	private String repository = "target/testing-repository";
+37  
+38  	private KandulaDemoServiceStub stub;
+39  
+40  	private SimpleHTTPServer server;
+41  
+42  	public CreateCoordinationContextTest() throws Exception {
+43  		super(CreateCoordinationContextTest.class.getName());
+44  		stub = new KandulaDemoServiceStub(
+45  				"target/initiator-repository",
+46  				new EndpointReference(
+47  						"http://localhost:8081/axis2/services/KandulaDemoService"));
+48  	}
+49  
+50  	public CreateCoordinationContextTest(String testName) throws Exception {
+51  		super(testName);
+52  		stub = new KandulaDemoServiceStub(
+53  				"target/initiator-repository",
+54  				new EndpointReference(
+55  						"http://localhost:8081/axis2/services/KandulaDemoService"));
+56  	}
+57  
+58  	protected void setUp() throws Exception {
+59  		File file = new File(repository);
+60  		File configFile = new File(repository + "/axis2.xml");
+61  		if (!file.exists()) {
+62  			throw new Exception("repository directory "
+63  					+ file.getAbsolutePath() + " does not exists");
+64  		}
+65  		ConfigurationContext er = ConfigurationContextFactory
+66  				.createConfigurationContextFromFileSystem(file
+67  						.getAbsolutePath(), configFile.getAbsolutePath());
+68  
+69  		server = new SimpleHTTPServer(er, 8081);
+70  
+71  		try {
+72  			server.start();
+73  			System.out.print("Server started on port " + 8081 + ".....");
+74  		} finally {
+75  
+76  		}
+77  	}
+78  
+79  	protected void tearDown() throws Exception {
+80  		server.stop();
+81  	}
+82  
+83  	public void testEchoXMLASync() throws Exception {
+84  		TransactionManager tm = new TransactionManager(
+85  				Constants.WS_AT,
+86  				new EndpointReference(
+87  						"http://localhost:8081/axis2/services/ActivationCoordinator"));
+88  		tm.begin("target/initiator-repository",
+89  				"target/initiator-repository/axis2.xml", true);
+90  		try {
+91  			stub.creditOperation();
+92  		} catch (Exception e) {
+93  			tm.rollback();
+94  		}
+95  		tm.commit();
+96  	}
+97  
+98  //	public void testEchoXMLSync() throws Exception {
+99  //		TransactionManager tm = new TransactionManager(
+100 //				Constants.WS_AT,
+101 //				new EndpointReference(
+102 //						"http://localhost:8082/axis2/services/ActivationCoordinator"));
+103 //		tm.begin("target/initiator-repository",
+104 //				"target/initiator-repository/axis2.xml", false);
+105 //		try {
+106 //			stub.creditOperation();
+107 //		} catch (Exception e) {
+108 //			tm.rollback();
+109 //		}
+110 //		tm.commit();
+111 //	}
+112 }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/integration/DummyResource.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/integration/DummyResource.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/integration/DummyResource.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/integration/DummyResource.html Sat May 13 20:09:04 2006 @@ -0,0 +1,67 @@ + + + +DummyResource 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.integration;
+18  
+19  import org.apache.kandula.Constants;
+20  import org.apache.kandula.participant.KandulaResource;
+21  import org.apache.kandula.participant.Vote;
+22  
+23  /***
+24   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+25   */
+26  public class DummyResource implements KandulaResource {
+27  
+28  	/***
+29  	 * 
+30  	 */
+31  	public DummyResource() {
+32  		super();
+33  		// TODO Auto-generated constructor stub
+34  	}
+35  
+36  	public boolean commit() {
+37  		System.out.println("Commited");
+38  		return true;
+39  	}
+40  
+41  	public void rollback() {
+42  		System.out.println("rollback");
+43  
+44  	}
+45  
+46  	public Vote prepare() {
+47  		return Vote.PREPARED;
+48  	}
+49  
+50  	public String getProtocol() {
+51  		return Constants.WS_AT_DURABLE2PC;
+52  	}
+53  
+54  }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoService.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoService.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoService.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoService.html Sat May 13 20:09:04 2006 @@ -0,0 +1,49 @@ + + + +KandulaDemoService 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.integration;
+18  
+19  import org.apache.axiom.om.OMElement;
+20  
+21  /***
+22   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+23   */
+24  public class KandulaDemoService {
+25  
+26  	/***
+27  	 * 
+28  	 */
+29  	public KandulaDemoService() {
+30  
+31  	}
+32  
+33  	public OMElement creditOperation(OMElement element) {
+34  		return null;
+35  	}
+36  }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoServiceStub.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoServiceStub.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoServiceStub.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/integration/KandulaDemoServiceStub.html Sat May 13 20:09:04 2006 @@ -0,0 +1,133 @@ + + + +KandulaDemoServiceStub 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.integration;
+18  
+19  import java.io.IOException;
+20  
+21  import org.apache.axiom.om.OMAbstractFactory;
+22  import org.apache.axiom.soap.SOAPEnvelope;
+23  import org.apache.axiom.soap.SOAPFactory;
+24  import org.apache.axis2.AxisFault;
+25  import org.apache.axis2.addressing.AddressingConstants;
+26  import org.apache.axis2.addressing.EndpointReference;
+27  import org.apache.axis2.client.OperationClient;
+28  import org.apache.axis2.client.Options;
+29  import org.apache.axis2.context.ConfigurationContext;
+30  import org.apache.axis2.context.ConfigurationContextFactory;
+31  import org.apache.axis2.context.MessageContext;
+32  import org.apache.axis2.context.ServiceContext;
+33  import org.apache.axis2.context.ServiceGroupContext;
+34  import org.apache.axis2.description.AxisOperation;
+35  import org.apache.axis2.description.AxisService;
+36  import org.apache.axis2.description.AxisServiceGroup;
+37  import org.apache.axis2.description.OutOnlyAxisOperation;
+38  
+39  /***
+40   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+41   */
+42  
+43  public class KandulaDemoServiceStub extends org.apache.axis2.client.Stub {
+44  
+45  	public static final String AXIS2_HOME = ".";
+46  
+47  	// private AxisService service;
+48  	private ConfigurationContext configurationContext;
+49  
+50  	private ServiceContext serviceContext;
+51  
+52  	private EndpointReference toEPR;
+53  
+54  	private static org.apache.axis2.description.AxisOperation[] operations;
+55  
+56  	static {
+57  
+58  		// creating the Service
+59  		_service = new AxisService("KandulaDemoService");
+60  
+61  		// creating the operations
+62  		AxisOperation operationDesc;
+63  		operations = new org.apache.axis2.description.AxisOperation[1];
+64  
+65  		operationDesc = new OutOnlyAxisOperation();
+66  		operationDesc.setName(new javax.xml.namespace.QName("creditOperation"));
+67  		operations[0] = operationDesc;
+68  		_service.addOperation(operationDesc);
+69  
+70  	}
+71  
+72  	/***
+73  	 * Constructor
+74  	 */
+75  	public KandulaDemoServiceStub(String axis2Home,
+76  			EndpointReference targetEndpoint) throws java.lang.Exception {
+77  		this.toEPR = targetEndpoint;
+78  		// creating the configuration
+79  		configurationContext = ConfigurationContextFactory
+80  				.createConfigurationContextFromFileSystem(axis2Home, axis2Home
+81  						+ "/axis2.xml");
+82  		configurationContext.getAxisConfiguration().addService(_service);
+83  		ServiceGroupContext sgc = new ServiceGroupContext(
+84  				this.configurationContext, (AxisServiceGroup) _service
+85  						.getParent());
+86  		this.serviceContext = new ServiceContext(_service, sgc);
+87  
+88  	}
+89  
+90  	public void creditOperation() throws IOException, AxisFault{
+91  
+92  		Options options = new Options();
+93  		MessageContext messageContext = new MessageContext();
+94  		messageContext.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,
+95  				AddressingConstants.Submission.WSA_NAMESPACE);
+96  		SOAPEnvelope env = createSOAPEnvelope();
+97  		messageContext.setEnvelope(env);
+98  
+99  		// _service.engageModule("addressing");
+100 
+101 		options.setAction("creditOperation");
+102 		options.setTo(this.toEPR);
+103 
+104 		// messageSender
+105 		// .setSenderTransport(org.apache.axis2.Constants.TRANSPORT_HTTP);
+106 		OperationClient client = operations[0].createClient(serviceContext,
+107 				options);
+108 		client.addMessageContext(messageContext);
+109 		client.execute(true);
+110 
+111 	}
+112 
+113 	private SOAPEnvelope createSOAPEnvelope() {
+114 
+115 		SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
+116 		SOAPEnvelope env = factory.getDefaultEnvelope();
+117 		return env;
+118 	}
+119 
+120 }
+
+
+ + Added: webservices/kandula/site/2/xref-test/org/apache/kandula/integration/package-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/org/apache/kandula/integration/package-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/org/apache/kandula/integration/package-frame.html (added) +++ webservices/kandula/site/2/xref-test/org/apache/kandula/integration/package-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,39 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference Package org.apache.kandula.integration + + + + +

+ org.apache.kandula.integration +

+ +

Classes

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

Package org.apache.kandula.integration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ CreateCoordinationContextTest +
+ DummyResource +
+ KandulaDemoService +
+ KandulaDemoServiceStub +
+ + + + + +
+ +
+
+ +
+ + + + + + +
+ + Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref-test/overview-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/overview-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/overview-frame.html (added) +++ webservices/kandula/site/2/xref-test/overview-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,39 @@ + + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference + + + + +

+ All Classes +

+ +

Packages

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

Apache Kandula2 0.1-SNAPSHOT Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages
+ org.apache.kandula.context +
+ org.apache.kandula.coordinator +
+ org.apache.kandula.coordinator.at +
+ org.apache.kandula.integration +
+ + + + + +
+
    +
  • Overview
  • +
  • Package
  • +
+
+
+ +
+ + + + +
+ Copyright © Apache Web Services. All Rights Reserved. + + + Added: webservices/kandula/site/2/xref-test/stylesheet.css URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref-test/stylesheet.css?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref-test/stylesheet.css (added) +++ webservices/kandula/site/2/xref-test/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 Added: webservices/kandula/site/2/xref/allclasses-frame.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/allclasses-frame.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/allclasses-frame.html (added) +++ webservices/kandula/site/2/xref/allclasses-frame.html Sat May 13 20:09:04 2006 @@ -0,0 +1,239 @@ + + + + + + + All Classes + + + + +

All Classes

+ + + + + Added: webservices/kandula/site/2/xref/index.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/index.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/index.html (added) +++ webservices/kandula/site/2/xref/index.html Sat May 13 20:09:04 2006 @@ -0,0 +1,22 @@ + + + + + + Apache Kandula2 0.1-SNAPSHOT Reference + + + + + + + + + + <h1>Frame Alert</h1> + <p> + You don't have frames. Go + <a href="overview-summary.html">here</a> + </p> + + Added: webservices/kandula/site/2/xref/org/apache/kandula/Constants.html URL: http://svn.apache.org/viewcvs/webservices/kandula/site/2/xref/org/apache/kandula/Constants.html?rev=406210&view=auto ============================================================================== --- webservices/kandula/site/2/xref/org/apache/kandula/Constants.html (added) +++ webservices/kandula/site/2/xref/org/apache/kandula/Constants.html Sat May 13 20:09:04 2006 @@ -0,0 +1,110 @@ + + + +Constants 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;
+18  
+19  import javax.xml.namespace.QName;
+20  
+21  /***
+22   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+23   */
+24  public interface Constants {
+25  	
+26  	// WS-Coordination URI's
+27  	
+28  	static final String WS_COOR = "http://schemas.xmlsoap.org/ws/2004/10/wscoor";
+29  	
+30  	static final String WS_COOR_CREATE_COORDINATIONCONTEXT = "http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContext";
+31  	
+32  	static final String WS_COOR_CREATE_COORDINATIONCONTEXT_RESPONSE = "http://schemas.xmlsoap.org/ws/2004/10/wscoor/CreateCoordinationContextResponse";
+33  	
+34  	static final String WS_COOR_REGISTER = "http://schemas.xmlsoap.org/ws/2004/10/wscoor/Register";
+35  	
+36  	static final String WS_COOR_REGISTER_RESPONSE = "http://schemas.xmlsoap.org/ws/2004/10/wscoor/RegisterResponse";
+37  	
+38  	// WS-AT URI's
+39  	
+40  	static final String WS_AT = "http://schemas.xmlsoap.org/ws/2004/10/wsat";
+41  	
+42  	static final String WS_AT_COMPLETION = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Completion";
+43  	
+44  	static final String WS_AT_COMMIT = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Commit";
+45  	
+46  	static final String WS_AT_COMMITTED = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Committed";
+47  	
+48  	static final String WS_AT_ROLLBACK = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Rollback";
+49  	
+50  	static final String WS_AT_ABORTED = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Aborted";
+51  	
+52  	static final String WS_AT_DURABLE2PC = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Durable2PC";
+53  	
+54  	static final String WS_AT_VOLATILE2PC = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Volatile2PC";
+55  	
+56  	static final String WS_AT_PREPARE = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepare";
+57  	
+58  	static final String WS_AT_PREPARED = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Prepared";
+59  	
+60  	static final String WS_AT_REPLAY = "http://schemas.xmlsoap.org/ws/2004/10/wsat/Replay";
+61  	
+62  	static final String WS_AT_READONLY = "http://schemas.xmlsoap.org/ws/2004/10/wsat/ReadOnly";
+63  	
+64  	static final String SUB_VOLATILE_REGISTERED = "registered for volatile 2PC";
+65  	
+66  	static final String SUB_DURABLE_REGISTERED = "registered for durable 2PC";
+67  	
+68  	// WS-BA URI's
+69  	
+70  	static final String WS_BA = "http://schemas.xmlsoap.org/ws/2004/10/wsba";
+71  	
+72  	// Kandula Specific
+73  	// Constants----------------------------------------------------------------------------------------------------
+74  	static String KANDULA_URI = "http://ws.apache.org/kandula";
+75  	
+76  	static String KANDULA_RESOURCE = "KandulaResource";
+77  	
+78  	static String KANDULA_PRE = "kand";
+79  	
+80  	static String KANDULA_STORE = "KandulaStore";
+81  	
+82  	// For the coordinator to identify seperate distributed
+83  	// activities(transactions)
+84  	// Common to all the parties participating in a single distributed tx.
+85  	static final QName TRANSACTION_ID_PARAMETER = new QName(KANDULA_URI,
+86  			"TransactionID", KANDULA_PRE);
+87  	
+88  	// Used by the Initiator Transaction Manager & participant TM to track the seperate transactions
+89  	static final QName REQUESTER_ID_PARAMETER = new QName(KANDULA_URI,
+90  			"RequesterID", KANDULA_PRE);
+91  	
+92  	// For the coordinator to identify each and every registered participant
+93  	// whithing a transaction
+94  	// This + Tx_ID will be unique for a participant
+95  	static final QName ENLISTMENT_ID_PARAMETER = new QName(KANDULA_URI,
+96  			"EnlistmentID", KANDULA_PRE);
+97  }
+
+
+ + --------------------------------------------------------------------- To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org For additional commands, e-mail: kandula-dev-help@ws.apache.org