axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r525449 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Date Wed, 04 Apr 2007 06:58:42 GMT
Author: amilas
Date: Tue Apr  3 23:58:41 2007
New Revision: 525449

URL: http://svn.apache.org/viewvc?view=rev&rev=525449
Log:
find the soap body and hence parts even if it is in a mime part.
this is basically done to pass some jaxws test cases.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=525449&r1=525448&r2=525449
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Tue Apr  3 23:58:41 2007
@@ -48,6 +48,8 @@
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ExtensibilityElement;
 import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.mime.MIMEMultipartRelated;
+import javax.wsdl.extensions.mime.MIMEPart;
 import javax.wsdl.extensions.http.HTTPAddress;
 import javax.wsdl.extensions.http.HTTPBinding;
 import javax.wsdl.extensions.http.HTTPOperation;
@@ -1545,7 +1547,39 @@
                     throw new WSDLProcessingException("Encoded use is not supported");
                 }
                 partsList = soapBody.getParts();
+            } else if (extElement instanceof MIMEMultipartRelated) {
+                MIMEMultipartRelated minMimeMultipartRelated = (MIMEMultipartRelated) extElement;
+                List mimePartsList = minMimeMultipartRelated.getMIMEParts();
+                MIMEPart mimePart = null;
+                Object object;
+                List mimePartElements;
+                ExtensibilityElement mimePartExtensibilityElement;
+                for (Iterator mimePartsIter = mimePartsList.iterator(); mimePartsIter.hasNext();)
{
+                    object = mimePartsIter.next();
+                    if (object instanceof MIMEPart) {
+                        mimePart = (MIMEPart) object;
+                        mimePartElements = mimePart.getExtensibilityElements();
+                        for (Iterator mimePartElementsIter = mimePartElements.iterator();
mimePartElementsIter.hasNext();)
+                        {
+                            mimePartExtensibilityElement = (ExtensibilityElement) mimePartElementsIter.next();
+                            if (mimePartExtensibilityElement instanceof SOAPBody) {
+                                SOAPBody soapBody = (SOAPBody) mimePartExtensibilityElement;
+                                if ((soapBody.getUse() != null) && (soapBody.getUse().equals(ENCODED_USE)))
{
+                                    throw new WSDLProcessingException("Encoded use is not
supported");
+                                }
+                                partsList = soapBody.getParts();
+                            } else if (mimePartExtensibilityElement instanceof SOAP12Body)
{
+                                SOAP12Body soapBody = (SOAP12Body) mimePartExtensibilityElement;
+                                if ((soapBody.getUse() != null) && (soapBody.getUse().equals(ENCODED_USE)))
{
+                                    throw new WSDLProcessingException("Encoded use is not
supported");
+                                }
+                                partsList = soapBody.getParts();
+                            }
+                        }
+                    }
+                }
             }
+
         }
         return partsList;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message