Proposed update of all services endpoints can be in some cases incorrect. The absolute endpoint URL can be determined only from incoming request. As far as you request InventoryService, not InventoryProvider; only InventoryService endpoint is updated. Imagine, you request InventoryProvider using other URL (for example http://127.0.0.1:9080/jaxws-wsdlfaults2/InventoryProvider, or even using other port) and InventoryProvider will have absolute URL different as InventoryService.
Cheers, Andrei. > -----Original Message----- > From: Bin Zhu [mailto:[email protected]] > Sent: Dienstag, 27. November 2012 07:30 > To: [email protected] > Subject: service location in WSDL generated by CXF > > Hi All, > I find that when define 2 service using a SEI class and a Service provider > class, > if query the service defined by SEI, then in the WSDL generated by CXF, it > will > only update the service location for this SEI service, but the location > defined > by service provider will not be updated. > Is this behavior as design? Could it update all the service location rather > than > only the requested one? Thanks in advance. > > Service defined by SEI: > @WebService(targetNamespace="http://inventory.wsdlfaults.jaxws", > wsdlLocation="WEB-INF/wsdl/Inventory.wsdl", > serviceName="InventoryService", > portName="InventoryPort", > > endpointInterface="jaxws.wsdlfaults.wsfvt.server.inventory.InventoryPortT > ype") > Service defined by Service Provider: > @WebServiceProvider(targetNamespace="http://inventory.wsdlfaults.jaxw > s", > wsdlLocation="WEB-INF/wsdl/Inventory.wsdl", > serviceName="InventoryProvider", > portName="InventoryProviderPort") > > WSDL generated by CXF using this URL: > http://localhost:9080/jaxws-wsdlfaults2/InventoryService?wsdl > > <service name="InventoryService"> > <port binding="tns:InventoryBinding" name="InventoryPort"> > <soap:address location=" > http://localhost:9080/jaxws-wsdlfaults2/InventoryService"></soap:address> > </port> > </service> > <service name="InventoryProvider"> > <port binding="tns:InventoryBinding" name="InventoryProviderPort"> > <soap:address location="/InventoryProvider"></soap:address> > </port> > </service>
