i using signpost oauth access data magento server. have read various tutorials on same , reach point open browser user can enter credentials. however, per requirement have automate part. hence, user should not browser page. have set-up done on server side ( magento ), hit url , returned call page. same through program in android. i have tried below, consumer = new commonshttpoauthconsumer(key, secret); provider = new commonshttpoauthprovider(oauth_init_url,access_token_url, authorize_url); try { provider.retrieverequesttoken(consumer, oauth.out_of_band); log.d("tokens" , consumer.gettoken() + " -- " + consumer.gettokensecret()); } and request tokens. dont know how bypass next step. tried directly accessing accesstoken (stupid of me) provider.retrieveaccesstoken(consumer, "mycallback://callback"); no luck, ends in oauth.signpost.exception.oauthnotauthorizedexception: authorization failed (server replied 401). ...
getting error org.mockito.exceptions.misusing.invaliduseofmatchersexception: invalid use of argument matchers! 1 matchers expected, 2 recorded. exception may occur if matchers combined raw values: //incorrect: somemethod(anyobject(), "raw string"); when using matchers, arguments have provided matchers. example: //correct: somemethod(anyobject(), eq("string matcher")); at when( getprogramservice .callservice(any(getprogramtype.class))) .thenreturn(jaxbresponse); please explain error , possible resolution the code posted looks fine; don't see problem it. code before or above causing exception. key here: invalid use of argument matchers! 1 matchers expected, 2 recorded. any , used above, doesn't return "special kind of null" or "special kind of getprogramtype"; don't exist. instead, returns null , side effect puts matcher on stack. whe...
on android: app gives [application error] there network error (file:///android_asset/www/index.html). searched in others answers not worked. below appname.js in path: android/native/src/common/appname/appname.java public class appname extends wldroidgap { @override public void oncreate(bundle savedinstancestate){ super.oncreate(savedinstancestate); } /** * onwlinitcompleted called when worklight runtime framework initialization complete */ @override public void onwlinitcompleted(bundle savedinstancestate){ super.loadurl(getwebmainfilepath()); // add custom initialization code after line } } how can achieve this? what both index.html , appname.java/js? in worklight 6.1.0.x, new application given index.html , main.js/main.css/appname.java did rename of project files? value mainfile in application-descriptor.xml? make sure "index.html".
Comments
Post a Comment