[ 
https://issues.apache.org/jira/browse/CXF-5781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363755#comment-15363755
 ] 
Maninder Singh commented on CXF-5781:
-------------------------------------

Hi Oliveira,

Yes, we have already taken the latest version of ApacheCxf in new versions of 
our application.

But there are some older application running in production systems which are 
using the older version ApacheCXF-2.7.14 ,
So can we provide some work around for this problem for the older application 
to work with ApacheCXF-2.7.14 only ?

Thanks & Regards,
Maninder

> Port ou of Range: -1
> --------------------
>
>                 Key: CXF-5781
>                 URL: https://issues.apache.org/jira/browse/CXF-5781
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 3.0.0
>         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
>            Assignee: Colm O hEigeartaigh
>            Priority: Critical
>             Fix For: 3.0.1
>
>
> I'm trying to access a service available in the URL 
> (https://homologwsincom.in.gov.br/services/servicoIN) and when I run the 
> ServicoINPortType_ServicoINHttpPort_Client.java (write automatic for CXF 3.0) 
> class, with appropriate amendments security header, happens the exception 
> below. All classes containing this url in the code generated automatically 
> been changed to possess the number of tcp port 443 getting written as 
> ("https://homologwsincom.in.gov.br:443/services/servicoIN";). I add the port 
> number 443 in the URL as an attempt to fix the problem. 
> In initializePorts() method of class org.apache.cxf.jaxws.ServiceImpl.java 
> the URL (https://homologwsincom.in.gov.br:443/services/servicoIN?wsdl) was 
> changed to (https:// homologwsincom.in.gov.br/services/servicoIN) without the 
> TCP port number. 
> At runtime, the realized change in the value of the local variable called 
> "address" to include the number of TCP port 443 again and everything worked 
> normally.  I would like the above method does not alter the provided URL.
> Below, the stacktrace:
> ADVERTÊNCIA: Interceptor for 
> {http://xfire.ws.incom}servicoIN#{http://xfire.ws.incom}ConsultaFormasPagamento
>  has thrown exception, unwinding now
> java.lang.IllegalArgumentException: IllegalArgumentException invoking 
> https://homologwsincom.in.gov.br/services/servicoIN: port out of range:-1
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1359)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
>       at 
> org.apache.cxf.transport.http.netty.client.NettyHttpConduit$NettyWrappedOutputStream.close(NettyHttpConduit.java:153)
>       at 
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
>       at 
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215)
>       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)
>       at com.sun.proxy.$Proxy40.consultaFormasPagamento(Unknown Source)
>       at 
> incom.ws.xfire.ServicoINPortType_ServicoINHttpPort_Client.main(ServicoINPortType_ServicoINHttpPort_Client.java:62)
> Caused by: java.lang.IllegalArgumentException: port out of range:-1
>       at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
>       at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
>       at 
> org.apache.cxf.transport.http.netty.client.NettyHttpConduit$NettyWrappedOutputStream.connect(NettyHttpConduit.java:293)
>       at 
> org.apache.cxf.transport.http.netty.client.NettyHttpConduit$NettyWrappedOutputStream.setupWrappedStream(NettyHttpConduit.java:243)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1302)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1258)
>       at 
> org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
>       at 
> org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1315)
>       ... 15 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to