cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guilherme Veloso Neves Oliveira (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-5791) Could not send a message. Caused by HTTP response '404: Not Found'
Date Mon, 09 Jun 2014 02:03:01 GMT
Guilherme Veloso Neves Oliveira created CXF-5791:
----------------------------------------------------

             Summary: Could not send a message. Caused by HTTP response '404: Not Found'
                 Key: CXF-5791
                 URL: https://issues.apache.org/jira/browse/CXF-5791
             Project: CXF
          Issue Type: Bug
    Affects Versions: 3.0.1
         Environment: GNU/Linux Debian sid with jdk1.7.0_60 (Java HotSpot(TM) 64-Bit Server
VM (build 24.60-b09, mixed mode))
            Reporter: Guilherme Veloso Neves Oliveira


The issue https://issues.apache.org/jira/browse/CXF-5781 was resolved the exception "port
out of range: -1", but introduced the new exception below (Could not send Message - HTTP response
'404: Not Found') 

What is surprising for me is that the application server hosting the webservice runs an instance
of JBoss (Red Hat) and not IIS (Microsoft). I say this because the HTTP header response for
code 404 was produced by an IIS server (Microsoft). In DEBUG mode, I collected the correct
header produced by JBOSS and wrong produced by IIS (Microsoft). I caught these two headers
stopping code execution in getResponseCode () method of the class $ org.apache.cxf.transport.http.netty.client.NettyHttpConduit
NettyWrappedOutputStream.

The wrong HTTP header was produced simply running the code!

The correct HTTP header was produced as follows: at runtime, in initializePorts() method of
class org.apache.cxf.jaxws.ServiceImpl.java the value of the local variable called "address"
(in line 210, before calling the method addPort) was changed to include the number of TCP
port 443 (https://homologwsincom.in.gov.br:443/services/servicoIN). With this change again
(the reasons are described in https://issues.apache.org/jira/browse/CXF-5781), everything
worked normally.

Despite trying to create a patch, I did not get success. So, I would ask that the TCP port
number was not removed from the local variable called "address".

Below the headers HTTP:
==========================================================
Correct Header

DefaultFullHttpResponse(decodeResult: success)
HTTP/1.1 200 OK
Date: Mon, 09 Jun 2014 01:22:57 GMT
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
Content-Type: text/xml;charset=UTF-8
Vary: Accept-Encoding,User-Agent
Keep-Alive: timeout=20, max=100
Connection: Keep-Alive
Content-Length: 730

-------------------------------------------------------------------------------------
Wrong Header

DefaultFullHttpResponse(decodeResult: success)
HTTP/1.1 404 Not Found
Date: Mon, 09 Jun 2014 01:20:52 GMT
Server: Microsoft-IIS/7.5
Content-Type: text/html; charset=ISO-8859-1
X-Powered-By: ASP.NET
Vary: Accept-Encoding,User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Length: 1245
=========================================================
Below, the stacktrace:

Jun 08, 2014 10:09:05 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://xfire.ws.incom}servicoIN#{http://xfire.ws.incom}ConsultaFormasPagamento
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:137)
	at com.sun.proxy.$Proxy35.consultaFormasPagamento(Unknown Source)
	at incom.ws.xfire.ServicoINPortType_ServicoINHttpPort_Client.main(ServicoINPortType_ServicoINHttpPort_Client.java:60)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when
communicating with https://homologwsincom.in.gov.br/services/servicoIN
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1573)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1525)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
	at org.apache.cxf.transport.http.netty.client.NettyHttpConduit$NettyWrappedOutputStream.close(NettyHttpConduit.java:153)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:638)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 9 more

Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message.
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:148)
	at com.sun.proxy.$Proxy35.consultaFormasPagamento(Unknown Source)
	at incom.ws.xfire.ServicoINPortType_ServicoINHttpPort_Client.main(ServicoINPortType_ServicoINHttpPort_Client.java:60)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when
communicating with https://homologwsincom.in.gov.br/services/servicoIN
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1573)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1525)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
	at org.apache.cxf.transport.http.netty.client.NettyHttpConduit$NettyWrappedOutputStream.close(NettyHttpConduit.java:153)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:638)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:137)
	... 2 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message