You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by th...@apache.org on 2006/12/19 14:08:16 UTC

svn commit: r488664 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java

Author: thilina
Date: Tue Dec 19 05:08:16 2006
New Revision: 488664

URL: http://svn.apache.org/viewvc?view=rev&rev=488664
Log:
Giving priority to the multipart case to make the POX+XOP case work

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java?view=diff&rev=488664&r1=488663&r2=488664
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java Tue Dec 19 05:08:16 2006
@@ -180,7 +180,11 @@
             // irrespective of the schema, if the media type is text/xml, all the information
             // should be in the body.
             // I'm assuming here that the user is sending this data according to the schema.
-            if (checkContentType(org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_TEXT_XML, contentType)) {
+            if (checkContentType(org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED, contentType)) {
+                body.addChild(Builder.getAttachmentsBuilder(msgCtxt,
+                        inputStream,
+                        contentType, false).getDocumentElement());
+            }else if (checkContentType(org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_TEXT_XML, contentType)) {
 
                 String charSetEnc;
                 if (Builder.getCharSetEncoding(contentType) == null) {
@@ -197,13 +201,7 @@
                 OMNodeEx documentElement = (OMNodeEx) builder.getDocumentElement();
                 documentElement.setParent(null);
                 body.addChild(documentElement);
-
-                // if the media type is multipart/related, get help from Axis2 :)
-            } else if (checkContentType(org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED, contentType)) {
-                body.addChild(Builder.getAttachmentsBuilder(msgCtxt,
-                        inputStream,
-                        contentType, false).getDocumentElement());
-            }
+            } 
 
             return soapEnvelope;
 



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