Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional(Error Domain=com.kodlian.XMLRPC.error Code=1 "Error Unknown" UserInfo={NSLocalizedFailureReason=Error Unknown}) #13

Closed
Praveeeenn opened this issue Aug 15, 2016 · 6 comments
Assignees

Comments

@Praveeeenn
Copy link

For one of my XMLRPC methods, I'm getting a really weird error:
Optional(Error Domain=com.kodlian.XMLRPC.error Code=1 "Error Unknown" UserInfo={NSLocalizedFailureReason=Error Unknown})

Any way to get anything more descriptive? What does this basically mean?

@kodlian
Copy link
Owner

kodlian commented Aug 15, 2016

It certainly due to a Fault response from the server. Please use a web proxy (like Charles Proxy) to capture the response of the server. In the latest version, you are now able to parse the Fault response.

@kodlian kodlian self-assigned this Aug 15, 2016
@Praveeeenn
Copy link
Author

https://www.flickr.com/services/api/request.xmlrpc.html
i want to use above flicker's demo service how i request in AlamofireXMLRPC ??

    let paramsDict:[String:String] = ["name":"value", "name2":"value2"];
    let params : [Any] = [paramsDict];
    AlamofireXMLRPC.request("https://api.flickr.com/services/xmlrpc/", methodName: "flickr.test.echo", parameters: params).responseXMLRPC { (response: Response<XMLRPCNode, XMLRPCError>) in

        print(response.result)
        print(response.result.value)

    }

i did like this and got failure result, what should i do , i spent 2-3 days on AlamofireXMLRPC but i didn't get response on many examples plz help me :'( i m crying . . :(

@kodlian
Copy link
Owner

kodlian commented Aug 16, 2016

Try with this, this will give you some clue about the issue.

let paramsDict: XMLRPCStructure = ["name":"value", "name2":"value2"]
let params: [Any] = [paramsDict]
AlamofireXMLRPC.request("https://api.flickr.com/services/xmlrpc/", methodName: "flickr.test.echo", parameters: params).responseXMLRPC { (response: Response<XMLRPCNode, XMLRPCError>) in
            if let error = response.result.error {
                switch error {
                case .Fault(node: let node):
                    print(node["faultString"].string)

                default:
                    print(error)
                }

            } else if let value = response.result.value {
                print(value)
            }
}

@Praveeeenn
Copy link
Author

Praveeeenn commented Aug 17, 2016

Hey Jérémy,
Actually i am trying to get some data from odoo server and send request in xmlrpc format and get response in also xml node but i can't able to get the response :(
here the oddo webservice url
https://www.odoo.com/documentation/8.0/api_integration.html
plz help me on this thing . . . plz :'(
otherwise i will be jobless :'(

@kodlian
Copy link
Owner

kodlian commented Aug 17, 2016

I can provide some helps on the usage of my framework but without specific codes and questions I can't help you at all.
To debug the XMLRPC call I recommend you to use a WebProxy like CharlesProxy in order to see the requests and responses.
Moreover It seems that the XMLRPC endpoints are not working in the demo instance .... (get a 301 or 404).

@Praveeeenn
Copy link
Author

okay just close it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants