I fixed this issue by replacing :
DonneesClientService ss = new DonneesClientService(wsdlURL,
SERVICE_NAME);
DonneesClientServicePortType port =
ss.getDonneesClientServicePort();
with :
Service ss = Service.create( wsdlURL, DonneesClientService .SERVICE
);
DonneesClientServicePortType client =
ss.getPort( DonneesClientService .DonneesClientServicePort,
DonneesClientServicePortType.class );
It seems the generated DonneesClientService client has less support for
dynamic configuration. Is this a known - and expected - limitation ???
Cheers,
Nicolas
2009/1/13 nicolas de loof <[email protected]>
> Hi,
> I'd like to write a test client (non spring). I'm using the code generated
> from WSDL :
>
> URL wsdlURL = getResource( "BIOSPDC_donneesClient_v1.0.wsdl" );
> DonneesClientService ss = new DonneesClientService( wsdlURL,
> SERVICE_NAME );
> DonneesClientServicePortType port =
> ss.getDonneesClientServicePort();
>
> ConsulterClientRequete requete = new ConsulterClientRequete();
> ConsulterClientReponse reponse = port.spcConsulterClient( requete
> );
> assertNotNull( reponse );
>
> The WSDL has a fake endPoint URL, and I need to set the test service URL.
>
> I tried :
> ( (BindingProvider) port ).getRequestContext().put(
> BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> "
> http://localhost:8089/mockdonneesClientServiceBind" );
>
> But this has no effect :
>
> Caused by: java.net.ConnectException: Connection refused: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>
> I can't find such a sample in
> http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html
>
> Any sugggestion ?
>
>
>