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 ng...@apache.org on 2007/02/14 20:59:43 UTC
svn commit: r507670 - in /webservices/axis2/trunk/java/modules/metadata:
src/org/apache/axis2/jaxws/description/impl/
test/org/apache/axis2/jaxws/description/
Author: ngallardo
Date: Wed Feb 14 11:59:42 2007
New Revision: 507670
URL: http://svn.apache.org/viewvc?view=rev&rev=507670
Log:
AXIS2-2181
Contributor: Dustin Amrhein
Dustin's patch for fixing the behavior in getting the wrapper classes.
Modified:
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/FaultDescriptionImpl.java
webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?view=diff&rev=507670&r1=507669&r2=507670
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java Wed Feb 14 11:59:42 2007
@@ -352,13 +352,7 @@
}
}
}
-
- if (returnWrapperClassName == null){
- // Couldn't load either class, so stick with the original wrapper class name
- // REVIEW: Is this correct behavior? Note that some of the annotation unit tests don't have the actual
- // classes available, and so will fail if this is changed.
- returnWrapperClassName = wrapperClassName;
- }
+
return returnWrapperClassName;
}
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/FaultDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/FaultDescriptionImpl.java?view=diff&rev=507670&r1=507669&r2=507670
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/FaultDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/FaultDescriptionImpl.java Wed Feb 14 11:59:42 2007
@@ -90,7 +90,7 @@
public String getFaultBean() {
- if (faultBean.length() > 0) {
+ if (faultBean != null && faultBean.length() > 0) {
// Return the faultBean if it was already calculated
return faultBean;
} else {
@@ -120,7 +120,7 @@
// Still not found, this must be a non-compliant exception.
// Use the JAX-WS chap 3.7 algorithm
- if (faultBean.length() <= 0) {
+ if (faultBean != null && faultBean.length() <= 0) {
String simpleName = getSimpleName(getExceptionClassName()) + "Bean";
String packageName = null;
if (!isDBC()) {
Modified: webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java?view=diff&rev=507670&r1=507669&r2=507670
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java Wed Feb 14 11:59:42 2007
@@ -373,8 +373,8 @@
assertEquals("wrappedParamsResponse", operationDesc.getResponseWrapperLocalName());
assertEquals("http://description.jaxws.axis2.apache.org/", operationDesc.getRequestWrapperTargetNamespace());
assertEquals("http://description.jaxws.axis2.apache.org/", operationDesc.getResponseWrapperTargetNamespace());
- assertEquals("org.apache.axis2.jaxws.description.WrappedParams", operationDesc.getRequestWrapperClassName());
- assertEquals("org.apache.axis2.jaxws.description.WrappedParamsResponse", operationDesc.getResponseWrapperClassName());
+ assertNull(operationDesc.getRequestWrapperClassName());
+ assertNull(operationDesc.getResponseWrapperClassName());
// Test WebResult annotation defaults
assertNull(((OperationDescriptionJava) operationDesc).getAnnoWebResult());
assertFalse(((OperationDescriptionJava) operationDesc).isWebResultAnnotationSpecified());
@@ -409,9 +409,8 @@
assertEquals("wrappedParamsResponse", operationDesc.getResponseWrapperLocalName());
assertEquals("http://description.jaxws.axis2.apache.org/", operationDesc.getRequestWrapperTargetNamespace());
assertEquals("http://description.jaxws.axis2.apache.org/", operationDesc.getResponseWrapperTargetNamespace());
- assertEquals("org.apache.axis2.jaxws.description.WrappedParams", operationDesc.getRequestWrapperClassName());
- assertEquals("org.apache.axis2.jaxws.description.WrappedParamsResponse", operationDesc.getResponseWrapperClassName());
-
+ assertNull(operationDesc.getRequestWrapperClassName());
+ assertNull(operationDesc.getResponseWrapperClassName());
operationDesc = testEndpointInterfaceDesc.getOperationForJavaMethod("bareParams")[0];
assertNotNull(operationDesc);
assertNull(operationDesc.getRequestWrapperLocalName());
@@ -430,16 +429,16 @@
assertEquals("method1RspWrapper", operationDesc.getResponseWrapperLocalName());
assertEquals("http://a.b.c.method1ReqTNS", operationDesc.getRequestWrapperTargetNamespace());
assertEquals("http://a.b.c.method1RspTNS", operationDesc.getResponseWrapperTargetNamespace());
- assertEquals("org.apache.axis2.jaxws.description.method1ReqWrapper", operationDesc.getRequestWrapperClassName());
- assertEquals("org.apache.axis2.jaxws.description.method1RspWrapper", operationDesc.getResponseWrapperClassName());
+ assertEquals("org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method1ReqWrapper", operationDesc.getRequestWrapperClassName());
+ assertEquals("org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method1RspWrapper", operationDesc.getResponseWrapperClassName());
operationDesc = testEndpointInterfaceDesc.getOperationForJavaMethod("method2")[0];
assertEquals("method2", operationDesc.getRequestWrapperLocalName());
assertEquals("method2RspWrapper", operationDesc.getResponseWrapperLocalName());
assertEquals("http://a.b.c.method2ReqTNS", operationDesc.getRequestWrapperTargetNamespace());
assertEquals("http://a.b.c.method2RspTNS", operationDesc.getResponseWrapperTargetNamespace());
- assertEquals("org.apache.axis2.jaxws.description.method2ReqWrapper", operationDesc.getRequestWrapperClassName());
- assertEquals("org.apache.axis2.jaxws.description.Method2Response", operationDesc.getResponseWrapperClassName());
+ assertEquals("org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method2ReqWrapper", operationDesc.getRequestWrapperClassName());
+ assertNull(operationDesc.getResponseWrapperClassName());
}
public void testWebMethod() {
@@ -1191,16 +1190,31 @@
@WebService
//Note the default parameterStyle is WRAPPED, so no type-level annotation is required.
class ReqRspWrapperTestImpl {
- @RequestWrapper(localName="method1ReqWrapper", targetNamespace="http://a.b.c.method1ReqTNS", className="org.apache.axis2.jaxws.description.method1ReqWrapper")
- @ResponseWrapper(localName="method1RspWrapper", targetNamespace="http://a.b.c.method1RspTNS", className="org.apache.axis2.jaxws.description.method1RspWrapper")
+ @RequestWrapper(localName="method1ReqWrapper", targetNamespace="http://a.b.c.method1ReqTNS",
+ className="org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method1ReqWrapper")
+ @ResponseWrapper(localName="method1RspWrapper", targetNamespace="http://a.b.c.method1RspTNS",
+ className="org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method1RspWrapper")
public String method1 (String s) {
return s;
}
- @RequestWrapper(targetNamespace="http://a.b.c.method2ReqTNS", className="org.apache.axis2.jaxws.description.method2ReqWrapper")
+ @RequestWrapper(targetNamespace="http://a.b.c.method2ReqTNS",
+ className="org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests.ReqRspWrapperTestImpl.method2ReqWrapper")
@ResponseWrapper(localName="method2RspWrapper", targetNamespace="http://a.b.c.method2RspTNS")
public String method2 (String s) {
return s;
+ }
+
+ public class method1ReqWrapper {
+
+ }
+
+ public class method2ReqWrapper {
+
+ }
+
+ public class method1RspWrapper {
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org