Author: slaws
Date: Fri Sep  7 13:49:50 2007
New Revision: 573696

URL: http://svn.apache.org/viewvc?rev=573696&view=rev
Log:
TUSCANY-1653
Fix to 
1. tolerate WSDL which presents wrapper element an input message with no parts. 
The result if our isWrapped() method doesn't now adhere strictly to the JAXWS 
spec in this respect
2. protect against null pointers in two places in this case
See discussion here 
http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg22708.html

Modified:
    
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
    
incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java

Modified: 
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java?rev=573696&r1=573695&r2=573696&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
 Fri Sep  7 13:49:50 2007
@@ -46,7 +46,11 @@
     public void invokeBusinessLogic(MessageContext inMC, MessageContext outMC) 
throws AxisFault {
         try {
             OMElement requestOM = 
inMC.getEnvelope().getBody().getFirstElement();
-            Object[] args = new Object[] {requestOM};
+            Object[] args = null;
+               
+            if (requestOM != null) {
+               args = new Object[] {requestOM};
+            }
             OMElement responseOM = (OMElement)provider.invokeTarget(operation, 
args, inMC);
 
             SOAPEnvelope soapEnvelope = 
getSOAPFactory(inMC).getDefaultEnvelope();

Modified: 
incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java?rev=573696&r1=573695&r2=573696&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
 Fri Sep  7 13:49:50 2007
@@ -103,8 +103,8 @@
     public boolean isWrapperStyle() throws InvalidWSDLException {
         if (wrapperStyle == null) {
             wrapperStyle =
-                wrapper.getInputChildElements() != null && 
(operation.getOutput() == null || wrapper
-                    .getOutputChildElements() != null);
+                (operation.getInput().getMessage().getParts().values().size() 
== 0 ||wrapper.getInputChildElements() != null) && 
+                (operation.getOutput() == null || 
wrapper.getOutputChildElements() != null);
         }
         return wrapperStyle;
     }
@@ -515,8 +515,10 @@
                 ElementInfo in = getElementInfo(getInputWrapperElement());
                 ElementInfo out = getElementInfo(getOutputWrapperElement());
                 List<ElementInfo> inChildren = new ArrayList<ElementInfo>();
-                for (XmlSchemaElement e : getInputChildElements()) {
-                    inChildren.add(getElementInfo(e));
+                if (in != null) {
+                       for (XmlSchemaElement e : getInputChildElements()) {
+                           inChildren.add(getElementInfo(e));
+                       }
                 }
                 List<ElementInfo> outChildren = new ArrayList<ElementInfo>();
                 if (out != null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to