You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by as...@apache.org on 2007/03/14 17:20:30 UTC

svn commit: r518203 - in /webservices/synapse/trunk/java: modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java repository/conf/axis2.xml

Author: asankha
Date: Wed Mar 14 09:20:28 2007
New Revision: 518203

URL: http://svn.apache.org/viewvc?view=rev&rev=518203
Log:
show how to use client authentication and hostname verification with a commented out sample parameter in the axis2.xml
update to set the content type header for messages going out through the nio transport

Modified:
    webservices/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java
    webservices/synapse/trunk/java/repository/conf/axis2.xml

Modified: webservices/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java?view=diff&rev=518203&r1=518202&r2=518203
==============================================================================
--- webservices/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java (original)
+++ webservices/synapse/trunk/java/modules/nhttp/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java Wed Mar 14 09:20:28 2007
@@ -22,6 +22,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.AxisFault;
 import org.apache.http.*;
+import org.apache.http.protocol.HTTP;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.message.HttpPost;
 import org.apache.axiom.om.OMOutputFormat;
@@ -98,6 +99,10 @@
                 }
             }
         }
+
+        httpRequest.setHeader(
+            HTTP.CONTENT_TYPE, Util.getContentType(msgContext) +
+            "; charset=" + Util.getOMOutputFormat(msgContext).getCharSetEncoding());
 
         return httpRequest;
     }

Modified: webservices/synapse/trunk/java/repository/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/axis2.xml?view=diff&rev=518203&r1=518202&r2=518203
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/axis2.xml (original)
+++ webservices/synapse/trunk/java/repository/conf/axis2.xml Wed Mar 14 09:20:28 2007
@@ -123,7 +123,9 @@
                 <Type>JKS</Type>
                 <Password>password</Password>
             </TrustStore>
-        </parameter>                        
+        </parameter>
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
     </transportReceiver>
 
     <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
@@ -172,7 +174,9 @@
                 <Type>JKS</Type>
                 <Password>password</Password>
             </TrustStore>
-        </parameter>                
+        </parameter>
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
     </transportSender>
 
     <!-- ================================================= -->



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