You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/05/28 22:49:51 UTC
svn commit: r661078 - in /cxf/branches/2.0.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
Author: dkulp
Date: Wed May 28 13:49:50 2008
New Revision: 661078
URL: http://svn.apache.org/viewvc?rev=661078&view=rev
Log:
Merged revisions 661076 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r661076 | dkulp | 2008-05-28 16:48:44 -0400 (Wed, 28 May 2008) | 2 lines
add some fake line numbers into the generated wrapper helper to hopefully help debugging
........
Modified:
cxf/branches/2.0.x-fixes/ (props changed)
cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java?rev=661078&r1=661077&r2=661078&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java (original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelperCompiler.java Wed May 28 13:49:50 2008
@@ -227,10 +227,12 @@
mv.visitCode();
Label l0 = new Label();
mv.visitLabel(l0);
+ mv.visitLineNumber(100, l0);
mv.visitLdcInsn(sig);
mv.visitInsn(Opcodes.ARETURN);
Label l1 = new Label();
mv.visitLabel(l1);
+ mv.visitLineNumber(101, l1);
mv.visitMaxs(0, 0);
mv.visitEnd();
return true;
@@ -250,6 +252,7 @@
mv.visitCode();
Label l0 = new Label();
mv.visitLabel(l0);
+ mv.visitLineNumber(102, l0);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
@@ -271,6 +274,8 @@
Label l1 = new Label();
mv.visitLabel(l1);
+ mv.visitLineNumber(103, l0);
+
mv.visitLocalVariable("this", "L" + newClassName + ";", null, l0, l1, 0);
mv.visitMaxs(0, 0);
mv.visitEnd();
@@ -289,7 +294,8 @@
mv.visitCode();
Label lBegin = new Label();
mv.visitLabel(lBegin);
-
+ mv.visitLineNumber(104, lBegin);
+
mv.visitTypeInsn(Opcodes.NEW, periodToSlashes(wrapperType.getName()));
mv.visitInsn(Opcodes.DUP);
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, periodToSlashes(wrapperType.getName()),
@@ -348,6 +354,7 @@
Label lEnd = new Label();
mv.visitLabel(lEnd);
+ mv.visitLineNumber(105, lEnd);
mv.visitLocalVariable("this", "L" + newClassName + ";", null, lBegin, lEnd, 0);
mv.visitLocalVariable("lst", "Ljava/util/List;", "Ljava/util/List<*>;", lBegin, lEnd, 1);
mv.visitLocalVariable("ok", "L" + periodToSlashes(wrapperType.getName()) + ";",
@@ -366,6 +373,10 @@
// aVal.addAll(newA);
// }
+ Label l3 = new Label();
+ mv.visitLabel(l3);
+ mv.visitLineNumber(114, l3);
+
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
periodToSlashes(wrapperType.getName()),
getMethods[x].getName(),
@@ -402,6 +413,8 @@
Label jumpOverLabel = new Label();
mv.visitJumpInsn(Opcodes.GOTO, jumpOverLabel);
mv.visitLabel(nonNullLabel);
+ mv.visitLineNumber(106, nonNullLabel);
+
mv.visitVarInsn(Opcodes.ALOAD, 4);
mv.visitJumpInsn(Opcodes.IFNULL, jumpOverLabel);
mv.visitVarInsn(Opcodes.ALOAD, 3);
@@ -410,7 +423,7 @@
"java/util/List", "addAll", "(Ljava/util/Collection;)Z");
mv.visitInsn(Opcodes.POP);
mv.visitLabel(jumpOverLabel);
-
+ mv.visitLineNumber(107, jumpOverLabel);
}
private static boolean addGetWrapperParts(String newClassName,
@@ -428,6 +441,7 @@
mv.visitCode();
Label lBegin = new Label();
mv.visitLabel(lBegin);
+ mv.visitLineNumber(108, lBegin);
//the ret List
mv.visitTypeInsn(Opcodes.NEW, "java/util/ArrayList");
@@ -448,12 +462,20 @@
}
if (method == null) {
+ Label l3 = new Label();
+ mv.visitLabel(l3);
+ mv.visitLineNumber(200 + x, l3);
+
mv.visitVarInsn(Opcodes.ALOAD, 2);
mv.visitInsn(Opcodes.ACONST_NULL);
mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
"add", "(Ljava/lang/Object;)Z");
mv.visitInsn(Opcodes.POP);
} else {
+ Label l3 = new Label();
+ mv.visitLabel(l3);
+ mv.visitLineNumber(250 + x, l3);
+
mv.visitVarInsn(Opcodes.ALOAD, 2);
mv.visitVarInsn(Opcodes.ALOAD, 3);
mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL,
@@ -478,12 +500,14 @@
//return the list
Label l2 = new Label();
mv.visitLabel(l2);
+ mv.visitLineNumber(108, l2);
mv.visitVarInsn(Opcodes.ALOAD, 2);
mv.visitInsn(Opcodes.ARETURN);
Label lEnd = new Label();
mv.visitLabel(lEnd);
+ mv.visitLineNumber(109, lEnd);
mv.visitLocalVariable("this", "L" + newClassName + ";", null, lBegin, lEnd, 0);
mv.visitLocalVariable("o", "Ljava/lang/Object;", null, lBegin, lEnd, 1);
mv.visitLocalVariable("ret", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/Object;>;",
Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=661078&r1=661077&r2=661078&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java Wed May 28 13:49:50 2008
@@ -30,6 +30,7 @@
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.ws.Holder;
+import javax.xml.ws.soap.SOAPFaultException;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.type_test.doc.TypeTestPortType;
@@ -1893,7 +1894,11 @@
assertTrue("testStringList(): Incorrect return value", x.equals(ret));
}
if (testDocLiteral) {
- ret = docClient.testStringList(null, y, z);
+ try {
+ ret = docClient.testStringList(null, y, z);
+ } catch (SOAPFaultException ex) {
+ assertTrue(ex.getMessage(), ex.getMessage().contains("Unmarshalling"));
+ }
}
} else {
String[] x = {"I", "am", "SimpleList"};