Author: slaws
Date: Thu Feb 19 13:35:21 2009
New Revision: 745854
URL: http://svn.apache.org/viewvc?rev=745854&view=rev
Log:
Add a method that returns an unchecked exception
Modified:
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/resources/wsdl/ExampleService.wsdl
Modified:
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java?rev=745854&r1=745853&r2=745854&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
Thu Feb 19 13:35:21 2009
@@ -40,5 +40,12 @@
} catch (BusinessException e) {
System.out.println("caught exception from hello(): " +
e.getMessage() + " for " + e.getClientName());
}
+
+ try {
+ Object result = myService.helloUnchecked("John");
+ System.out.println("myService returned " +
result.getClass().getName());
+ } catch (Exception e) {
+ System.out.println("caught exception from helloUnchecked(): " +
e.getMessage());
+ }
}
}
Modified:
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java?rev=745854&r1=745853&r2=745854&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
Thu Feb 19 13:35:21 2009
@@ -24,4 +24,5 @@
public interface ExampleService {
String hello(String name) throws BusinessException;
+ String helloUnchecked(String name);
}
Modified:
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java?rev=745854&r1=745853&r2=745854&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
Thu Feb 19 13:35:21 2009
@@ -18,9 +18,15 @@
*/
package com.example;
+import org.osoa.sca.ServiceRuntimeException;
+
public class ExampleServiceImpl implements ExampleService {
public String hello(String name) throws BusinessException {
throw new BusinessException("bad news", name);
// return "Hello, " + name;
}
+
+ public String helloUnchecked(String name){
+ throw new ServiceRuntimeException("bad unchecked news");
+ }
}
Modified:
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/resources/wsdl/ExampleService.wsdl
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/resources/wsdl/ExampleService.wsdl?rev=745854&r1=745853&r2=745854&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/resources/wsdl/ExampleService.wsdl
(original)
+++
tuscany/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/resources/wsdl/ExampleService.wsdl
Thu Feb 19 13:35:21 2009
@@ -69,6 +69,10 @@
<wsdl:fault message="ns0:BusinessException"
name="BusinessException"
wsaw:Action="urn:helloBusinessException" />
</wsdl:operation>
+ <wsdl:operation name="helloUnchecked">
+ <wsdl:input message="ns0:helloRequest" wsaw:Action="urn:hello" />
+ <wsdl:output message="ns0:helloResponse"
wsaw:Action="urn:helloResponse" />
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ExampleServiceSOAP11Binding"
type="ns0:ExampleServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
@@ -84,6 +88,15 @@
<soap:fault use="literal" name="BusinessException" />
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="helloUnchecked">
+ <soap:operation soapAction="urn:helloUnchecked" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ExampleServiceSOAP12Binding"
type="ns0:ExampleServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
@@ -99,6 +112,15 @@
<soap12:fault use="literal" name="BusinessException" />
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="helloUnchecked">
+ <soap12:operation soapAction="urn:helloUnchecked" style="document"
/>
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ExampleServiceHttpBinding"
type="ns0:ExampleServicePortType">
<http:binding verb="POST" />
@@ -111,6 +133,15 @@
<mime:content type="text/xml" part="hello" />
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="helloUnchecked">
+ <http:operation location="ExampleService/helloUnchecked" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="hello" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="hello" />
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:service name="ExampleService">
<wsdl:port name="ExampleServiceSOAP11port_http"
binding="ns0:ExampleServiceSOAP11Binding">