You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Bin Zhu <lu...@gmail.com> on 2012/11/28 11:05:36 UTC

enhancement for service location in WSDL generated by CXF

Hi,

It is found that when define 2 service with the same WSDL location in a web
service application, when querying one of the service,  CXF will only
update the service soap address location for the requested URL in it's
generated WSDL. The location for another service will not be updated even
they have the same wsdl location defined.
Here is an example for this scenario.  There are one service named
InventoryService defined by a SEI class and another service named
InventoryProvider defined by a service provider class,  if query the
InventoryService service(e.g. http://localhost:9080/jaxws-wsdlfaults2/
InventoryService?wsdl ) , then in the WSDL generated by CXF, it will only
update the service location for InventoryService , but the location for
InventoryProvider will not be updated.

It is suggested to improve current WSDL generation behavior to update all
the service location rather than only the requested one. Thus it will be
more flexible for user to choose either of URLs for InventoryService or
InventoryProvider when they need to create the  InventoryService or
InventoryProvider service. Do you think it's a valid enhancement? Let me
know if there is any thing unclear. It will be appreciated if there is any
suggestion.


*InventoryService:*
@WebService(targetNamespace="http://inventory.wsdlfaults.jaxws",
            wsdlLocation="WEB-INF/wsdl/Inventory.wsdl",
            serviceName="InventoryService",
            portName="InventoryPort",

endpointInterface="jaxws.wsdlfaults.wsfvt.server.inventory.InventoryPortType")

*InventoryProvider:*
@WebServiceProvider(targetNamespace="http://inventory.wsdlfaults.jaxws",
                    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>

*Expected WSDL with this suggested enhancement:*
<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="http://localhost:9080/jaxws-wsdlfaults2<http://localhost:9080/jaxws-wsdlfaults2/InventoryService>
/InventoryProvider"></soap:address>
</port>
</service>