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 Tom Jordahl <to...@macromedia.com> on 2004/01/05 20:17:50 UTC

RE: cvs commit: ws-axis/java/test/wsdl/marrays MArrayTestsService TestCase.java

Hi Glen,

Why did you remove this code in SOAPFaultDetailsBuilder.java?
Looks like it does something important. :-)

--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: gdaniels@apache.org [mailto:gdaniels@apache.org] 
Sent: Friday, December 26, 2003 10:19 AM
To: ws-axis-cvs@apache.org
Subject: cvs commit: ws-axis/java/test/wsdl/marrays
MArrayTestsServiceTestCase.java

gdaniels    2003/12/26 07:18:49

  1.14      +11 -10
ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.java
  
  Index: SOAPFaultDetailsBuilder.java
  ===================================================================
  RCS file:
/home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.j
ava,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SOAPFaultDetailsBuilder.java	5 Sep 2003 17:58:57 -0000	1.13
  +++ SOAPFaultDetailsBuilder.java	26 Dec 2003 15:18:48 -0000	1.14
  @@ -148,25 +148,26 @@
               // If we didn't get type information, look up QName of fault
               if (faultDesc == null) {
                   faultDesc = op.getFaultByQName(qn);
  -                if (faultDesc != null) {
  +                if ((faultXmlType == null) && (faultDesc != null)) {
                       faultXmlType = faultDesc.getXmlType();
                   }
               }
   
  -            // Set the class if we found a description
  -            if (faultDesc != null) {
  -                try {
  -                    faultClass =
ClassUtils.forName(faultDesc.getClassName());
  -                } catch (ClassNotFoundException e) {
  -                    // Just create an AxisFault, no custom exception
  -                }
  -            }
  +//            // Set the class if we found a description
  +//            if (faultDesc != null) {
  +//                try {
  +//                    faultClass =
ClassUtils.forName(faultDesc.getClassName());
  +//                } catch (ClassNotFoundException e) {
  +//                    // Just create an AxisFault, no custom exception
  +//                }
  +//            }
           } else {
               faultXmlType = context.getTypeFromAttributes(namespace,
                                                          name,
                                                          attributes); 
  -            faultClass =
context.getTypeMapping().getClassForQName(faultXmlType);            
           }
  +
  +        faultClass =
context.getTypeMapping().getClassForQName(faultXmlType);            
           
           if(faultClass != null && faultXmlType != null) {
               builder.setFaultClass(faultClass);
  
  
  

Re: cvs commit: ws-axis/java/test/wsdl/marrays MArrayTestsServiceTestCase.java

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Tom,

> Why did you remove this code in SOAPFaultDetailsBuilder.java?

When I made the other changes in this commit, there was a problem with
loading the fault class directly from the FaultDesc using forName() - I
remember encountering it and making this change but now can't recall exactly
what the issue was.  As such I put the code back with an appropriate if{}
around the later setting (though we were passing all the tests just fine).

--Glen

> -----Original Message-----
> From: gdaniels@apache.org [mailto:gdaniels@apache.org]
> Sent: Friday, December 26, 2003 10:19 AM
> To: ws-axis-cvs@apache.org
> Subject: cvs commit: ws-axis/java/test/wsdl/marrays
> MArrayTestsServiceTestCase.java
>
> gdaniels    2003/12/26 07:18:49
>
>   1.14      +11 -10
> ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.java
>
>   Index: SOAPFaultDetailsBuilder.java
>   ===================================================================
>   RCS file:
>
/home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.j
> ava,v
>   retrieving revision 1.13
>   retrieving revision 1.14
>   diff -u -r1.13 -r1.14
>   --- SOAPFaultDetailsBuilder.java 5 Sep 2003 17:58:57 -0000 1.13
>   +++ SOAPFaultDetailsBuilder.java 26 Dec 2003 15:18:48 -0000 1.14
>   @@ -148,25 +148,26 @@
>                // If we didn't get type information, look up QName of
fault
>                if (faultDesc == null) {
>                    faultDesc = op.getFaultByQName(qn);
>   -                if (faultDesc != null) {
>   +                if ((faultXmlType == null) && (faultDesc != null)) {
>                        faultXmlType = faultDesc.getXmlType();
>                    }
>                }
>
>   -            // Set the class if we found a description
>   -            if (faultDesc != null) {
>   -                try {
>   -                    faultClass =
> ClassUtils.forName(faultDesc.getClassName());
>   -                } catch (ClassNotFoundException e) {
>   -                    // Just create an AxisFault, no custom exception
>   -                }
>   -            }
>   +//            // Set the class if we found a description
>   +//            if (faultDesc != null) {
>   +//                try {
>   +//                    faultClass =
> ClassUtils.forName(faultDesc.getClassName());
>   +//                } catch (ClassNotFoundException e) {
>   +//                    // Just create an AxisFault, no custom exception
>   +//                }
>   +//            }
>            } else {
>                faultXmlType = context.getTypeFromAttributes(namespace,
>                                                           name,
>                                                           attributes);
>   -            faultClass =
> context.getTypeMapping().getClassForQName(faultXmlType);
>            }
>   +
>   +        faultClass =
> context.getTypeMapping().getClassForQName(faultXmlType);
>
>            if(faultClass != null && faultXmlType != null) {
>                builder.setFaultClass(faultClass);
>
>
>
>
>