scribe oauth connection refused - facebook-graph-api

I am trying to use scribe. Just copied the Facebook example it asked to paste the code, which I got in request after login to FB. as below
And paste the authorization code here
AQB7XIMSqkD_OjE_bbHAz4nWQxkuWrQLUmCsYcw5VW4Tlxti3PEA-8F7YGNLKhonX0tBzA2GaXpt7Mz7ym83j4aeXc6kCHurqSRVbB8DpXSjnnkh3cm3XwUHJEfuOeo3Zf_gEFOtlJDvET-b38ECz4Y4jke5gCSmu9NIndG376M4r4siNXGopHq8VO4fQSw9tg_1O27GR3CNSbKVrx1Mk-GqPIhVHg28Zt5zikthZ7l9t8zI_nXIo6T3F17FJxQGMT8NZL8kGh4fUmGAMKCHouP964b_67F6ddQ3K6u1C4KNdSfNiLY76Qude8OWtweeK1Tou29hvs1iJojuMaWEs8Va
I am getting this error.
Trading the Request Token for an Access Token...
Exception in thread "main" org.scribe.exceptions.OAuthConnectionException: There was a problem while creating a connection to the remote service.
at org.scribe.model.Request.send(Request.java:70)
at org.scribe.model.Request.send(Request.java:76)
at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:36)
at com.ibm.fb.FacebookExample.main(FacebookExample.java:36)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:80)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:369)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:176)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
at java.net.Socket.connect(Socket.java:590)
at com.ibm.jsse2.qc.connect(qc.java:559)
at com.ibm.jsse2.pc.connect(pc.java:47)
at sun.net.NetworkClient.doConnect(NetworkClient.java:192)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:407)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:502)
at com.ibm.net.ssl.www2.protocol.https.c.<init>(c.java:60)
at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:62)
at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:6)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:940)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:63)
at com.ibm.net.ssl.www2.protocol.https.b.connect(b.java:76)
at org.scribe.model.Response.<init>(Response.java:29)
at org.scribe.model.Request.doSend(Request.java:117)
at org.scribe.model.Request.send(Request.java:66)
... 3 more
Someone please point out where its going wrong.
Regards.
Adeeb

Related

WSO2 - 3.2.0 - Docker - Create an API - Connection Error

I'm trying to create a new API from a rest service in WSO2 Publisher and I'm getting an error when I try to validate the endpoint:
When I go to log it shows the message:
[2021-03-30 22:09:54,744] ERROR - ApisApiServiceImpl Error occurred while sending the HEAD request to the given endpoint url:
java.net.ConnectException: Connection refused (Connection refused)
What am I doing wrong?
If I progress the creation when I try to test I get another error:
[2021-03-30 22:15:31,311] WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
[2021-03-30 22:15:31,351] WARN - ConnectCallback Connection refused or failed for : localhost/127.0.0.1:8888
[2021-03-30 22:15:31,353] WARN - EndpointContext Endpoint : CpoExecutorAPI--v1.0.0_APIproductionEndpoint with address http://localhost:8888/cpo-executor/dev will be marked SUSPENDED as it failed
Apart from the certificate issue, another possible cause for this error is network connectivity. Please make sure that there weren't any network issues while invoking the request and the network connectivity was stable. Also, please check whether you can directly connect to the provided endpoint URL and get the responses without any issues.
WARN - SourceHandler I/O error: Received fatal alert: certificate_unknown
With the above-mentioned warning, we can suspect there is an issue with certificates.
Therefore, if you have made any recent certificate changes in your environment can you check whether the required certs are available in the API Manager Keystore?

Spring consuming-ws: Exception: java.net.ConnectException: Connection refused (Connection refused)

I run my spring ws application downloaded from official spring.io web site, and it gives me following error
Please help me, cant understand what's problem?
P.s: It is consuming web service, building on maven,
and "http://www.webservicex.com/stockquote.asmx?WSDL" works if call via browser

Immutant2 server logs showing fishy error message

I got this error message a couple of times
21:36:01,172 ERROR [io.undertow.request] (default task-18) Undertow request failed HttpServerExchange{ CONNECT www.alipay.com:443}: java.lang.IllegalArgumentException: UT000068: Servlet path match failed
at io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83)
at io.undertow.servlet.handlers.ServletPathMatches.getServletHandlerByPath(ServletPathMatches.java:76)
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:121)
at org.projectodd.wunderboss.wildfly.WildFlyWeb$1.handleRequest(WildFlyWeb.java:80)
at io.undertow.server.session.SessionAttachmentHandler.handleRequest(SessionAttachmentHandler.java:68)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
I believe Alipay is a chinese paymeny gateway. I am not using Alipay or any other payment gatweway currently. This is just a test application.
Any idea what is happening?
This is an attempt to use your site as a proxy tunnel. If you use a reverse proxy like nginx in front of your site, you can prevent requests like this from hitting your app.

Web service Axis2 client code generation issue

I'm trying the consume a web services built using Axis2, so I have followed this example for creating client code.
I have the endpoint and I'm able to access it through the browser. But trying to generate the client code with:
WSDL2Java.bat -uri <<endpoint>> -o client
throws the exception below:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:181)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:570)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:411)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:525)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:99)
... 2 more
What could be the reason for this error?
If you can access the WSDL from a browser but not from the tool in command line then it's possible that your browser uses a HTTP proxy for it's connection while wsdl2java goes straight for the address.
Try setting some JVM parameters for using a proxy, as described in Java Networking and Proxies and if that fails, there is always the option to download the WSDL with the browser and run wsdl2java with the locally downloaded file.

Weblogic WebService client dependencies

I would like to ask which would be the correct jar files needed to a functional ws client to an authenticated weblogic JAX-RPC.
Situation:
I created the same WS client on Jdeveloper and on OEPE. When I run in the IDE, my client only works on Jdeveloper. Then I generated a Jar file from Jdeveloper and the same error from OEPE ocurrs when I run that jar.
I suppose this happens because there are some libs missing. I really need help! After putting many libs on the classpath, this is the mistake:
"Exception in thread "main" javax.xml.rpc.ServiceException: Failed to
parse WSDL htp://url?WSDL weblogic.wsee.wsdl.WsdlException: Failed to
read wsdl file from url due to -- java.net.ConnectException:
Connection refused: connect
at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:185)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:492)
at weblogic.wsee.jaxrpc.ServiceImpl.(ServiceImpl.java:126)
at br.com.scopus.teste.ServicoAssinaturaImplService_Impl.(ServicoAssinaturaImplService_Impl.java:21)
at br.com.scopus.teste.Client.main(Client.java:26) Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url d
ue to -- java.net.ConnectException: Connection refused: connect
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitions
Impl.java:432)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitions
Impl.java:417)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:81)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:68)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:
483)
... 3 more"
Maybe Important information:
These are the jar I am using: wlfullclient.jar wsclient.jar adf-config.xml weblogic.jar wseeclient.jar wsclient_extended.jar glassfish.jaxws.rt_1.2.0.0_2-1-5.jar
Weblogic version: 10.3.5
Thanks!
This is probably not a library issue.
You are getting "java.net.ConnectException: Connection refused". So the web service stack managed to perform the call to the WSDL URL but couldn't get through. One reason could be that your URL is incorrect, referring the incorrect interface (localhost rather than actual hostname or vice versa) or anything else.
Try to copy-paste the URL it is telling you it can't access in a web-browser and you should see the same problem.