get 502 bad gateway error when calling a webservice - soap

In my SEAM web application running under JBOSS-AS 4.2.3 there is a plain SOAP message call to a webservice, using SOAPConnection.call().
The call ends up with a
org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Invalid HTTP server response [502] - Bad Gateway.
Running the same code outside the JBOSS as a pure java application all works fine.
So question: Is there something in JBoss I have to configure that makes things work ?
Thx for answers,
Frank

Related

Web service - A fatal alert was received from the remote endpoint. The TLS protocol defined fatal alert code is 70

I have an issue with a web service I call from my .NET application.
The web service is on two different servers, one for testing and one for development. On test environment it works fine, but on development I get empty response.
When I call the service on the development server from Postman I get the correct response.
I checked the config file, is correct, I even copy/paste the Postman code as is and run it but I still get empty response. The code is correct because it works ok on testing environment.
I use the framework 4.7.2 but on the server's event viewer I get this message "A fatal alert was received from the remote endpoint. The TLS protocol defined fatal alert code is 70."
Any idea what might be wrong and how to fix it?
Thank you in advance

Oracle Service Bus error: ClassCastException: CountingRequestWrapper cannot be cast to ServletRequestImpl

I developed a service for Oracle Service Bus and deployed on a WebLogic 12c server. The proxy service uses an HTTP adapter so that the service can be called using SOAP. The business service uses a REST adapter.
The service works fine when I test it on the integrated server or on my UAT server (which is WebLogic 12c) using the test page that's invoked from the ServiceBus console. Also tried using SOAPUI tool on two different Windows PC's.
However, when the third party invokes my service, I get an exception in my log. I added alerts and logs in my pipeline but neither of them get invoked meaning the exception happens in WebLogic before it can pass the request to my adapter.
Googling for "CountingRequestWrapper" gives zero results. I really can't figure out what is causing this.
Here's the log:
module:/MyApp/MyService path:null spec-version:3.1], request: weblogic.servlet.internal.ServletRequestImpl#35881271[
GET /MyApp/MyService?wsdl HTTP/1.1
Content-Type: text/xml;charset="utf-8"
Accept: /
Connection: Keep-Alive
]] Root cause of ServletException.
java.lang.ClassCastException: com.bea.wli.sb.transports.http.wls.CountingRequestWrapper cannot be cast to weblogic.servlet.internal.ServletRequestImpl
at com.bea.wli.sb.transports.http.wls.HttpTransportServlet.service(HttpTransportServlet.java:121)
at weblogic.servlet.FutureResponseServlet.service(FutureResponseServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
I did notice that at the top it says: path: null. Could it be something to do with that?
Request from log looks like a GET to wsdl address (GET /MyApp/MyService?wsdl) and you mentioned it's a soap proxy so that should most likely be a POST to service endpoint address. I would suggest to check 3rd party client side configuration first.

Can my Web Server Issue a Client Rest Request to another REST Server

I have a web server that handles configuration set-up for various IO devices. I need to get some data from a REST server that is running on a different server. Can that web server code issue a client REST GET command to a REST server running on a different server? I tried it but I get a http 500 error. The server code is failing on the REST server request code.
I am closing out this question. Yes, your server can issue http requests to other services. I was having another problem with a self-signed certificate and the error made it look like their was a problem with my http request service.

How do I troubleshoot a 404 error on a webapp accessed via apache vhost?

In my development system ( macos ) I have a webapp running in a jetty container on port 8080
Part of this webapp is a REST service
I can hit the REST service as follows
curl http://fake.hostname.com:8080/find/http%3A%2F%2Fwww.nfl.com
and I get the expected JSON result from this call.
Because on the server I am deploying on, I have an apache front end using ajp to route to tomcat, on my dev system I have an apache vhost routing to port 8080. This helps with testing some oauth dependencies where facebook redirects to a specific host URL.
The webapp works fine in this configuration except when I try and hit the service using
curl http://fake.hostname.com/find/http%3A%2F%2Fwww.nfl.com
Nothing is showing up in the jetty console reporting a proplem and I am getting a 404 response from apache.
Can anyone suggest how to troubleshoot such an issue? Or things I should look at?
note 1. I know the issue of using apache as a proxy to tomcat or jetty is contentious but given there are other apps already living on apache port 80 I’m not willing to run tomcat in its place.
note 2. the webapp is in scala using the lift framework.
Not really an answer to the exact question, but did you consider to use nginx as a proxy+load balancer? It's a de-facto standard, as far as I know.
Also, what's in the logs? tomcat-s logs, apache logs..

HTTPS requests sent with ASIHTTPRequest return a NULL response

I am developing an iPad application and using the ASIHTTPRequest library (https://github.com/pokeb/asi-http-request) to make requests to my web server, which runs CentOS 6.2 and is equipped with Apache 2.2 and mod_ssl enabled.
When I make an HTTPS request to the server, sometimes I get a null response. Absolutely nothing. As if the server were completely dead. Sometimes it works just fine, returning the expected response. There is no rhyme or reason to when the response is null and when it's fine.
The server uses a dummy security certificate
I am setting validatesSecurityCertificate to NO
I am setting SSLVerifyClient to none in httpd.conf
Note, HTTPS requests sent through a web browser work fine (after you tell it to proceed without a security certificate). But, all HTTPS requests sent through HTTP Client: ((Zero-length response returned from the server.))
The trick to using ASIHTTPRequest well is that you dont use it. Its deprecated by its author allseeing-i.com/ASIHTTPRequest . I suggest using AFNetworking, RESTKit or even NSURLConnection.
As it is we have no code of yours to see, but when experiencing random issues with a library that hasn't been worked on in years I would say to start by using a different library.