You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2007/02/22 03:35:14 UTC
svn commit: r510353 - in /webservices/axis2/trunk/java/modules/jaxws:
src/org/apache/axis2/jaxws/marshaller/impl/alt/ test-resources/xsd/
test/org/apache/axis2/jaxws/sample/
test/org/apache/axis2/jaxws/sample/dlwmin/
test/org/apache/axis2/jaxws/sample/...
Author: scheu
Date: Wed Feb 21 18:35:13 2007
New Revision: 510353
URL: http://svn.apache.org/viewvc?view=rev&rev=510353
Log:
AXIS2-2155
Contributor:Rich Scheuerle
More doc/lit wrapped minimal "fault" code.
Added:
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException2.java
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/RPCLitMethodMarshaller.java
webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java
webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java Wed Feb 21 18:35:13 2007
@@ -339,8 +339,7 @@
MethodMarshallerUtils.marshalFaultResponse(throwable,
marshalDesc,
operationDesc,
- m,
- false); // don't force xsi:type for doc/lit
+ m);
return m;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
@@ -355,7 +354,7 @@
// Note all exceptions are caught and rethrown with a WebServiceException
try {
- Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message, false);
+ Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message);
return t;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java Wed Feb 21 18:35:13 2007
@@ -478,8 +478,7 @@
MethodMarshallerUtils.marshalFaultResponse(throwable,
marshalDesc,
operationDesc,
- m,
- false); // don't force xsi:type for doc/lit
+ m);
return m;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
@@ -496,8 +495,7 @@
try {
Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc,
marshalDesc,
- message,
- false);
+ message);
return t;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMinimalMethodMarshaller.java Wed Feb 21 18:35:13 2007
@@ -417,8 +417,7 @@
MethodMarshallerUtils.marshalFaultResponse(throwable,
marshalDesc,
operationDesc,
- m,
- true); // isRPC=true
+ m);
return m;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
@@ -433,7 +432,7 @@
// Note all exceptions are caught and rethrown with a WebServiceException
try {
- Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message, true);
+ Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message);
return t;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java Wed Feb 21 18:35:13 2007
@@ -632,8 +632,7 @@
MethodMarshallerUtils.marshalFaultResponse(throwable,
marshalDesc,
operationDesc,
- m,
- false); // don't force xsi:type for doc/lit
+ m);
return m;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
@@ -653,8 +652,7 @@
try {
Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc,
marshalDesc,
- message,
- false);
+ message);
return t;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/LegacyExceptionUtil.java Wed Feb 21 18:35:13 2007
@@ -150,6 +150,10 @@
log.debug("Completed creation of the fault bean.");
}
} else {
+ //if (log.isErrorEnabled()) {
+ // log.debug("The fault bean could not be loaded...Fallback to using the fault exception: " + t.getClass());
+ //}
+ //return t;
throw ExceptionFactory.makeWebServiceException(Messages.getMessage("faultProcessingNotSupported",
"the @WebFault faultbean is missing for " + t.getClass()));
}
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java Wed Feb 21 18:35:13 2007
@@ -494,13 +494,11 @@
* @param operationDesc OperationDescription
* @param packages Packages needed to marshal the object
* @param message Message
- * @param isRPC
*/
static void marshalFaultResponse(Throwable throwable,
MarshalServiceRuntimeDescription marshalDesc,
OperationDescription operationDesc,
- Message message,
- boolean isRPC) {
+ Message message) {
// Get the root cause of the throwable object
Throwable t = ClassUtils.getRootCause(throwable);
if (log.isDebugEnabled()) {
@@ -529,6 +527,9 @@
if (log.isErrorEnabled()) {
log.debug("Marshal as a Service Exception");
}
+ // Create the JAXB Context
+ JAXBBlockContext context = new JAXBBlockContext(marshalDesc.getPackages());
+
// The exception is a Service Exception. It may be (A) JAX-WS compliant exception or (B) JAX-WS legacy exception
// The faultBeanObject is a JAXB object that represents the data of the exception. It is marshalled in the detail
@@ -541,6 +542,11 @@
if (faultInfo == null || faultInfo.length() == 0) {
// Legacy Exception case
faultBeanObject = LegacyExceptionUtil.createFaultBean(t, fd, marshalDesc);
+
+ // If using the exception as the fault bean, then force marshalling by type
+ if (faultBeanObject == t) {
+ context.setProcessType(t.getClass());
+ }
} else {
// Normal case
// Get the fault bean object.
@@ -559,13 +565,7 @@
}
- // Create the JAXBBlockContext
- // RPC uses type marshalling, so recored the rpcType
- JAXBBlockContext context = new JAXBBlockContext(marshalDesc.getPackages());
- if (isRPC) {
- context.setProcessType(faultBeanObject.getClass());
- }
-
+
// Create a detailblock representing the faultBeanObject
Block[] detailBlocks = new Block[1];
@@ -684,7 +684,6 @@
* @param operationDesc
* @param marshalDesc
* @param message
- * @param isRPC
* @return Throwable
* @throws WebServiceException
* @throws ClassNotFoundException
@@ -696,8 +695,7 @@
*/
static Throwable demarshalFaultResponse(OperationDescription operationDesc,
MarshalServiceRuntimeDescription marshalDesc,
- Message message,
- boolean isRPC)
+ Message message)
throws WebServiceException, ClassNotFoundException, IllegalAccessException,
InstantiationException, XMLStreamException, InvocationTargetException, NoSuchMethodException {
@@ -729,8 +727,8 @@
}
}
- if (faultDesc == null && isRPC && elementQName != null) {
- // If not found and RPC, retry the search using just the local name
+ if (faultDesc == null && elementQName != null) {
+ // If not found, retry the search using just the local name
for(int i=0; i<operationDesc.getFaultDescriptions().length && faultDesc == null; i++) {
FaultDescription fd = operationDesc.getFaultDescriptions()[i];
FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
@@ -758,13 +756,6 @@
// Note that faultBean may not be a bean, it could be a primitive
Class faultBeanFormalClass = loadClass(faultBeanDesc.getFaultBeanClassName());
- if (isRPC) {
- // RPC is problem !
- // Since RPC is type based, JAXB needs the declared type
- // to unmarshal the object.
- blockContext.setProcessType(faultBeanFormalClass);
-
- }
// Get the jaxb block and business object
Block jaxbBlock = factory.createFrom(detailBlocks[0], blockContext);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/RPCLitMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/RPCLitMethodMarshaller.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/RPCLitMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/RPCLitMethodMarshaller.java Wed Feb 21 18:35:13 2007
@@ -406,8 +406,7 @@
MethodMarshallerUtils.marshalFaultResponse(throwable,
marshalDesc,
operationDesc,
- m,
- true); // isRPC=true
+ m);
return m;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
@@ -422,7 +421,7 @@
// Note all exceptions are caught and rethrown with a WebServiceException
try {
- Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message, true);
+ Throwable t = MethodMarshallerUtils.demarshalFaultResponse(operationDesc, marshalDesc, message);
return t;
} catch(Exception e) {
throw ExceptionFactory.makeWebServiceException(e);
Modified: webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd Wed Feb 21 18:35:13 2007
@@ -1,10 +1,18 @@
<schema targetNamespace="http://apache.org/axis2/jaxws/sample/dlwmin/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <complexType name="TestBean">
+ <complexType name="testBean">
<sequence>
<element name="data1" type="xsd:string"/>
<element name="data2" type="xsd:int"/>
</sequence>
</complexType>
+ <element name="processFault2">
+ <complexType>
+ <sequence>
+ <element name="flag" form="unqualified" type="xsd:int"/>
+ <element name="message" form="unqualified" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
</schema>
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java Wed Feb 21 18:35:13 2007
@@ -25,6 +25,7 @@
import org.apache.axis2.jaxws.dispatch.DispatchTestConstants;
import org.apache.axis2.jaxws.sample.dlwmin.sei.Greeter;
import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException;
+import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException2;
import org.apache.axis2.jaxws.sample.dlwmin.types.TestBean;
import junit.framework.TestCase;
@@ -153,7 +154,7 @@
}
/**
- * Test throwing checked exception
+ * Test throwing checked exception w/o a JAXB Bean
*/
public void testProcess_CheckException() throws Exception {
@@ -173,6 +174,27 @@
assertTrue(te.getFlag() == 123);
} catch (Exception e) {
fail("Expected TestException thrown but found " + e.getClass());
+ }
+ }
+
+ /**
+ * Test throwing checked exception that has a JAXB Bean
+ */
+ public void testProcess_CheckException2() throws Exception {
+
+ Greeter proxy = getProxy("process");
+
+ TestBean request = new TestBean();
+ request.setData1("hello world");
+ request.setData2(10);
+ try {
+ TestBean response = proxy.process(4, request);
+ fail("Expected TestException2 thrown");
+ } catch (TestException2 te) {
+ assertTrue(te.getMessage().equals("TestException2 thrown"));
+ assertTrue(te.getFlag() == 456);
+ } catch (Exception e) {
+ fail("Expected TestException2 thrown but found " + e.getClass());
}
}
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java Wed Feb 21 18:35:13 2007
@@ -20,6 +20,7 @@
import org.apache.axis2.jaxws.sample.dlwmin.sei.Greeter;
import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException;
+import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException2;
import org.apache.axis2.jaxws.sample.dlwmin.types.TestBean;
import javax.jws.WebService;
@@ -37,17 +38,20 @@
return in;
}
- public TestBean process(int inAction, TestBean in) throws TestException {
+ public TestBean process(int inAction, TestBean in) throws TestException, TestException2 {
if (inAction == 0) {
// echo
return in;
} else if (inAction == 1) {
- // throw checked exception
- throw new TestException(123, "TestException thrown");
+ // throw checked exception that does not have a fault bean
+ throw new TestException("TestException thrown", 123);
} else if (inAction == 2) {
throw new WebServiceException("WebServiceException thrown");
} else if (inAction == 3) {
throw new NullPointerException("NPE thrown");
+ } else if (inAction == 4) {
+ // throw checked exception that does have a fault bean
+ throw new TestException2("TestException2 thrown", 456);
}
return null;
}
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl Wed Feb 21 18:35:13 2007
@@ -21,6 +21,7 @@
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://apache.org/axis2/jaxws/sample/dlwmin"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:types="http://apache.org/axis2/jaxws/sample/dlwmin/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://apache.org/axis2/jaxws/sample/dlwmin" name="HelloWorld">
<wsdl:types>
@@ -113,6 +114,9 @@
<wsdl:message name="testProcessFault">
<wsdl:part element="tns:processFault" name="fault"/>
</wsdl:message>
+ <wsdl:message name="testProcessFault2">
+ <wsdl:part element="types:processFault" name="fault2"/>
+ </wsdl:message>
@@ -132,6 +136,7 @@
<wsdl:input message="tns:processRequest" name="processRequest"/>
<wsdl:output message="tns:processResponse" name="processResponse"/>
<wsdl:fault message="tns:processFault" name="processFault"/>
+ <wsdl:fault message="tns:processFault2" name="processFault2"/>
</wsdl:operation>
</wsdl:portType>
@@ -171,6 +176,9 @@
</wsdl:output>
<fault name="processFault">
<soap:fault name="processFault" use="literal" />
+ </fault>
+ <fault name="processFault2">
+ <soap:fault name="processFault2" use="literal" />
</fault>
</wsdl:operation>
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd Wed Feb 21 18:35:13 2007
@@ -7,4 +7,12 @@
<element name="data2" type="xsd:int"/>
</sequence>
</complexType>
+ <element name="processFault2">
+ <complexType>
+ <sequence>
+ <element name="flag" form="unqualified" type="xsd:int"/>
+ <element name="message" form="unqualified" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
</schema>
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java Wed Feb 21 18:35:13 2007
@@ -49,5 +49,5 @@
int inAction,
@WebParam(targetNamespace = "", partName = "in")
TestBean in
- ) throws TestException;
+ ) throws TestException, TestException2;
}
Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException.java?view=diff&rev=510353&r1=510352&r2=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException.java Wed Feb 21 18:35:13 2007
@@ -20,13 +20,16 @@
import javax.xml.ws.WebFault;
+/**
+ * Example Checked Exception with no corresponding JAXB bean
+ */
@WebFault(name="processFault", targetNamespace="http://apache.org/axis2/jaxws/sample/dlwmin")
public class TestException extends Exception {
public int flag;
- public TestException(int flag, String message) {
+ public TestException(String message, int flag) {
super(message);
this.flag = flag;
}
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException2.java?view=auto&rev=510353
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException2.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException2.java Wed Feb 21 18:35:13 2007
@@ -0,0 +1,43 @@
+/**
+ * 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.
+ */
+package org.apache.axis2.jaxws.sample.dlwmin.sei;
+
+import javax.xml.ws.WebFault;
+
+/**
+ * Checked Exception with a WebFault that locates an existing JAXB Bean
+ *
+ */
+@WebFault(name="processFault2", targetNamespace="http://apache.org/axis2/jaxws/sample/dlwmin/types",
+ faultBean="org.apache.axis2.jaxws.sample.dlwmin.types.ProcessFault2")
+public class TestException2 extends Exception {
+
+ public int flag;
+
+
+ public TestException2(String message, int flag) {
+ super(message);
+ this.flag = flag;
+ }
+
+ public int getFlag() {
+ return flag;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org