[ 
https://issues.apache.org/jira/browse/CXF-6655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaume Vicens updated CXF-6655:
------------------------------
    Description: 
When creating a client setting proxy config first and then endopoint address, 
we get Exception when Sending Message (this worked perfectly in CXF 3.0.2):
java.net.URISyntaxException: Invalid address. Endpoint address cannot be null. 
at index 0: <null>

org.apache.cxf.interceptor.Fault: Could not send Message.
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        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:138)
        .............
.....................
Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
Endpoint address cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
        ... 16 more
Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
        at 
org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
        ... 17 more

Could not send Message.
javax.xml.ws.WebServiceException: Could not send Message.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:149)
......
......
Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
Endpoint address cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        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:138)
        ... 9 more
Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
        at 
org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
        ... 17 more




This is Client Creation:

Service service = HydraWebService.create(SERVICE_NAME);
        port = service.getPort(HydraService.class);
        
        Client client = ClientProxy.getClient(port);
        client.getInInterceptors().add(new LoggingInInterceptor());
        client.getOutInterceptors().add(new LoggingOutInterceptor());
        HTTPConduit http = (HTTPConduit) client.getConduit();
        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setAllowChunking(false);
        httpClientPolicy.setReceiveTimeout(0);
        httpClientPolicy.setProxyServerType(ProxyServerType.HTTP);
httpClientPolicy.setProxyServer(ConnectorConfiguration.getProxyURL());
httpClientPolicy.setProxyServerPort(Integer.parseInt(ConnectorConfiguration.getProxyPort()));
        http.setClient(httpClientPolicy);
        BindingProvider provider = (BindingProvider) port;
        
        
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
wsdlURL.toString());

  was:
When creating a client setting proxy config first and then endopoint address, 
we get Exception when Sending Message (this worked perfectly in CXF 3.0.2):
java.net.URISyntaxException: Invalid address. Endpoint address cannot be null. 
at index 0: <null>

org.apache.cxf.interceptor.Fault: Could not send Message.
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        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:138)
        at com.sun.proxy.$Proxy131.getChannelConfiguration(Unknown Source)
        at 
com.idiso.icm.hydra.HydraClient.getChannelConfiguration(HydraClient.java:120)
        at 
com.idiso.icm.connector.DefaultConnectorConfigurator.getChannelConfigurationFromHydra(Unknown
 Source)
        at 
com.idiso.icm.connector.DefaultConnectorConfigurator.configureConnector(Unknown 
Source)
        at 
com.idiso.icm.connector.ICMConnectorContext.configureConnector(Unknown Source)
        at com.idiso.icm.connector.ICMConnectorContext.<init>(Unknown Source)
        at com.idiso.smartxmlpull.connector.ConfigJob.execute(ConfigJob.java:22)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
Endpoint address cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
        ... 16 more
Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
        at 
org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
        ... 17 more
[SMARTXMLPULL] [2015-10-27 08:20:38,509] ERROR Error in 
com.idiso.icm.connector.DefaultConnectorConfigurator.configureConnector()Could 
not send Message.
javax.xml.ws.WebServiceException: Could not send Message.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:149)
        at com.sun.proxy.$Proxy131.getChannelConfiguration(Unknown Source)
        at 
com.idiso.icm.hydra.HydraClient.getChannelConfiguration(HydraClient.java:120)
        at 
com.idiso.icm.connector.DefaultConnectorConfigurator.getChannelConfigurationFromHydra(Unknown
 Source)
        at 
com.idiso.icm.connector.DefaultConnectorConfigurator.configureConnector(Unknown 
Source)
        at 
com.idiso.icm.connector.ICMConnectorContext.configureConnector(Unknown Source)
        at com.idiso.icm.connector.ICMConnectorContext.<init>(Unknown Source)
        at com.idiso.smartxmlpull.connector.ConfigJob.execute(ConfigJob.java:22)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
Endpoint address cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
        at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
        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:138)
        ... 9 more
Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
cannot be null. at index 0: <null>
        at 
org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
        at 
org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
        at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
        ... 17 more




This is Client Creation:

Service service = HydraWebService.create(SERVICE_NAME);
        port = service.getPort(HydraService.class);
        
        Client client = ClientProxy.getClient(port);
        client.getInInterceptors().add(new LoggingInInterceptor());
        client.getOutInterceptors().add(new LoggingOutInterceptor());
        HTTPConduit http = (HTTPConduit) client.getConduit();
        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setAllowChunking(false);
        httpClientPolicy.setReceiveTimeout(0);
        httpClientPolicy.setProxyServerType(ProxyServerType.HTTP);
httpClientPolicy.setProxyServer(ConnectorConfiguration.getProxyURL());
httpClientPolicy.setProxyServerPort(Integer.parseInt(ConnectorConfiguration.getProxyPort()));
        http.setClient(httpClientPolicy);
        BindingProvider provider = (BindingProvider) port;
        
        
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
wsdlURL.toString());


> Error Invalid address. Endpoint address cannot be null
> ------------------------------------------------------
>
>                 Key: CXF-6655
>                 URL: https://issues.apache.org/jira/browse/CXF-6655
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.0.6, 3.1.3
>            Reporter: Jaume Vicens
>
> When creating a client setting proxy config first and then endopoint address, 
> we get Exception when Sending Message (this worked perfectly in CXF 3.0.2):
> java.net.URISyntaxException: Invalid address. Endpoint address cannot be 
> null. at index 0: <null>
> org.apache.cxf.interceptor.Fault: Could not send Message.
>         at 
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
>         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:138)
>         .............
> .....................
> Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
> Endpoint address cannot be null. at index 0: <null>
>         at 
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
>         at 
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>         ... 16 more
> Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
> cannot be null. at index 0: <null>
>         at 
> org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
>         ... 17 more
> Could not send Message.
> javax.xml.ws.WebServiceException: Could not send Message.
>         at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:149)
> ......
> ......
> Caused by: java.io.IOException: java.net.URISyntaxException: Invalid address. 
> Endpoint address cannot be null. at index 0: <null>
>         at 
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:490)
>         at 
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
>         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:138)
>         ... 9 more
> Caused by: java.net.URISyntaxException: Invalid address. Endpoint address 
> cannot be null. at index 0: <null>
>         at 
> org.apache.cxf.transport.http.HTTPConduit.setAndGetDefaultAddress(HTTPConduit.java:732)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.setupAddress(HTTPConduit.java:677)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:488)
>         ... 17 more
> This is Client Creation:
> Service service = HydraWebService.create(SERVICE_NAME);
>         port = service.getPort(HydraService.class);
>         
>         Client client = ClientProxy.getClient(port);
>         client.getInInterceptors().add(new LoggingInInterceptor());
>         client.getOutInterceptors().add(new LoggingOutInterceptor());
>         HTTPConduit http = (HTTPConduit) client.getConduit();
>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>         httpClientPolicy.setAllowChunking(false);
>         httpClientPolicy.setReceiveTimeout(0);
>         httpClientPolicy.setProxyServerType(ProxyServerType.HTTP);
> httpClientPolicy.setProxyServer(ConnectorConfiguration.getProxyURL());
> httpClientPolicy.setProxyServerPort(Integer.parseInt(ConnectorConfiguration.getProxyPort()));
>         http.setClient(httpClientPolicy);
>         BindingProvider provider = (BindingProvider) port;
>         
>       
> provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
> wsdlURL.toString());



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

Reply via email to