cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@gmail.com>
Subject Re: jaxws:endpoint address not used when using createdFromAPI
Date Wed, 26 May 2010 16:15:56 GMT


dkulp wrote:
> 
> On Wednesday 26 May 2010 4:18:25 am Seumas Soltysik wrote:
>> If I call Enpoint.publish(address, implementation) and define a
>> <jaxws:endpoint> like this:
>> 
>>      <jaxws:endpoint
>> name="{http://ws.iona.com/peer_manager}PeerManagerPort"
>> address="http://localhost:8888/services/PeerManagerService"
>>      wsdlLocation="./wsdl/peer-manager.wsdl"
>>      createdFromAPI="true"
>>      endpointName="ns:PeerManagerPort"
>>      serviceName="ns:PeerManagerService"
>>      xmlns:ns="http://ws.iona.com/peer_manager"/>
>> 
>> 
>> the address attribute is not used by the EndpointImpl class. In
>> EndpointImpl.getServer(), the address is read from the configuration and
>> set on the endpoint but it is never used. The address from
>> Endpoint.publish(address, implementation) always over-rides the address
>> in
>> the configuration. This pretty much makes sense since if you specifically
>> specify an address then that is the address that should be used as
>> opposed
>> to the address in configuration. However, it seems to me that if you pass
>> in and empty string or a null value and the configuration for the
>> <jaxws:endpoint> contains an address attribute, then that address
>> attribute should be used. Why is this not the case?
> 
> I'd probably consider that a bug.   If the passed in address is null,
> pulling 
> it from the config definitely makes sense.
> 

Probably, but I wouldn't say "definitely".  The fact that the developer used
Endpoint.publish(address, implementation) instead of
Endpoint.publish(implementation) indicates the developer specifically wanted
to override the address from what's in the default configuration but that he
goofed up and made an error in his setting of the address property.  If
that's the majority scenario, we would be doing the developer a favor in not
relying on the config file value--instead having CXF return an error and
alerting the developer to his mistake.

Glen

-- 
View this message in context: http://old.nabble.com/jaxws%3Aendpoint-address-not-used-when-using-createdFromAPI-tp28677754p28682954.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Mime
View raw message