Working with Axis2 and REST differs a little based on whether you are doing POSTs or GETs. I have been using Axis2 for REST as well as SOAP, but I don't use code generated stubs. I am using the ServiceClient to invoke my services. In that context, I set the following Options on the ServiceClient (these depend on GET or POST...GET being the full url with params and the POST being just the url with params sent in the body of the request):
Options options = new Options(); options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeout)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeout)); options.setProperty(Constants.Configuration.ENABLE_REST, Boolean.TRUE); options.setProperty(Constants.Configuration.HTTP_METHOD, Constants.Configuration.HTTP_METHOD_GET); options.setProperty(Constants.Configuration.MESSAGE_TYPE, org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_X_WWW_FORM); options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION, Constants.VALUE_TRUE); options.setCallTransportCleanup(true); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setTo(new EndpointReference(myCustomUrl...based on GET or POST); Then when I call sendReceive on the ServiceClient, my param depends on GET or POST. For GET, the EndpointReference has all the params so you can send a null to the sendReceive. For a POST, you need to send the XML message onto the sendReceive. //POST request parameters are in OMElement mReply=client.sendReceive(myRequest); //GET request parameters were already appended to endpoint URL // in RestServiceClientHandler (parent class) mReply=client.sendReceive(null); This may not answer your questions directly, but I have used this and successfully integrated Axis2 to call Google's Geocoding Service (GET only) and Yahoo's Search Service (GET or POST model). - jay Nick Steel wrote: > > I havn't been able to progress any further with Axis2 and REST, doesn't > anyone have any ideas about these issues? > > Nick > -- View this message in context: http://www.nabble.com/Axis2-REST-client-and-server-questions-%28Data-bindings%2C-Headers%2C-Performance%29-tp19087933p19186773.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]