I am using Netty (via the Ning async HTTP library) to retrieve documents via HTTP. This produces a huge amount of debug output the console, as listed below for a single document request.
Anyone know how to turn this off? I really don't need to see this output.
I'm calling from Scala, if that makes any difference.
15:07:14.273 [run-main] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider -
Non cached request
DefaultHttpRequest(chunked: false)
GET /api/search.json?q=foo HTTP/1.1
Host: www.documentcloud.org
Connection: keep-alive
Accept: */*
User-Agent: NING/1.0
using Channel
[id: 0x2839ca40]
15:07:14.930 [New I/O client worker #1-1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider -
Request DefaultHttpRequest(chunked: false)
GET /api/search.json?q=foo HTTP/1.1
Host: www.documentcloud.org
Connection: keep-alive
Accept: */*
User-Agent: NING/1.0
Response DefaultHttpResponse(chunked: true)
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 10477
Connection: keep-alive
Vary: Accept-Encoding
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.13
ETag: "4f8f766d639dd84d014dfee3abb45de2"
X-Runtime: 611
Cache-Control: private, max-age=0, must-revalidate
Server: nginx/1.2.1 + Phusion Passenger 3.0.13 (mod_rails/mod_rack)
15:07:14.941 [New I/O client worker #1-1] DEBUG c.n.h.c.p.netty.NettyConnectionsPool - Adding uri: http://www.documentcloud.org:80 for channel [id: 0x2839ca40, /10.5.165.61:56133 => www.documentcloud.org/75.101.159.206:80]
15:07:16.921 [New I/O client worker #1-1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Channel Closed: [id: 0x2839ca40, /10.5.165.61:56133 :> www.documentcloud.org/75.101.159.206:80] with attachment com.ning.http.client.providers.netty.NettyAsyncHttpProvider$DiscardEvent#63182c3d
15:08:13.924 [Timer-0] DEBUG c.n.h.c.p.netty.NettyConnectionsPool - Entry count for : http://www.documentcloud.org:80 : 0
judging by the abbreviated package names seems to me slf4j/logback is being used for logging here.
in that case just try including a logback.xml configuration file in your classpath. something along the lines of
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
<logger name="com.ning.http.client" level="WARN"/>
</configuration>
the above xml would cause anything under com.ning.http.client (and downwards) to omit only warnings and worse to the output, which will be streamed to system.out. anything else will ommit INFO+
you can find more information on configuring logback here: http://logback.qos.ch/manual/configuration.html
Late posting for an old question I know but I recently had to turn off annoying repetitive INFO level logging coming from netty:
[main] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16
In my case I needed to disable it programmatically. Looking into slf4j org.slf4j.impl.SimpleLogger (the logger facade called by netty) I discovered an easy way to control the default slf4j log level for all SimpleLogger instances in your own startup code:
System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "warn");
or for just the logger instance I was interested in:
System.setProperty(SimpleLogger.LOG_KEY_PREFIX + "com.ning.http.client", "warn");
The value can be any of "trace", "debug", "info", "warn", or "error" with the default being "info".
Related
I think I have done some searching before posting this. Couldn't find a similar problem. I am using apache-tomcat-9.0.37. I am trying to forward the requests from /contextOld/ to /context-new/.
It is successfully rewriting to new url. But when the tomcat rewrites to the new url, it is giving a 404. When accessed directly via browser gives a 200.
localhost log
30-Sep-2021 14:01:27.250 FINE [http-nio-8080-exec-8] org.apache.catalina.core.ApplicationDispatcher.doForward The Response is vehiculed using a wrapper: org.springframework.security.web.firewall.FirewalledResponse
30-Sep-2021 14:02:58.978 FINE [http-nio-8080-exec-3] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:04:31.042 FINE [http-nio-8080-exec-1] org.apache.catalina.core.ApplicationDispatcher.doForward Disabling the response for further output
30-Sep-2021 14:04:31.042 FINE [http-nio-8080-exec-1] org.apache.catalina.core.ApplicationDispatcher.doForward The Response is vehiculed using a wrapper: org.springframework.security.web.firewall.FirewalledResponse
30-Sep-2021 14:05:52.290 FINE [http-nio-8080-exec-1] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:11:01.225 FINE [http-nio-8080-exec-8] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:11:47.901 FINE [http-nio-8080-exec-6] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:12:23.485 FINE [http-nio-8080-exec-8] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:12:24.752 FINE [http-nio-8080-exec-6] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
30-Sep-2021 14:41:04.800 FINE [http-nio-8080-exec-2] org.apache.catalina.valves.rewrite.RewriteValve.invoke Rewrote /contextOld/mainPage.htm as /context-new/mainPage.htm with rule pattern ^/contextOld/(.*)$
The second request in the below accesss log is when accessing the url directly via a browser
localhost_access.log
0:0:0:0:0:0:0:1 - - [30/Sep/2021:14:41:04 +0000] "GET /context-new/mainPage.htm HTTP/1.1" 404 653 [2]
0:0:0:0:0:0:0:1 - - [30/Sep/2021:14:41:57 +0000] "GET /context-new/mainPage.htm HTTP/1.1" 200 9401 [69]
rewrite.config
RewriteCond %{REQUEST_URI} ^/contextOld/.*$
RewriteRule ^/contextOld/(.*)$ /context-new/$1 [L]
server.xml
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b [%D]" />
<Valve className="org.apache.catalina.valves.ErrorReportValve" errorCode.400="/webapps/Error/error.html" showServerInfo="false"/>
</Host>
I can provide any other relevant tomcat configuration if I have missed any here.
If /contextOld does not correspond to any application (you don't have neither a ROOT application nor a /contextOld application), you might have stumbled upon bug 64593.
This was corrected in Tomcat 9.0.38, so you just have to upgrade to the newest version.
I have a Springboot application with Logback. This war is running in a Liberty webserver in a docker container
Versions:
Springboot 2.5.3
Logback 1.2.3
I am seeing a weird behavior where if I run this container on a Mac or Redhat, the application starts up fine and logs as expected.
However, when the same docker container is run in Ubuntu, I am seeing the following error from Logback's Joran interpreter :
...
08:07:53,308 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to WARN
08:07:53,308 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate] to WARN
08:07:53,308 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [springfox] to WARN
08:07:53,313 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter#88:32 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
08:07:53,313 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter#89:51 - no applicable action for [root], current ElementPath is [[configuration][springProfile][root]]
08:07:53,314 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter#90:73 - no applicable action for [appender-ref], current ElementPath is [[configuration][springProfile][root][appender-ref]]
08:07:53,314 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:07:53,314 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator#5b3de2a2 - Registering current configuration as safe fallback point
[err] Logging system failed to initialize using configuration from '/logback-spring.xml'
[err] java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter#88:32 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter#89:51 - no applicable action for [root], current ElementPath is [[configuration][springProfile][root]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter#90:73 - no applicable action for [appender-ref], current ElementPath is [[configuration][springProfile][root][appender-ref]]
[err] at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
[err] at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
[err] at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
[err] at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132)
[err] at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:316)
[err] at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282)
[err] at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240)
[err] at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
[err] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
[err] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
[err] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
[err] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
[err] at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
[err] at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
[err] at org.springframework.boot.SpringApplicationRunListeners$$Lambda$71/0x000000006c31f840.accept(Unknown Source)
[err] at java.util.ArrayList.forEach(ArrayList.java:1270)
[err] at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
[err] at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
[err] at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
[err] at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:374)
[err] at org.springframework.boot.SpringApplication.run(SpringApplication.java:332)
[err] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175)
[err] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155)
[err] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
[err] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
[err] at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2550)
[err] at [internal classes]
[err] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
[err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[err] at java.lang.Thread.run(Thread.java:822)
Here is my logback configuration:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="console-json"
class="ch.qos.logback.core.ConsoleAppender">
<encoder name="LoggingEventCompositeJsonEncoder"
class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<timestamp/>
<version/>
<message/>
<loggerName>
<shortenedLoggerNameLength>20
</shortenedLoggerNameLength>
</loggerName>
<threadName/>
<logLevel/>
<logLevelValue/>
<callerData>
<fieldName>caller</fieldName>
<classFieldName>class</classFieldName>
<methodFieldName>method</methodFieldName>
<fileFieldName>file</fileFieldName>
<lineFieldName>line</lineFieldName>
</callerData>
<stackTrace>
<throwableConverter
class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<maxDepthPerThrowable>100</maxDepthPerThrowable>
<maxLength>10000</maxLength>
<shortenedClassNameLength>30
</shortenedClassNameLength>
<rootCauseFirst>true</rootCauseFirst>
<inlineHash>true</inlineHash>
</throwableConverter>
</stackTrace>
<stackHash/>
<jsonMessage/>
<mdc/>
<contextMap/>
<tags/>
<logstashMarkers/>
<arguments>
<includeNonStructuredArguments>true
</includeNonStructuredArguments>
<nonStructuredArgumentsFieldPrefix>prefix
</nonStructuredArgumentsFieldPrefix>
</arguments>
</providers>
</encoder>
</appender>
<logger name="org.springframework" level="WARN"/>
<logger name="org.hibernate" level="WARN"/>
<logger name="springfox" level="WARN"/>
<springProfile name="prod">
<root level="${logback_root_level:-INFO}">
<appender-ref ref="${logback_root_appender:-console-json}"/>
</root>
</springProfile>
<springProfile name="minimal">
<root level="${logback_root_level:-WARN}">
<appender-ref ref="${logback_root_appender:-console-json}"/>
</root>
</springProfile>
</configuration>
Any help is appreciated!
Check if your logback file is a spring logback file like "logback-spring.xml".
Had the exact same issue fixed it by changing the file name.
I am developing a web application and get this error but can't make sense of it (I've looked at similar questions but the answers there don't seem to apply to my problem)
Can anyone make sense of this?
Please help me.
[WARN] Exception while dispatching incoming RPC call
java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception
at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:177)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at org.realityforge.gwt.cache_filter.GWTGzipFilter.doFilter(GWTGzipFilter.java:57)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at ... (more eclipse.jetty...)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:748)
[ERROR] 500 - POST /webproj/login (127.0.0.1) 57 bytes
Request headers
Host: (...)
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: text/x-gwt-rpc; charset=utf-8
(leaving some stuff out)
Connection: keep-alive
Response headers
Content-Type: text/plain
Recently I got a requirement from one of our customer. They provided a WSDL to call their service. They are doing IP whitelisting for authentication. I gave my server public IP and it got whitelisted. First, I tested that service through SOAP UI tool and it got worked without any issues. Then I integrated through JAVA code and it got failed. I am getting an exception like
Unable to sendViaPost to url[https://apps.greystar.com/gsWebService/gsExtract.asmx]
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343) ~[axis2-transport-http-1.7.1.jar:1.7.1]
at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213) ~[axis2-transport-http-1.7.1.jar:1.7.1]
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121) [axis2-transport-http-1.7.1.jar:1.7.1]
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403) [axis2-transport-http-1.7.1.jar:1.7.1]
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234) [axis2-transport-http-1.7.1.jar:1.7.1]
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431) [axis2-kernel-1.7.1.jar:1.7.1]
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399) [axis2-kernel-1.7.1.jar:1.7.1]
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) [axis2-kernel-1.7.1.jar:1.7.1]
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150) [axis2-kernel-1.7.1.jar:1.7.1]
at com.reputation.r4e.integrator.greystar.ExtractDataStub.greystarExtract(ExtractDataStub.java:300) [classes/:na]
at com.reputation.r4e.integrator.recordreader.GreystarLocationImportRecordReader.getGreystarExtractResponse(GreystarLocationImportRecordReader.java:198) [classes/:na]
at com.reputation.r4e.integrator.recordreader.GreystarLocationImportRecordReader.process(GreystarLocationImportRecordReader.java:97) [classes/:na]
at com.reputation.r4e.integrator.impl.DefaultPipeline.flow(DefaultPipeline.java:33) [classes/:na]
at com.reputation.r4e.integrator.impl.DefaultPipeline.process(DefaultPipeline.java:52) [classes/:na]
at com.reputation.r4e.integrator.importer.NullImporter.process(NullImporter.java:38) [classes/:na]
at com.reputation.r4e.integrator.impl.DefaultPipeline.flow(DefaultPipeline.java:33) [classes/:na]
at com.reputation.r4e.integrator.impl.DefaultPipeline.process(DefaultPipeline.java:52) [classes/:na]
at com.reputation.r4e.integrator.IntegrationRunner$IntegrationRunnable.run(IntegrationRunner.java:87) [classes/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
It's saying 401 unauthorised error. How it got worked through SOAP UI and why its not working through a JAVA client.?
I monitor http traffic through TCPMon and except headers all are same. So I added the headers which got from the SOAP UI tool to my JAVA Client but still no luck. I am getting the same 401 unauthorised error.
Here are the soap request of both SOAP UI and through JAVA Client.
SOAP UI Request:
POST https://apps.greystar.com/gsWebService/gsExtract.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action="https://apps.greystar.com/greystarExtract"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Content-Length: 692
Host: apps.greystar.com
Connection: Keep-Alive
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:apps="https://apps.greystar.com/">
<soap:Header/>
<soap:Body>
<apps:greystarExtract>
<apps:axmlVendorCode>VENDOR_CODE</apps:axmlVendorCode>
<apps:axmlToken>PASSWORD</apps:axmlToken>
<apps:axmlExtractType>PROPERTY_LIST</apps:axmlExtractType>
<apps:axmlFormat>XML</apps:axmlFormat>
<apps:axmlParameters></apps:axmlParameters>
</apps:greystarExtract>
</soap:Body>
</soap:Envelope>
JAVA CLIENT Request:
POST /gsWebService/gsExtract.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="https://apps.greystar.com/greystarExtract
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36[\r][\n]
Connection: Keep-Alive
Host: apps.greystar.com
Transfer-Encoding: chunked
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header />
<soapenv:Body>
<ns1:greystarExtract xmlns:ns1="https://apps.greystar.com/">
<ns1:axmlVendorCode>VENDOR_CODE</ns1:axmlVendorCode>
<ns1:axmlToken>PASSWORD</ns1:axmlToken>
<ns1:axmlExtractType>PROPERTY_LIST</ns1:axmlExtractType>
<ns1:axmlFormat>JSON</ns1:axmlFormat>
<ns1:axmlParameters></ns1:axmlParameters>
</ns1:greystarExtract>
</soapenv:Body>
</soapenv:Envelope>
Note: I added JAVA Client headers by looking at the SOAP UI headers. The actual JAVA client headers are below
POST /gsWebService/gsExtract.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8;
action="https://apps.greystar.com/greystarExtract
User-Agent: Axis2
Host: apps.greystar.com
Transfer-Encoding: chunked
What could be the reason for failing this through JAVA client.? Can any one please answer my question because I stuck over here.
Thanks in advance,
Amar.T
I tried other third party libraries and its working as expected. I tried CXF and SOAP UI JAVA API and its working as expected. I don't know why its not working with APACHE AXIS2.
If anyone finds the answer why its not working with AXIS2 please post the answer.
Thanks & Regards,
Amar.T
I use jetty-maven-plugin to run my web application:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.12.v20130726</version>
<configuration>
<webApp>
<contextPath>/test</contextPath>
</webApp>
</configuration>
</plugin>
Next, I use nginx to proxify requests:
server {
server_name q.ru;
listen 80;
location / {
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8080/test;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Now, I open my browser, and send request to http://q.ru (localhost in my /etc/hosts).
I get infinite redirection.
Here is HTTP dialog dump- request from nginx to jetty, and jetty response:
GET /test HTTP/1.1
Host: 127.0.0.1:8080
Connection: close
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
HTTP/1.1 302 Found
Location: http://127.0.0.1:8080/test/
Connection: close
Server: Jetty(8.1.12.v20130726)
Host and path are exactly specified in request. So why does jetty send 302 redirect ?
I'm pretty sure this stackoverflow question might help you, I've been searching for similar thing.
Hope that helps.
Cheers