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 th...@apache.org on 2007/02/20 14:02:16 UTC

svn commit: r509541 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java

Author: thilina
Date: Tue Feb 20 05:02:15 2007
New Revision: 509541

URL: http://svn.apache.org/viewvc?view=rev&rev=509541
Log:
Reflecting the change to the OMBuilder

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java?view=diff&rev=509541&r1=509540&r2=509541
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java Tue Feb 20 05:02:15 2007
@@ -151,7 +151,7 @@
 		StAXBuilder builder = null;
 		XMLStreamReader streamReader;
 
-        Attachments attachments = createAttachment(msgContext, inStream, contentTypeString);
+        Attachments attachments = createAttachmentsMap(msgContext, inStream, contentTypeString);
 		String charSetEncoding = getCharSetEncoding(attachments.getSOAPPartContentType());
 
 		if ((charSetEncoding == null)
@@ -216,7 +216,7 @@
 		return builder;
 	}
 
-    private static Attachments createAttachment(MessageContext msgContext, InputStream inStream, String contentTypeString) {
+    private static Attachments createAttachmentsMap(MessageContext msgContext, InputStream inStream, String contentTypeString) {
         Object cacheAttachmentProperty = msgContext
                 .getProperty(Constants.Configuration.CACHE_ATTACHMENTS);
         String cacheAttachmentString = null;
@@ -359,21 +359,24 @@
      */
     public static OMBuilder getBuilderFromSelector(String contentType,
 			InputStream inputStream, MessageContext msgContext,String charSetEncoding) throws AxisFault {
+    	String type;
     	int index = contentType.indexOf(';');
 		if (index>0)
     	{
-    		contentType = contentType.substring(0,index);
+    		type = contentType.substring(0,index);
+    	}else{
+    		type = contentType;
     	}
 		Class builderClass = msgContext.getConfigurationContext()
-				.getAxisConfiguration().getMessageBuilder(contentType);
+				.getAxisConfiguration().getMessageBuilder(type);
 		if (builderClass != null) {
 			try {
 				OMBuilder builder = (OMBuilder) builderClass.newInstance();
-				builder.init(inputStream, charSetEncoding);
+				builder.init(inputStream, charSetEncoding,msgContext.getTo().getAddress(), contentType);
 				// Setting the received content-type as the messageType to make
 				// sure that we respond using the received message serialisation
 				// format.
-				msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, contentType);
+				msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
 				return builder;
 			} catch (InstantiationException e) {
 				throw new AxisFault("Cannot instantiate the specified Builder Class  : "



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