On 06/13/2011 06:55 PM, Gunnar Morling wrote:
Hi,

answers inline.

--Gunnar

2011/6/13 Glen Mazza<[email protected]>:
I don't think such a flag would help you, because you're at least as
likely--if not more likely--to forget setting this "enforce implementation
style" flag as you would be to forget setting the wsdlLocation.  Then we
would need to create another flag so you can declare whether you wish to
enforce the setting of the "enforce implementation style" flag, and then
have a flag to enforce the setting of that flag, and so on.
I'm not sure I follow. IMO such an option would be set globally on the
bus level (opposed to wsdlLocation on the endpoint level). Now one
could forget to set this option, but once it is, it would be ensured
that either each endpoint is properly set up or the runtime raises an
error. So compared to today I'd only have to set the "contract first
mode" once and would be protected against any future misconfigured
endpoints.

Another approach might be a dedicated schema type for contract-first
based endpoints for which the wsdlLocation attribute is mandatory:

<jaxws:contractFirstEndpoint id="classImpl"
implementor="org.apache.cxf.jaxws.service.Hello"
     endpointName="..." serviceName="..." address="..."
     wsdlLocation="..."/>

I would like to avoid using the WSDL-first/Java-first terminology (up until now, AFAIK those terms are reserved for when you're creating the web service, not once it's in production) when referring to already deployed web services. A running web service operates the same whether Java-first or WSDL-first, whether it creates the WSDL because none was provided, or uses an explicitly declared WSDL, it still runs the same once the WSDL is there (while it may run differently due to different elements within the WSDL due to autogeneration vs. explicit declaration--e.g., the former won't have the restrictions--the business logic with respect to processing the WSDL is still the same).

I think what you're asking for is a "requireExplicitWSDLLocation" flag, to be set bus-level, which has meaning for any web service, whether you started Java-first (and included its autogenerated WSDL, so the web service provider wouldn't have to autogenerate it) or contract-first (and included your own WSDL). As mentioned before, I'm leery of having flags to prevent you from forgetting something, because you're at least as likely to forget setting that reminder flag, but as you said a bus-level declaration would hold for all endpoints, and I can also see some security value in *somebody else* setting this bus-level to ensure included WSPs are not forgetting to declare the wsdlLocation (with its WS-Policy statements). You may wish to enter a JIRA enhancement request for this, possibly referencing this thread (a URL is available from Nabble) for background information.

Glen

--
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza


Reply via email to