ActionWebService - need response in XML

S

Srikanth Jeeva

Hi i have used actionwebservice gem.
I have processed a SOAP request & in the service api i expect an api_key
& url.

class ServicesApi < ActionWebService::API::Base
api_method :verify_url, :expects =>
[{:api_key=>:string},{:url=>:string}], :returns => [{:response
=>:string}]
end


Processing the api_key & url, i have generated an XML. when i return
response, the XML is converted into string.


"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<records type=\"array\">\n
<record>\n <opayu-shortern-url>nil</opayu-shortern-url>\n
<error-message>url is Invalid </error-message>\n
<error-code>102</error-code>\n <message>Failure</message>\n
</record>\n</records>\n"

The response which i expect is XML.

Is there any method to convert the string to XML?
Or is there any way to return the response as a XML?

Thanks,
Srikanth J

http://srikanthjeeva.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top