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 ru...@apache.org on 2005/08/12 14:29:21 UTC
svn commit: r232280 - /webservices/axis/trunk/java/xdocs/rest-ws.html
Author: ruchithf
Date: Fri Aug 12 05:29:15 2005
New Revision: 232280
URL: http://svn.apache.org/viewcvs?rev=232280&view=rev
Log:
Updated REST doc
Modified:
webservices/axis/trunk/java/xdocs/rest-ws.html
Modified: webservices/axis/trunk/java/xdocs/rest-ws.html
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/xdocs/rest-ws.html?rev=232280&r1=232279&r2=232280&view=diff
==============================================================================
--- webservices/axis/trunk/java/xdocs/rest-ws.html (original)
+++ webservices/axis/trunk/java/xdocs/rest-ws.html Fri Aug 12 05:29:15 2005
@@ -17,7 +17,7 @@
<h2>Doing REST web services with HTTP POST</h2>
<p>REST support can be enabled in the Server side by adding the following line to the axis.xml file.</p>
-<font color="blue"> < parameter name="eanbleREST" locked="xsd:false" > true </parameter> </font>
+<font color="blue"> < parameter name="enableREST" locked="xsd:false" > true </parameter> </font>
<p>But it acts both as a REST endpoint as well as a SOAP endpoint. When a Message is received if the
content type is text/xml andif the SOAP Action Headers are missing, then the Message is treated as a
RESTful Message. Else they are treated as usual SOAP Messages.</p>
@@ -35,16 +35,16 @@
And the class source will be as follows
<source>
<pre>
-public class MyServiceClient {
- private static String toEpr = "http://localhost:8080/axis2/services/MyService";
+public class MyServiceClient {
private static String toEpr = "http://localhost:9080/axis2/services/MyService/echo";
+
public static void main(String[] args) throws AxisFault {
OMElement payload = ...
Call call = new Call();
- call.setTo(new EndpointReference(AddressingConstants.WSA_TO,toEpr));
+ call.setTo(new EndpointReference(toEpr));
call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
call.setDoREST(true);
- OMElement result = call.invokeBlocking("echo", payload);
+ OMElement result = call.invokeBlocking("thiscanbeanything", payload);
.... use the result
call.close();
}