ios - National Rail Enquiries issue with SOAP requests. The operation couldn’t be completed. (NSURLErrorDomain error -1012.) -


i'm trying query national rail enquiries using api found below i'm having issues.

http://lite.realtime.nationalrail.co.uk/openldbws/

i'm attempting use soapengine64 framework (https://github.com/priore/soapengine) simplify process of making requests (using swift) don't seem able results back.

every time run following code error printed out. know i'm going wrong?

error:

2015-03-28 13:46:09.528 rapid rail uk[18994:1032065] error domain=nsurlerrordomain code=-1012 "the operation couldn’t completed. (nsurlerrordomain error -1012.)" userinfo=0x7fd9a9c35e80 {nserrorfailingurlkey=https://lite.realtime.nationalrail.co.uk/openldbws/wsdl.aspx?ver=2014-02-20, nserrorfailingurlstringkey=https://lite.realtime.nationalrail.co.uk/openldbws/wsdl.aspx?ver=2014-02-20} 

swift code:

    var token = "<com:accesstoken><com:tokenvalue>my_token_key</com:tokenvalue></com:accesstoken>"      var soap = soapengine()      soap.header = token     soap.actionnamespaceslash = true      var args = [         "numrows" : 10,         "crs" : "gtw"     ];      soap.requestwsdl("https://lite.realtime.nationalrail.co.uk/openldbws/wsdl.aspx?ver=2014-02-20",         operation: "getdepartureboard",         value: args,         completewithdictionary: { (statuscode : int,             dict : [nsobject : anyobject]!) -> void in              var result:dictionary = dict dictionary             nslog("%@", result)          }) { (error : nserror!) -> void in              nslog("%@", error)     } 

don't use requestwsdl, use requesturl, without wsdl extension, call directly asmx service (https://lite.realtime.nationalrail.co.uk/openldbws/ldb6.asmx), , try set soapaction http://thalesgroup.com/rtti/2014-02-20/ldb/getdepartureboard. because wsdl not contains soapaction attributes, needed correct parsing of wsdl definitions.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -