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 ke...@apache.org on 2007/04/06 20:51:52 UTC

svn commit: r526249 - in /webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch: resources/axis2.xml src/sample/yahooservices/JSONSearch/JSONSearchModel.java

Author: keithc
Date: Fri Apr  6 11:51:51 2007
New Revision: 526249

URL: http://svn.apache.org/viewvc?view=rev&rev=526249
Log:
Applying Axis2-2458 to branch

Modified:
    webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/resources/axis2.xml
    webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/src/sample/yahooservices/JSONSearch/JSONSearchModel.java

Modified: webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/resources/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/resources/axis2.xml?view=diff&rev=526249&r1=526248&r2=526249
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/resources/axis2.xml (original)
+++ webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/resources/axis2.xml Fri Apr  6 11:51:51 2007
@@ -118,6 +118,8 @@
                          class="org.apache.axis2.json.JSONBadgerfishMessageFormatter"/>
         <messageFormatter contentType="text/javascript"
                          class="org.apache.axis2.json.JSONMessageFormatter"/>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
     </messageFormatters>
     
     <!-- ================================================= -->

Modified: webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/src/sample/yahooservices/JSONSearch/JSONSearchModel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/src/sample/yahooservices/JSONSearch/JSONSearchModel.java?view=diff&rev=526249&r1=526248&r2=526249
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/src/sample/yahooservices/JSONSearch/JSONSearchModel.java (original)
+++ webservices/axis2/branches/java/1_2/modules/samples/yahoojsonsearch/src/sample/yahooservices/JSONSearch/JSONSearchModel.java Fri Apr  6 11:51:51 2007
@@ -20,6 +20,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axis2.Constants;
+import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.addressing.EndpointReference;
@@ -60,7 +61,7 @@
             Options options = new Options();
             client.setOptions(options);
             options.setTo(new EndpointReference(epr));
-            options.setProperty(Constants.Configuration.MESSAGE_TYPE, "text/javascript");
+            options.setProperty(Constants.Configuration.MESSAGE_TYPE, HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
             options.setProperty(Constants.Configuration.HTTP_METHOD, Constants.Configuration.HTTP_METHOD_GET);
             OMElement response = client.sendReceive(getPayloadForYahooSearchCall(query, format));
             generateSnippet(response);



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