Handling REST call with empty response

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Handling REST call with empty response

OlegYch
I'm using wso2 3.0.1 and trying to call rest service which returns only a status code.
 I need to specify parameters in url.
 For this i use this code:

   <property name="REST_URL_POSTFIX" value="/hello/123/delete?key=value" scope="axis2"/>
            <send>
                <endpoint name="Service_REST">
                    <address uri="https://example.com/service" format="rest" />
                </endpoint>
            </send>

 But the call fails with this message:

[2011-10-07 18:42:59,065] WARN - ClientWorker Unexpected response received. HTTP response code : 200 HTTP status : OK exception : com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,1]
 [2011-10-07 18:42:59,066] ERROR - NativeWorkerPool Uncaught exception
 java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMTextImpl cannot be cast to org.apache.axiom.om.OMElement
 at org.apache.synapse.util.MessageHelper.cloneSOAPFault(MessageHelper.java:439)

If i change endpoint address type to POX instead of REST then url parameters are not passed.

Please help.
Loading...