Я использую Scribe Java API для службы Oauth и могу отлично работать с Gmail и Facebook, но когда дело доходит до службы Windows Live, я поражен.Я следую стандартному коду, который отлично работает для других сервисов. Я могу получить токен доступа из окна, но когда я пытаюсь получить доступ к сервису, чтобы получить профиль пользователя, я получаю
java.net.MalformedURLException
вот сообщение журнала исключений
org.scribe.exceptions.OAuthException: Problems while creating connection.
org.scribe.model.Request.send(Request.java:71)
org.scribe.model.OAuthRequest.send(OAuthRequest.java:12)
......
......
java.net.MalformedURLException: no protocol: "https://apis.live.net/v5.0/me?access_token=EwAoAq1DBAAUlbRWyAJjK5w968Ru3Cyt%5C%2F6GvwXwAAdfi2SDJuwJlMd29Za96amS5o2UFyXbtnIZglVJKxdimcPb2yYie966goCS2%2ByCjrWBpgUUUphkhYwFyFiN8I2J3pdyg4IQlbG%2BD8U%5C%2F9q5M5iU1q6niqYldYYOyq3ZpNw95l3oFdefQBlnEesequMhHhTVw%2B0ku93xc06lnULgYbVubTWqT8zBzwgHRie93CSDl1wUWQAYe2TzAAk9iIsBvmTmiICdWFrFpZrmpBS3VOec9zdarXuloaXI1IEPA5fDT%2B04RF8uUi1AukmRfjr%2B4C2J8fg8wbRQguMlZNLwG9fleixl2MLcA18ZOkHS%2Bu2eS5BcDYzCfOI8YJ9zf9IGUDZgAACLp7RJwAG8gk%2BAAFtLOh0pYNNGb3AtyjyurJowo014DLmKLLQfjeB0Lz3Nnwd0oBSv0g0qAT8qvdlLlVNyvgg3weqYiR%2BxD%2Bl8kX0SFBX7unVAkiloyqme7D4lNSM25wnJJrmc8wgop5x12MxwtuAOx3IXaNijCkyqtyVRfpU%2BVYv%5C%2FyH5JRuKOEia%2BX00%5C%2FEeWOXOP%5C%2F1yL9zYpRDaBpgOlZ7gBY6Q45buBjaGWsAi4Zg7QSDZeaFkMrIkVaWhhOdpNArXfUnDWAezlLqQZF0Otl8%5C%2F9%2BP3hel0mR7noFaMG0o57kV%2Bnm%2BhzF8LgCZleJCVdxC19ZmhrLM%5C%2FKTTEkAYHQWXhLQAA
java.net.URL.<init>(Unknown Source)
java.net.URL.<init>(Unknown Source)
java.net.URL.<init>(Unknown Source)
org.scribe.model.Request.createConnection(Request.java:81)
org.scribe.model.Request.send(Request.java:62)
org.scribe.model.OAuthRequest.send(OAuthRequest.java:12)
com.raisonne.oauth.action.OAuthCallbackHandlerAction.OtherCallBackHandler(OAuthCallbackHandlerAction.java:101)
com.raisonne.oauth.action.OAuthCallbackHandlerAction.execute(OAuthCallbackHandlerAction.java:50)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
Я не понимаю, что происходит с ошибкой для API, который работает нормально, так как при отладке для других приложений создается тот же шаблон URL
connection = (HttpURLConnection) new URL(effectiveUrl).openConnection();
thisэто строка в API, где она выдает исключение