First of all this the wrong mailing list to ask WSO2 related questions. Please use WSO2 mailing lists or forums for such questions.
Secondly, if the problem is that the REST service returning a 201 response (which is a valid success response), you can transform that into a valid SOAP response in the out-sequence of ESB, set the status code to 200 and send back to the client. You can use the script mediator to inject a success response into the response. Use the property mediator to set the status code: <property name="HTTP_SC" value="200" scope="axis2"/> Thanks, Hiranya On Thu, Oct 6, 2011 at 5:29 AM, Oleg Aleshko <[email protected]> wrote: > Hi. > > I'm using wso2 3.0.1 server and axis2 on client to access proxy service. > In the proxy service i access a REST service like this: > > <!-- inSequence --> > <sequence name="Service_In" > xmlns="http://ws.apache.org/**ns/synapse<http://ws.apache.org/ns/synapse>" > statistics="enable"> > <!-- some transformations omitted --> > <send> > <endpoint name="Service"> > <address uri="${service.url}" format="pox" statistics="enable"> > <suspendOnFailure> > <initialDuration>0</**initialDuration> > <maximumDuration>0</**maximumDuration> > <progressionFactor>0.0</**progressionFactor> > </suspendOnFailure> > </address> > </endpoint> > </send> > <log level="full"/> > </sequence> > > <!-- outSequence --> > <sequence name="Service_Out" > xmlns="http://ws.apache.org/**ns/synapse<http://ws.apache.org/ns/synapse>" > statistics="enable"> > <!-- some transformations omitted --> > <log level="full"/> > <send/> > </sequence> > > The problem is that REST service returns 201 code for successful calls and > axis2 client fails with "org.apache.axis2.AxisFault: Transport error: 201 > Error: Created" message. > > Is there a way to fix this? > > Thanks, Oleg. > -- Hiranya Jayathilaka Associate Technical Lead; WSO2 Inc.; http://wso2.org E-mail: [email protected]; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com
