ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r584793 - in /ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2: hooks/ODEAxisService.java util/SoapMessageConverter.java
Date Mon, 15 Oct 2007 14:11:33 GMT
Author: mriou
Date: Mon Oct 15 07:11:33 2007
New Revision: 584793

URL: http://svn.apache.org/viewvc?rev=584793&view=rev
Log:
Potential NPE when building a SOAP fault.

Modified:
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java?rev=584793&r1=584792&r2=584793&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
(original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
Mon Oct 15 07:11:33 2007
@@ -25,11 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import javax.wsdl.Definition;
-import javax.wsdl.Operation;
-import javax.wsdl.Part;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
+import javax.wsdl.*;
 import javax.wsdl.extensions.soap.SOAPAddress;
 import javax.xml.namespace.QName;
 
@@ -101,6 +97,23 @@
 
   public static AxisService createService(AxisConfiguration axisConfig, QName serviceQName,
String port,
                              String axisName, Definition wsdlDef, MessageReceiver receiver)
throws AxisFault {
+      for (Object binding : wsdlDef.getAllBindings().values()) {
+          for (Object bindOp : ((Binding) binding).getBindingOperations()) {
+              System.out.println("Bind Op " + ((BindingOperation) bindOp).getName());
+              for (Object bindFault : ((BindingOperation) bindOp).getBindingFaults().values())
{
+                  System.out.println("Bind fault " + ((BindingFault)bindFault).getName());
+              }
+          }
+      }
+
+      for (Object pts : wsdlDef.getAllPortTypes().values()) {
+          for (Object op : ((PortType) pts).getOperations()) {
+              for (Object fault : ((Operation) op).getFaults().values()) {
+                  System.out.println("Op Fault " + ((Fault)fault).getName());
+              }
+          }
+      }
+
         WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(wsdlDef,
serviceQName, port);
     AxisService axisService = serviceBuilder.populateService();
     axisService.setName(axisName);

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java?rev=584793&r1=584792&r2=584793&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java
(original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java
Mon Oct 15 07:11:33 2007
@@ -264,7 +264,8 @@
         SOAPFaultReason reason = _soapFactory.createSOAPFaultReason(fault);
         reason.setText(faultName);
         SOAPFaultDetail soapDetail = _soapFactory.createSOAPFaultDetail(fault);
-        soapDetail.addDetailEntry(detail.getFirstElement());
+        if (detail != null)
+            soapDetail.addDetailEntry(detail.getFirstElement());
         return fault;
     }
 



Mime
View raw message