You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/02/16 07:35:13 UTC
svn commit: r508322 - in
/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src:
main/java/org/apache/tuscany/sca/test/exceptions/impl/
main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/
main/resources/ME...
Author: rfeng
Date: Thu Feb 15 22:35:12 2007
New Revision: 508322
URL: http://svn.apache.org/viewvc?view=rev&rev=508322
Log:
[sca-integration-branch] Format the itest code. With a series of fixes I just checked in, it should be working now.
Modified:
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/resources/META-INF/sca/intracomposite.scdl
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java Thu Feb 15 22:35:12 2007
@@ -22,13 +22,12 @@
import org.apache.tuscany.api.annotation.DataType;
import org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest;
import org.osoa.sca.annotations.Remotable;
-import org.osoa.sca.annotations.Service;
/**
*
*/
@Remotable
-@DataType(name="javax.xml.bind.JAXBElement")
+@DataType(name = "javax.xml.bind.JAXBElement")
public interface StockExceptionTestJAXB extends StockExceptionTest {
-}
\ No newline at end of file
+}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java Thu Feb 15 22:35:12 2007
@@ -36,32 +36,34 @@
*
*/
public StockExchangeJaxB() {
-
+
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest#stockQuoteOffer(org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockOffer)
*/
public StockOffer stockQuoteOffer(StockOffer input) throws InvalidSymbolFault_Exception, MarketClosedFault {
- System.out.println("stockQuoteOffer '" + input +"'");
-
- String symbol= input.getSymbol();
- if("IBM".equals(symbol)){
- input.setPrice(99.00F);
- return input;
-
- }
- if("CLOSED".equals(input.getName())){
- throw new MarketClosedFault("TO LATE!", 3);
- }
- ObjectFactory jaxbOjectFactory = new ObjectFactory();
-
- InvalidSymbolFault faultinfo= jaxbOjectFactory.createInvalidSymbolFault();
- faultinfo.setOffer(input);
-
- throw new InvalidSymbolFault_Exception("bad symbol", faultinfo);
-
+ System.out.println("stockQuoteOffer '" + input + "'");
+
+ String symbol = input.getSymbol();
+ if ("IBM".equals(symbol)) {
+ input.setPrice(99.00F);
+ return input;
+
+ }
+ if ("CLOSED".equals(input.getName())) {
+ throw new MarketClosedFault("TO LATE!", 3);
+ }
+ ObjectFactory jaxbOjectFactory = new ObjectFactory();
+
+ InvalidSymbolFault faultinfo = jaxbOjectFactory.createInvalidSymbolFault();
+ faultinfo.setOffer(input);
+
+ throw new InvalidSymbolFault_Exception("bad symbol", faultinfo);
+
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java Thu Feb 15 22:35:12 2007
@@ -46,13 +46,14 @@
// TODO Auto-generated constructor stub
}
-
@Reference
public void setExchangeJaxb(StockExceptionTest exchangeJaxb) {
this.exchangeJaxb = exchangeJaxb;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDO#tradingTest()
*/
public void tradingTest() {
@@ -73,7 +74,8 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
-if(true) return; //lets see if what we know is supported runs first.
+ if (true)
+ return; // lets see if what we know is supported runs first.
// set up for a InvalidSymbolSDOException
stockOffer.setName("");
stockOffer.setSymbol("");
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java Thu Feb 15 22:35:12 2007
@@ -35,12 +35,12 @@
/**
* @param message
- * @param faultInfo
+ * @param faultInfo
*/
public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo) {
super(message);
this.faultInfo = faultInfo;
-
+
}
/**
@@ -49,33 +49,29 @@
public InvalidSymbolSDOException(InvalidSymbolFault faultInfo, Throwable cause) {
super(cause);
this.faultInfo = faultInfo;
-
+
}
/**
* @param message
* @param cause
*/
- public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo, Throwable cause) {
+ public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo, Throwable cause) {
super(message, cause);
this.faultInfo = faultInfo;
-
+
}
-
- // *** Below was hand added ... tooling needs to do this ***/
-
+ // *** Below was hand added ... tooling needs to do this ***/
+
/**
* Java type that goes as soapenv:Fault detail element.
- *
*/
private InvalidSymbolFault faultInfo;
-
/**
- *
- * @return
- * returns fault bean: org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault
+ * @return returns fault bean:
+ * org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault
*/
public InvalidSymbolFault getFaultInfo() {
return faultInfo;
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java Thu Feb 15 22:35:12 2007
@@ -23,19 +23,17 @@
*
*/
public class MarketClosedSDOException extends Exception {
-
+
/**
* Java type that goes as soapenv:Fault detail element.
- *
*/
private int faultInfo;
-
/**
*
*/
public MarketClosedSDOException() {
-
+
}
/**
@@ -49,7 +47,7 @@
/**
* @param cause
*/
- public MarketClosedSDOException( int faultInfo, Throwable cause) {
+ public MarketClosedSDOException(int faultInfo, Throwable cause) {
super(cause);
this.faultInfo = faultInfo;
}
@@ -62,11 +60,9 @@
super(message, cause);
this.faultInfo = faultInfo;
}
-
+
/**
- *
- * @return
- * returns fault bean: int
+ * @return returns fault bean: int
*/
public int getFaultInfo() {
return faultInfo;
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java Thu Feb 15 22:35:12 2007
@@ -1,32 +1,46 @@
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+/**
+ * StockExceptionTest.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: #axisVersion# #today#
+ */
+package org.apache.tuscany.sca.test.exceptions.sdohandgen;
+
+import org.osoa.sca.annotations.Remotable;
+import org.apache.tuscany.api.annotation.DataType;
+
+/*
+ * StockExceptionTest java interface
+ */
+
+@Remotable
+@DataType(name = "commonj.sdo.DataObject")
+public interface StockExceptionTest {
/**
- * StockExceptionTest.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis2 version: #axisVersion# #today#
- */
- package org.apache.tuscany.sca.test.exceptions.sdohandgen;
-
- import org.osoa.sca.annotations.Remotable;
- import org.apache.tuscany.api.annotation.DataType;
-
- /*
- * StockExceptionTest java interface
+ * Auto generated method signatures
+ *
+ * @param param0
*/
+ public stockexceptiontestservice.scatesttool.StockOffer stockQuoteOffer(stockexceptiontestservice.scatesttool.StockOffer param0)
+ throws java.rmi.RemoteException, InvalidSymbolSDOException, MarketClosedSDOException;
- @Remotable
- @DataType(name="commonj.sdo.DataObject")
- public interface StockExceptionTest {
-
- /**
- * Auto generated method signatures
- * @param param0
- */
- public stockexceptiontestservice.scatesttool.StockOffer stockQuoteOffer(
- stockexceptiontestservice.scatesttool.StockOffer param0) throws java.rmi.RemoteException, InvalidSymbolSDOException, MarketClosedSDOException;
-
- }
-
-
-
\ No newline at end of file
+}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/resources/META-INF/sca/intracomposite.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/resources/META-INF/sca/intracomposite.scdl?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/resources/META-INF/sca/intracomposite.scdl (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/main/resources/META-INF/sca/intracomposite.scdl Thu Feb 15 22:35:12 2007
@@ -1,33 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- name="intracomposite">
-
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:foo="http://foo"
+ xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" name="intracomposite">
+
+ <dbsdo:import.sdo factory="stockexceptiontestservice.scatesttool.ScatesttoolFactory" />
+
<component name="stockTraderSDOComponent">
- <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDOImpl"/>
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDOImpl" />
<reference name="exchangeJaxb">exchangeJaxbComponent</reference>
</component>
-
+
<component name="exchangeJaxbComponent">
- <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.StockExchangeJaxB"/>
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.StockExchangeJaxB" />
</component>
-
+
</composite>
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java?view=diff&rev=508322&r1=508321&r2=508322
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java Thu Feb 15 22:35:12 2007
@@ -33,7 +33,7 @@
public void testALL() {
stockTrader.tradingTest();
-
+
}
@Override
@@ -41,8 +41,7 @@
super.setUp();
context = CurrentCompositeContext.getContext();
assertNotNull(context);
- stockTrader = context.locateService(StockTraderSDO.class, "stockTraderSDOComponent" );
-
+ stockTrader = context.locateService(StockTraderSDO.class, "stockTraderSDOComponent");
assertNotNull(context);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org